where is simple mmo world tutorial 2?

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

Moderators: Lapo, Bax

User avatar
Zenith
Posts: 55
Joined: 09 Oct 2017, 09:57

where is simple mmo world tutorial 2?

Postby Zenith » 18 Jan 2018, 13:24

"The upcoming Simple MMO World 2 tutorial will further refine and expand this example, adding a server side Extension, dynamic map loading, multiple maps, map entry points and MMOItems."

I could not find that anywhere.

Can you please put some light on Dynamic Map Loading?
I really want to know how the great Lapo thinks it should be handled best?

Also my game should be persistent. So how do you imagine I should go around saving the game state to database. Like how often? or in some specific structure?
User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: where is simple mmo world tutorial 2?

Postby Bax » 18 Jan 2018, 15:48

Unfortunately the "Simple MMO World 2 tutorial" is still work-in-progress, due to other priorities.
But in the examples package for HTML5/JavaScript you will find the actual code, so you can start learning our approach on dynamic map loading. This involves a server side extension too.
Get the examples package here: http://www.smartfoxserver.com/download/sfs2x#p=examples
Paolo Bax
The SmartFoxServer Team
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: where is simple mmo world tutorial 2?

Postby Lapo » 18 Jan 2018, 15:51

Zenith wrote:Also my game should be persistent. So how do you imagine I should go around saving the game state to database. Like how often? or in some specific structure?

Hi,
can you be more specific and give us an idea of what data about the game should be stored?

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
Zenith
Posts: 55
Joined: 09 Oct 2017, 09:57

Re: where is simple mmo world tutorial 2?

Postby Zenith » 19 Jan 2018, 06:45

Lapo wrote:
Zenith wrote:Also my game should be persistent. So how do you imagine I should go around saving the game state to database. Like how often? or in some specific structure?

Hi,
can you be more specific and give us an idea of what data about the game should be stored?

Thanks

In my game players are able to create certain items and place them on map.
Say bombs, traps, boards, farms, houses.
I imagine these too be created using mmo items.
Now I want these to be persisted time to time so that they can be restored in case of server shutdown or restart.
What would be right time and way to persist that data (map state) ?
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: where is simple mmo world tutorial 2?

Postby Lapo » 19 Jan 2018, 08:35

Thanks for the details.
There are different strategies to do this. Essentially you will have to find the right time interval to perform recurring saves to store the changes that have been made to the game map.

Updating the database on every change is going to be too expensive, especially with high traffic so the strategy is to do it at short and regular intervals. For example every 1-10 minutes, depending on the frequency at which these changes occur.

Additionally you can handle a couple of extra events such as the Room destruction (if it is supported) and the server restart, so that you can perform a final save before those events occur.
The latter is done by using the "shutdown hook" provided by the JVM:
https://www.geeksforgeeks.org/jvm-shutdown-hook-java/

hope it helps
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: Google [Bot] and 58 guests