Which is better one game per room or one game per extension?

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

Moderators: Lapo, Bax

crimsonfantasy
Posts: 13
Joined: 21 Feb 2018, 03:02

Which is better one game per room or one game per extension?

Postby crimsonfantasy » 21 Feb 2018, 03:33

Hello, everyone
I have many types of casual game those are very easy to play with simple rules.
I concerned maintainable for these game project, so I want make one game for one game extension (one zone).
However, There are some limited on smart-Fox. Smart-fox require keeping connection per extension. Our clients includes smart-phone.
I worried about keeping two or more connection make excessive consumption of mobile phone power. However, I haven't prove it.
When one player play my game, the man connects two extension. Smart Fox Server increase 2 or more CCU.
So, I need to buy much expensive licence to support more CCU.

If I put one game in one room, all type of game in one extension. The architecture perform one connections for client, one ccu per player.
However, I must design a deep and complex structure on Room, and a heavy single Java project.

Hence, Could give me some advice? Thank you
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Which is better one game per room or one game per extension?

Postby Lapo » 21 Feb 2018, 07:26

Hi,
keeping multiple connections open is not an issue. Connections alone don't use bandwidth, so the network consumption depends entirely on the activity of the game itself. Also keep in mind that SFS2X uses a compressed protocol that is very efficient. These days you can watch streaming 1080p videos on a mobile phone. In comparison the traffic generated by SFS2X is extremely small.

crimsonfantasy wrote:When one player play my game, the man connects two extension. Smart Fox Server increase 2 or more CCU.
So, I need to buy much expensive licence to support more CCU.

I am not sure I understand this part.
Zones in SmartFoxServer represent different applications, so my question is why does your client need to be connected to multiple apps at the same time? Is he playing two games at once?

Other than that I don't see why the client should be using multiple CCUs at the same time. Can you clarify this point?

If I put one game in one room, all type of game in one extension. The architecture perform one connections for client, one ccu per player.
However, I must design a deep and complex structure on Room, and a heavy single Java project.


You can created different Extensions for different games and attach the Extension to the Room that requires it.
In other words if a player wants to play Poker you can create a Room, assign the Poker Extension to it and let the players join it.
If someone else wants to play Backgammon you can create another game Room, assign the Backgammon Extension to it etc...

More on this here:
http://docs2x.smartfoxserver.com/Develo ... chitecture

Also I recommend the "SmartFoxServer 2X Architecture" white paper from here:
http://docs2x.smartfoxserver.com/Overview/white-papers

Hope it helps
Lapo
--
gotoAndPlay()
...addicted to flash games
crimsonfantasy
Posts: 13
Joined: 21 Feb 2018, 03:02

Re: Which is better one game per room or one game per extension?

Postby crimsonfantasy » 21 Feb 2018, 09:04

Lapo wrote:
crimsonfantasy wrote:When one player play my game, the man connects two extension. Smart Fox Server increase 2 or more CCU.
So, I need to buy much expensive licence to support more CCU.

I am not sure I understand this part.
Zones in SmartFoxServer represent different applications, so my question is why does your client need to be connected to multiple apps at the same time? Is he playing two games at once?


For example, if there are my scenario, I have three type of game, Chess game, Black jack, Bridge.
I want 4 rooms for Chess, 6 rooms for Black jack, 10 room form Bridges in one of my game server, and players can play any type of games at the same time. I want 6 rooms for Chess, 9 rooms for Black jack, 4 room form Bridges in one of my another game server, and players can play any type of games at the same time. In my old concept before you response my questions, I require three zone, each zone perform one type of game, and there are numbers of rooms I required. So, I need three connections. Now, I catch your concept Room extensions. I can assign one of Room to one type of Game extensions.

Unfortunately, I have legacy smart fox project designed with weird architecture.
Not share room info by using room variables, use variable. Putting two types of games in one Room.
There are only one Room at Zone. All users joins same Room. Different rounds concurrently act in the Same room.
All static class in this project. Although it is weird, it is one of our important products.
Today, this weird legacy project will be a part of games. Player can plays old game with weird architecture and my new games designed in accurate architecture. No time for me to redesign old Game. In my conclusion, client need two connections at least and 2 CCU. So Sad.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Which is better one game per room or one game per extension?

Postby Lapo » 21 Feb 2018, 15:26

crimsonfantasy wrote:For example, if there are my scenario, I have three type of game, Chess game, Black jack, Bridge.
I want 4 rooms for Chess, 6 rooms for Black jack, 10 room form Bridges in one of my game server, and players can play any type of games at the same time. I want 6 rooms for Chess, 9 rooms for Black jack, 4 room form Bridges in one of my another game server, and players can play any type of games at the same time. In my old concept before you response my questions, I require three zone, each zone perform one type of game, and there are numbers of rooms I required. So, I need three connections. Now, I catch your concept Room extensions. I can assign one of Room to one type of Game extensions.

Yes, you can assign an Extension to a Room, so you can run any number of Rooms that execute different game code.
Also you can organize your game Rooms in Room Groups so that users can only see the Room list for a specific type of game, when they choose what they want to play.

All these concepts are explained in the links I've provided above and are also demonstrated in our free Examples that can be downloaded from here:
http://smartfoxserver.com/download/sfs2x#p=examples

Cheers
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 43 guests