Does room creation have a lot of overhead?

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

monk
Posts: 11
Joined: 25 Mar 2020, 07:39

Does room creation have a lot of overhead?

Postby monk » 25 Mar 2020, 07:52

I'm new to smartfox and I've just finished reading through the documentation. I'm trying to make a simple "mmo".

There is no scrolling maps. The player moves to the edge of the screen to move to the next area. It's similar to games like Dofus or the classic Sierra series Quest for Glory. So it's basically a huge grid of "rooms".

I'm curious if creating and destroying rooms is a server intensive task. Should I make each map its own room, or is it better to make a room for a region and simulate rooms within rooms using something like a 2d array.

Rooms would have structured names like "overworld-x20-y10" so that players wouldn't need to subscribe to a room group and waste bandwidth with hundreds of updates when rooms are created/destroyed. I'm concerned that moving to a new map, creating a room, moving to another map, destroying a room and creating a new room would be a waste of resources.

I hope this was understandable. I had a difficult time explaining it. Let me know what you suggest. Thank you.

Chris
User avatar
Lapo
Site Admin
Posts: 23025
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Does room creation have a lot of overhead?

Postby Lapo » 25 Mar 2020, 09:26

Hi,
if you're trying to make an MMO the best choice is using an MMORoom, which is a special Room that can handle thousand of players and manage their events based on an Area-of-Interest mechanism.

For all the details check the documentation here:
http://docs2x.smartfoxserver.com/Advanc ... /mmo-rooms

Also we have examples of how the MMO Room works built in Unity, HMTL5 and Flash, that you can find in the relative Example Packs downloadable from here:
https://www.smartfoxserver.com/download#p=examples

Hope it helps
Lapo
--
gotoAndPlay()
...addicted to flash games
monk
Posts: 11
Joined: 25 Mar 2020, 07:39

Re: Does room creation have a lot of overhead?

Postby monk » 25 Mar 2020, 09:39

It did not. I'm not even sure you read the post.
User avatar
Rob
Posts: 53
Joined: 01 Jul 2017, 07:33

Re: Does room creation have a lot of overhead?

Postby Rob » 25 Mar 2020, 10:13

How large would your map be? You could simply create all the required rooms at startup and never destroy them. Then you wouldn't have any overhead of re-creating/destroying rooms. I'm guessing it should handle hundreds of rooms fine on any normal server.
monk
Posts: 11
Joined: 25 Mar 2020, 07:39

Re: Does room creation have a lot of overhead?

Postby monk » 25 Mar 2020, 21:20

It could be within 10's of thousands. A relatively normal region could be 100x100 connected maps. I guess I'll just have to hope for the best.
User avatar
Lapo
Site Admin
Posts: 23025
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Does room creation have a lot of overhead?

Postby Lapo » 25 Mar 2020, 22:01

Creating/Removing Rooms is not very expensive but for those numbers you'll have to test. This depends a lot on the kind of hardware you're using.
Lapo

--

gotoAndPlay()

...addicted to flash games
monk
Posts: 11
Joined: 25 Mar 2020, 07:39

Re: Does room creation have a lot of overhead?

Postby monk » 27 Mar 2020, 10:12

Thank you.

Return to “SFS2X Questions”

Who is online

Users browsing this forum: Stevenor and 60 guests