Forum Games Network game. Some newbie questions. Help please

Discussion relating to game development with Flash

Network game. Some newbie questions. Help please

Postby serginiomd » June 14th, 2017, 11:28 am

Hi guys!

I want to do in Flash a network game like multiplayer, but the main task it's that each player must to see it's own game screen.
The players must to send to server it's own information and after that all players must to receive the final result from server.
There must to be hundreds or thousands of players in the same time...

Can you help me with some advices, please?

Below are my main/big questions:

1) Can I do this with PlayerIO platform?

2) If I understood correctly, all players joined to a room are seeing the same game screen, right?
It's there a way to manage the players to show for each it's own game screen?
PS: there must to be more-more players ...

3) If I'm right in the p. [2] I thought that to use for each player a separate room which send data to server and after that the server broadcast them all the final results ...
Maybe there are another ways to solve this?

Help/guide me to find the best solution for this case, please!

4) How much rooms can run in the same time if there will be let's say unlimited number of players (and each player in separate room) ?
And how it can affect the server/game speed and productivity?

Thank you in advance!
serginiomd
 
Posts: 4
Joined: June 12th, 2017, 3:12 pm

Re: Network game. Some newbie questions. Help please

Postby robscherer123 » June 14th, 2017, 12:34 pm

Hello, I run a Flash MMO which uses this service. And yes it can work great. I'll try to answer some of the questions you have.


1. Can you do thousands of players at the same time? This really depends on exactly what you mean. Generally speaking, yes you can have a near limitless amount of players playing at once. Generally you can NOT however have thousands of players in a single "room" or area of the game playing at once. You should design your game in a way that it is broken up into separate rooms, probably limiting each to around 50 or so players.

2, 3: I'm not quite sure if you have a complete full understanding of how the service works. Each "room" is a separate chunk of code running on the server. Players connect to rooms, and if your game is multiplayer then generally multiple players will connect to the same room. The "room" will then receive and send information to/from the players. It is the job of the developer to update each players client (Flash in this case) to match what is on the server. You might want to read through this tutorial which explains a lot: https://playerio.com/documentation/tuto ... -tutorial/

Also, I'd suggest fooling around with the examples they have packaged in the SDK if you are still having trouble with it.

4: You can have as many rooms running as you would like. It is up to you to decide how you would like to split the players into rooms.
robscherer123
Paid Member
 
Posts: 313
Joined: December 12th, 2012, 8:46 pm

Re: Network game. Some newbie questions. Help please

Postby serginiomd » June 14th, 2017, 1:18 pm

robscherer123 wrote:Hello, I run a Flash MMO which uses this service. And yes it can work great. I'll try to answer some of the questions you have.


1. Can you do thousands of players at the same time? This really depends on exactly what you mean. Generally speaking, yes you can have a near limitless amount of players playing at once. Generally you can NOT however have thousands of players in a single "room" or area of the game playing at once. You should design your game in a way that it is broken up into separate rooms, probably limiting each to around 50 or so players.

2, 3: I'm not quite sure if you have a complete full understanding of how the service works. Each "room" is a separate chunk of code running on the server. Players connect to rooms, and if your game is multiplayer then generally multiple players will connect to the same room. The "room" will then receive and send information to/from the players. It is the job of the developer to update each players client (Flash in this case) to match what is on the server. You might want to read through this tutorial which explains a lot: https://playerio.com/documentation/tuto ... -tutorial/

Also, I'd suggest fooling around with the examples they have packaged in the SDK if you are still having trouble with it.

4: You can have as many rooms running as you would like. It is up to you to decide how you would like to split the players into rooms.


Thank you "robscherer123" for answer and trying to help me.
Seems I didn't understood all the SDK, maybe ...

Sure, I allready read the main part of tutorial and tried the FridgeMagnets sample ... from there I saw the multiple players in one room and all players in one game screen (as it is normal way in a multiplayer game), but I'm still confused how to do single game screen for each user ...

PS: How I saw in a room can be maximum 45 players ... it will be great to be more ...
serginiomd
 
Posts: 4
Joined: June 12th, 2017, 3:12 pm

Re: Network game. Some newbie questions. Help please

Postby Henrik » June 15th, 2017, 2:46 am

serginiomd wrote:1) Can I do this with PlayerIO platform?

2) If I understood correctly, all players joined to a room are seeing the same game screen, right?
It's there a way to manage the players to show for each it's own game screen?
PS: there must to be more-more players ...

3) If I'm right in the p. [2] I thought that to use for each player a separate room which send data to server and after that the server broadcast them all the final results ...
Maybe there are another ways to solve this?

Help/guide me to find the best solution for this case, please!

4) How much rooms can run in the same time if there will be let's say unlimited number of players (and each player in separate room) ?
And how it can affect the server/game speed and productivity?

Hey,

1) Yes.

2) All player connected to the same room can exchange data in realtime with each other. That's it. The FridgeMagnets example shows how everyone's actions are sent in from their client to the server, and the server just broadcasts all those actions out to everyone else, and everyone's client updates the view of the game accordingly.

You choose exactly what each client shows based on the data it receives, and your server can do whatever it wants with the messages it receives. If your server receives a message it can process it and not send out anything, or send something out to a single player, or some, or all of them. This completely depends on your game and what data you need where.

3) It's not possible to send data between multiplayer rooms. The most common way to use the Multiplayer feature is to let each room represent a group of players that are playing the same game together, for example a poker table, or a multiplayer deathmatch map. The server keeps track of the game state, who's winning, who's losing, and sends out information to all the clients so they can display the game state to each user. Each game client sends in the actions of the player to the server, who then updates the game state, etc.

4) We have a concept called service rooms which is for the case when each player just needs to be connected to a multiplayer server, any server, so that you can run game code securely for each user. But if you need to exchange messages between players, they all need to be in the same room. One player per room doesn't really make sense to do, you should use service rooms for that case.
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: Network game. Some newbie questions. Help please

Postby serginiomd » June 15th, 2017, 10:10 pm

Henrik wrote:Hey,

1) Yes.

2) All player connected to the same room can exchange data in realtime with each other. That's it. The FridgeMagnets example shows how everyone's actions are sent in from their client to the server, and the server just broadcasts all those actions out to everyone else, and everyone's client updates the view of the game accordingly.

You choose exactly what each client shows based on the data it receives, and your server can do whatever it wants with the messages it receives. If your server receives a message it can process it and not send out anything, or send something out to a single player, or some, or all of them. This completely depends on your game and what data you need where.

3) It's not possible to send data between multiplayer rooms. The most common way to use the Multiplayer feature is to let each room represent a group of players that are playing the same game together, for example a poker table, or a multiplayer deathmatch map. The server keeps track of the game state, who's winning, who's losing, and sends out information to all the clients so they can display the game state to each user. Each game client sends in the actions of the player to the server, who then updates the game state, etc.

4) We have a concept called service rooms which is for the case when each player just needs to be connected to a multiplayer server, any server, so that you can run game code securely for each user. But if you need to exchange messages between players, they all need to be in the same room. One player per room doesn't really make sense to do, you should use service rooms for that case.


Thank you Henrik for your help, it's VERY useful (like robscherer123's help too).

Now it's more clear after your deeply explanations, but some questions remain in the air ...

I understood that I can group users by rooms, but in a room can be maximum 45 players ...

Can you advice me in which mode can I group another players if there will be 500 or more, even 5000..unlimited ?

Sure, I can create the another groups as 45 players/room, but in server's source code (how I understood from explanations above) must to be a chunk of code running for each Room ...

How to proceed and manage it in this case?

In which way to attach the code for First Room to another, if the actions must to be the same, excepting that need to send actions to another rooms ?
(By me, it can be parametrized methods, but it's not clear yet in which way and if the SDK allow to do this...)

It's like a BIG betting table which run in real-time, where one of the players manage the process ...

Sorry, I'm puzzled ...
serginiomd
 
Posts: 4
Joined: June 12th, 2017, 3:12 pm

Re: Network game. Some newbie questions. Help please

Postby Henrik » June 15th, 2017, 11:02 pm

Multiplayer rooms allow all players in a room to exchange messages with each other, in realtime.

It sounds to me that that's not the case for your game. Rather you have one player at a time running your "betting table" thing, and everyone else around that table needs to receive updates.

In that case, you can use BigDB to share state and updates between rooms.

Every player connects to a service room, because it doesn't matter which player is in which room. The game room will check a BigDB object for updates, and broadcast those to all its players. The current active player will do his thing, send his updates to his game room, which will update the BigDB object, and from there it will fan out to everyone else.
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: Network game. Some newbie questions. Help please

Postby serginiomd » June 16th, 2017, 1:24 am

Henrik wrote:Multiplayer rooms allow all players in a room to exchange messages with each other, in realtime.

It sounds to me that that's not the case for your game. Rather you have one player at a time running your "betting table" thing, and everyone else around that table needs to receive updates.

In that case, you can use BigDB to share state and updates between rooms.

Every player connects to a service room, because it doesn't matter which player is in which room. The game room will check a BigDB object for updates, and broadcast those to all its players. The current active player will do his thing, send his updates to his game room, which will update the BigDB object, and from there it will fan out to everyone else.


Thank you Henrik, seems that your solution save us.

Hope there it's not a problem to manage a few of betting tables. :)
serginiomd
 
Posts: 4
Joined: June 12th, 2017, 3:12 pm

Re: Network game. Some newbie questions. Help please

Postby asdarty12 » February 16th, 2022, 2:37 pm

Henrik wrote:Multiplayer rooms allow all players in a room to exchange messages with each other, in realtime.

It sounds to me that that's not the case for your game. Rather you have one player at a time running your "betting table" thing, and everyone else around that table needs to receive updates.

In that case, you can use BigDB to share state and updates between rooms.

Every player connects to a service room, because it doesn't matter which player is in which room. The game room will check a BigDB object for updates, and broadcast those to all its players. The current active player will do his thing, send his updates to his game room, which will update the BigDB object, and from there it will fan out to everyone else.

https://apkmodule.com/automatic-call-recorder-pro-mod-apk/
asdarty12
 
Posts: 24
Joined: February 16th, 2022, 2:19 pm


Return to Games