MMORooms and game logic extensions

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

Moderators: Lapo, Bax

SkyKiwi
Posts: 3
Joined: 28 Mar 2020, 02:57

MMORooms and game logic extensions

Postby SkyKiwi » 28 Mar 2020, 03:18

I'm currently debating over server choices, and initially I didn't think SFS2X was going to be viable until I found this blog post about having Unity instances for servers.

This is something I have done before, but not on an MMO scale - which is what I'm interested in doing now.

Incidentally, I won't necessarily be running Unity instances on the server, but I will be running all the game logic on the server, whether that's directly in an SFS extension or another solution. The big obvious issue with this is these will be taxing servers, but it needs to be scalable to thousands of players.

The blog post I linked earlier, under the "Performance and Scalability" section, mentions increasing the amount of machines to run more game servers.
The gist of my inquiry is this: does SFS2X offer a solution to run different rooms under a single zone on separate machines? Does separate machines require separate zones? Or completely different servers? Obviously not counting for cloud solutions that share RAM and such to effectively function as a "single giant server" - I'm more interested in whether SFS2X is capable of elegantly delegating rooms to different machines.
User avatar
Lapo
Site Admin
Posts: 23026
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: MMORooms and game logic extensions

Postby Lapo » 28 Mar 2020, 11:45

Hi,
Incidentally, I won't necessarily be running Unity instances on the server, but I will be running all the game logic on the server, whether that's directly in an SFS extension or another solution. The big obvious issue with this is these will be taxing servers, but it needs to be scalable to thousands of players.[/quote]
Why do you think this will be taxing? Are you planning to run physics simulations on the server side?
What kind of game are you planning to develop?

The gist of my inquiry is this: does SFS2X offer a solution to run different rooms under a single zone on separate machines?
Not out of the box. To do this you need a distributed system, which adds more complexity in the mix.
We have studied the problem with various use cases and proposed several solutions. Typically you will need a centra Lobby Server where every player initially connects to and a number of game servers where users create and join game Rooms.

To keep a centralized state among these servers you will need either a shared database or, even better, a distributed in-memory DB such as a Hazelcast, which is an open source tool for distributing the JVM across multiple machines.
We have an in-depth white paper regarding how to integrate Hazelcast and SFS2X here:
http://docs2x.smartfoxserver.com/Overview/white-papers
(fifth from the top)

Hope it helps
Lapo
--
gotoAndPlay()
...addicted to flash games
SkyKiwi
Posts: 3
Joined: 28 Mar 2020, 02:57

Re: MMORooms and game logic extensions

Postby SkyKiwi » 28 Mar 2020, 14:55

Why do you think this will be taxing? Are you planning to run physics simulations on the server side?
What kind of game are you planning to develop?


Effectively a completely server-authoritative MMO. It will not have physics, but it will have pathfinding (for both players and AI). With thousands of entities per "instance", I don't see this running multiple instances on one machine without issue.

Typically you will need a centra Lobby Server where every player initially connects to and a number of game servers where users create and join game Rooms.


This was one of my thought processes. If I were to take this approach, using SFS2X for the central server makes sense, but I don't see it making sense to use SFS for the game servers - which is a shame because I was hoping to utilize the AOI features of the MMORoom. If I take this approach I would probably just create my own game server implementation and implement that myself, I suppose.

To keep a centralized state among these servers you will need either a shared database or, even better, a distributed in-memory DB such as a Hazelcast, which is an open source tool for distributing the JVM across multiple machines.


This is an area I'm not particularly well versed in. I will investigate it, thanks!
User avatar
Lapo
Site Admin
Posts: 23026
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: MMORooms and game logic extensions

Postby Lapo » 28 Mar 2020, 17:24

SkyKiwi wrote:This was one of my thought processes. If I were to take this approach, using SFS2X for the central server makes sense, but I don't see it making sense to use SFS for the game servers

Why not, exactly?

Cheers
Lapo

--

gotoAndPlay()

...addicted to flash games
SkyKiwi
Posts: 3
Joined: 28 Mar 2020, 02:57

Re: MMORooms and game logic extensions

Postby SkyKiwi » 28 Mar 2020, 20:31

Just seems to me it would be significantly easier to have SFS relay clients towards game servers that aren't part of SFS, than to split a single instance of SFS across multiple machines. It sounds possible to use just SFS for this from what you've told me, but all that sounds a lot more complicated than simply implementing my own AOI system.

It's not off the table yet of course, but that's my initial feeling. I'm not convinced in either direction yet.
User avatar
Lapo
Site Admin
Posts: 23026
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: MMORooms and game logic extensions

Postby Lapo » 30 Mar 2020, 08:56

Sure, but then you have to write the game servers from scratch, with relative APIs, protocols, AOI systems, security, management etc... that is a lot of work.
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 61 guests