Forum Games Server time + other back end stuff

Discussion relating to game development with Flash

Server time + other back end stuff

Postby happinesssam » August 11th, 2011, 1:44 pm

I'm looking into making a persistent flash game using bigDb, and I was hoping not to need to use the multiplayer component. So far all I've been trying to do is properly work out how to best use the bigDB classes, but I realized that I need to know the server time - the computer time from flash is not good enough.

I can't see anything that would get me that in the bigDB documentation, so is there an easy way, that doesn't involve writing some of my own php which I would have to host elsewhere? Have I missed something in the bigDB or other code? It looks like I could use the multiplayer stuff to get it, but is this an efficient way of doing it?

While I'm at it could I also use the multiplayer stuff to do things like pre-validate game transactions before updating the bigDB? Or would this create issues?

Thanks.

Edit:And by multiplayer, I just mean by sending messages to the server and getting responses back using c#, not actually using the multiplayer stuff.
happinesssam
 
Posts: 3
Joined: August 8th, 2011, 7:49 am

Re: Server time + other back end stuff

Postby Oliver » August 11th, 2011, 7:39 pm

An easy way to get stuff to run on "server-side" is to use the multiplayer feature. You don´t have to use the multiplayer feature for actual multiplayer gameplay...

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

Re: Server time + other back end stuff

Postby happinesssam » August 13th, 2011, 1:38 pm

Thanks, I have some follow on questions which I'd be very grateful if you could answer, and I apologize if it's a bit obvious, or if I've just missed things that are in the documentation.

    -The hello world example shows the user using createJoinRoom and joining a room, even though all the code is doing is sending 'hello world' back and forth. Does the user need to have joined a room to access any code you've written server side?
    -If so, are there any downsides to having the users immediately join a multiplayer room and stay in it for their entire session?
    -How do you leave a room? If this doesn't matter a user being in a room for their whole session then I guess this doesn't matter either.
    -Are there any limits to how many users can be in a room, if all I'm doing is leaving them there to have access to the server side code could I have 1000+ users in a room?
    -In the hello world example no roomtype is used in the flash code, but in the server code it uses [RoomType("MyGame")]. How does this work - my c# is non existent but I'd like to learn. Can there be more than one GameCode class under different roomTypes? If there's no roomtype specified does there have to be one, or how does it know which to look at? If there can only be one GameCode class what's the point of the RoomType declaration?
happinesssam
 
Posts: 3
Joined: August 8th, 2011, 7:49 am

Re: Server time + other back end stuff

Postby happinesssam » August 13th, 2011, 4:03 pm

Ah, it seems like the roomType is needed, and it's just missing in the helloWorldExample.fla createJoinRoom call. Once I changed it to "MyGame" is works, instead of giving an error.
happinesssam
 
Posts: 3
Joined: August 8th, 2011, 7:49 am

Re: Server time + other back end stuff

Postby Oliver » August 28th, 2011, 12:46 am

-The hello world example shows the user using createJoinRoom and joining a room, even though all the code is doing is sending 'hello world' back and forth. Does the user need to have joined a room to access any code you've written server side?


Yes.

-If so, are there any downsides to having the users immediately join a multiplayer room and stay in it for their entire session?

No. You can use service rooms (join the room with id="$service-room$") in order to have players distributed among many rooms with new rooms added as more users join.

-How do you leave a room? If this doesn't matter a user being in a room for their whole session then I guess this doesn't matter either.


call the .disconnect() method on the connection object.

-Are there any limits to how many users can be in a room, if all I'm doing is leaving them there to have access to the server side code could I have 1000+ users in a room?

Yes: 45 users. That´s why you´d want to use the service rooms, so the webservice can distribute users across multiple rooms.

-In the hello world example no roomtype is used in the flash code, but in the server code it uses [RoomType("MyGame")]. How does this work - my c# is non existent but I'd like to learn. Can there be more than one GameCode class under different roomTypes? If there's no roomtype specified does there have to be one, or how does it know which to look at? If there can only be one GameCode class what's the point of the RoomType declaration?


Each dll can have multiple room types, each identified with the [RoomType(...)] attribute. When creating a room, you specify the room type to create on the serverside.

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

Re: Server time + other back end stuff

Postby asdarty12 » February 16th, 2022, 3:46 pm

happinesssam wrote:Ah, it seems like the roomType is needed, and it's just missing in the helloWorldExample.fla createJoinRoom call. Once I changed it to "MyGame" is works, instead of giving an error.

https://apkmodule.com/app-cloner-premium-mod-apk/
asdarty12
 
Posts: 24
Joined: February 16th, 2022, 2:19 pm


Return to Games



cron