Beginner question on design of an 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

User avatar
Whiskey
Posts: 45
Joined: 28 Oct 2010, 06:27
Location: The Netherlands
Contact:

Beginner question on design of an extension

Postby Whiskey » 24 May 2011, 17:10

I'm mostly new to the serverside extensions and I'm trying to build my first one from scratch. The tutorials (video and documentation) are truly excellent, thanks for that!

I'm now working on a scenario that involves temporarily storing data which is touched upon by the documentation, but not very clear to me. I want to create an extension for a board game that collects data after each round and once all users have submitted their data for that round, it sends back all the collected data to every user (later I want to add storing it in a database).

Sending and receiving is not difficult, however, what would be a good way to store the data while collecting. I thought of putting it in a roomvariable so the extension can track multiple rooms/games, but is that the most sensible? I could just keep a list in the class, but then I would need to add identifiers for each round. Any opinions most appreciated!
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 25 May 2011, 07:16

In my opinion all solutions are fine.
If you use the RoomVariables, you obtain the automatic transmission of the data to all the users in the Room, so maybe this can make your life easier.
Paolo Bax
The SmartFoxServer Team

Return to “SFS2X Questions”

Who is online

Users browsing this forum: Stevenor and 82 guests