MMO Item Serialization

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

Moderators: Lapo, Bax

trianglehead
Posts: 90
Joined: 13 Aug 2016, 04:28

MMO Item Serialization

Postby trianglehead » 11 Mar 2020, 22:48

Hi, I have a game where there can be different MMOItems in the MMORoom, like vehicles etc. I want to persist these into a datasource periodically because if the server shuts down I want those items to be restored with their positions, and variable when I restart the server. All the code is ready, except I can't serialize MMOItem's nor it's variables because they don't implement serializable. How can I overcome it without having to introspect in object manually to find each variable?
User avatar
Lapo
Site Admin
Posts: 23026
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: MMO Item Serialization

Postby Lapo » 12 Mar 2020, 09:03

Hi,
sorry there is no direct serialization support.
As you suggested, you need to introspect the properties you want to save and serialize them manually.

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
trianglehead
Posts: 90
Joined: 13 Aug 2016, 04:28

Re: MMO Item Serialization

Postby trianglehead » 12 Mar 2020, 14:20

Lapo wrote:Hi,
sorry there is no direct serialization support.
As you suggested, you need to introspect the properties you want to save and serialize them manually.

Cheers

Shoot! OK Thanks.

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 100 guests