Forum C# "global variables" accessible from all rooms?

"global variables" accessible from all rooms?

Postby playstation3Dood » March 16th, 2010, 9:37 am

Title says it all. Any way to have constant variables accessable to all currently running rooms?
playstation3Dood
 
Posts: 49
Joined: February 23rd, 2010, 7:39 am

Re: "global variables" accessible from all rooms?

Postby Oliver » March 16th, 2010, 2:50 pm

Sorry, no, it would break the whole "infinite scalability" promise, since that variable would have to be somehow synced across all the different servers running instances of your game.

However, you'll be able to load/save data based on the same key in the upcoming persistance/database api.
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: "global variables" accessible from all rooms?

Postby playstation3Dood » March 16th, 2010, 2:56 pm

right thanks.
btw is there any way to limit the number of rooms running of a particular game and the number of players allowed in each room, or to limit the total number of simultaneous players?
playstation3Dood
 
Posts: 49
Joined: February 23rd, 2010, 7:39 am

Re: "global variables" accessible from all rooms?

Postby Toby » March 16th, 2010, 3:40 pm

Well, you could stop the creation of such rooms via the listRooms and examining the room data. That way you will be able to see what type of game it is and, if there are the limit of them, don't allow the player to create a new one. Capping maximum simultaneous players would be a nice feature to have in the admin panel though...
User avatar
Toby
 
Posts: 86
Joined: January 14th, 2010, 4:01 pm

Re: "global variables" accessible from all rooms?

Postby playstation3Dood » March 17th, 2010, 5:53 am

I thought of using listRooms but that could easily be edited out if the SWF got decompiled, allowing the client to create as many rooms as he wants. I was also thinking along the lines of this being in the admin panel although serverside script would be just as useful.
playstation3Dood
 
Posts: 49
Joined: February 23rd, 2010, 7:39 am

Re: "global variables" accessible from all rooms?

Postby Toby » March 17th, 2010, 10:51 am

If the game is decompiled then players creating extra rooms will probably be the least of your worries anyway.
User avatar
Toby
 
Posts: 86
Joined: January 14th, 2010, 4:01 pm

Re: "global variables" accessible from all rooms?

Postby playstation3Dood » March 17th, 2010, 11:05 am

not necessarily, they could crash the entire server by sending tonnes of messages if i was using the free package, or cost me a lot of extra bandwidth money if i was using one of the paid packages. besides, hopefully if i get the serverside code right and check every message etc., adverse effects from successful decompiling will be kept to a minimum. in which case bandwidth costs would be a greater issue.
playstation3Dood
 
Posts: 49
Joined: February 23rd, 2010, 7:39 am

Re: "global variables" accessible from all rooms?

Postby Oliver » March 19th, 2010, 10:57 am

btw is there any way to limit the number of rooms running of a particular game and the number of players allowed in each room, or to limit the total number of simultaneous players?


No limits on the amount of rooms, infinite scale :-)

Max 45 people in one room though.
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: "global variables" accessible from all rooms?

Postby Oliver » May 28th, 2010, 8:39 am

Hi Guys,

Just a short note to let you know that we've launched the persistence/database solution

It's called BigDB, and you can read more about it here:

http://playerio.com/features/bigdb/
http://playerio.com/documentation/bigdb/

- Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am


Return to C#