Carrying on from my last question: what is the recommended way to handle many (hundreds to maybe thousands) game states?
I was thinking about one extension-instance per room, but I see that the BattleFarm example handles this differently (by keeping all game states in ConcurrentHashMap within a single extension instance).
So, I guess what I am asking is - what is the overhead to create one extension per (game) room, rather than one extension per zone?
Best,
Thomas
Game-Extension per Room or per Zone?
-
- Posts: 74
- Joined: 23 Mar 2010, 02:35
It would make sense to have one dedicated controller than many if you have thousands of game states. Since things come in cue, one dedicated extension can feasibly handle all of such actions in a zone. This would have vastly reduced footprint on your server than having thousands of the same instance.
Its just like in flash, its often better to have one onEnterFrame event that controls everything right? Try having thousands of onEnterFrame events and see how much it will slow down your flash.
That's the way I figure it, correct me if I am wrong?
My only concern with this method is dropped messages if you have a turn-based game. Since things are step by step in a turn-based game, one dropped message might break a game somewhere in the system. I am curious if this method is suited for that, or if it should be room specific?
Its just like in flash, its often better to have one onEnterFrame event that controls everything right? Try having thousands of onEnterFrame events and see how much it will slow down your flash.
That's the way I figure it, correct me if I am wrong?
My only concern with this method is dropped messages if you have a turn-based game. Since things are step by step in a turn-based game, one dropped message might break a game somewhere in the system. I am curious if this method is suited for that, or if it should be room specific?
Who is online
Users browsing this forum: No registered users and 142 guests