Skip to main content
replaced http://gamedev.stackexchange.com/ with https://gamedev.stackexchange.com/
Source Link

About 8 months ago, I asked this questionquestion, and received a lot of valuable information from the community.

I have switched to nodejs, since then, and am finishing up my game. I am deeply concerned about networking issues pertaining to the usage of WebSocket data being sent through my current architecture; especially since my game uses an authoritarian server, and doesn't utilize peer to peer.

My game is a Diablo 2 inspired action RPG. As we know, for action RPGs, players utilize a lot of skills, and if games are instanced based, all players in the game need to be notified.


I am worried about scalability. Here is an example:

Shooting a fireball has a 0.5 second cool-down. This is how the data is sent:

  • Client [Skill id, Skill rotation] -> Server
  • Server [Checks cooldown, notify's players skill is being used]
  • Client [If fireball hits monster, send attack signal] -> Server
  • Server [Checks cooldown, player's range to mob, calculates damage, etc & spits out damage numbers to all players]

All this happens in less than 1 second. The WebSocket server is not even sending out the Monster AI update packets to do damage to the player, nor the monster's fireballs. So now, basically double the amount of data is being sent through the WebSocket and to all player's in a game. It gets worse; imagine if 20 players are online attacking monsters. My nodejs server will be on fire.

This method is not even 100% cheat proof, as I'm waiting for the fireball to hit the monster on the client-side to send the attack signal, instead of doing all that on the server. The problem is, I would have to be running a physics engine on the server, which would bog down nodejs's event loop even more. I'm using the P2 Physics engine from Phaser, and not simple AABB; otherwise, I could just check for collisions server-side.

To close, when a player moves around the map, the server notifys everyone else in the same game. The same goes for when a player drops an item, or when loot is generated from a monster. I just feel like I'm clogging my WebSocket server up, and am doing something wrong with all this data being sent across the pipe.


So with all this said,

  • Am I worrying too much about the amount of data being sent across WebSockets?

  • Is this data being sent normal for a games that utilizes an authoritarian server?

  • Would a Redis Pub Sub system be an ideal solution to my problems?

About 8 months ago, I asked this question, and received a lot of valuable information from the community.

I have switched to nodejs, since then, and am finishing up my game. I am deeply concerned about networking issues pertaining to the usage of WebSocket data being sent through my current architecture; especially since my game uses an authoritarian server, and doesn't utilize peer to peer.

My game is a Diablo 2 inspired action RPG. As we know, for action RPGs, players utilize a lot of skills, and if games are instanced based, all players in the game need to be notified.


I am worried about scalability. Here is an example:

Shooting a fireball has a 0.5 second cool-down. This is how the data is sent:

  • Client [Skill id, Skill rotation] -> Server
  • Server [Checks cooldown, notify's players skill is being used]
  • Client [If fireball hits monster, send attack signal] -> Server
  • Server [Checks cooldown, player's range to mob, calculates damage, etc & spits out damage numbers to all players]

All this happens in less than 1 second. The WebSocket server is not even sending out the Monster AI update packets to do damage to the player, nor the monster's fireballs. So now, basically double the amount of data is being sent through the WebSocket and to all player's in a game. It gets worse; imagine if 20 players are online attacking monsters. My nodejs server will be on fire.

This method is not even 100% cheat proof, as I'm waiting for the fireball to hit the monster on the client-side to send the attack signal, instead of doing all that on the server. The problem is, I would have to be running a physics engine on the server, which would bog down nodejs's event loop even more. I'm using the P2 Physics engine from Phaser, and not simple AABB; otherwise, I could just check for collisions server-side.

To close, when a player moves around the map, the server notifys everyone else in the same game. The same goes for when a player drops an item, or when loot is generated from a monster. I just feel like I'm clogging my WebSocket server up, and am doing something wrong with all this data being sent across the pipe.


So with all this said,

  • Am I worrying too much about the amount of data being sent across WebSockets?

  • Is this data being sent normal for a games that utilizes an authoritarian server?

  • Would a Redis Pub Sub system be an ideal solution to my problems?

About 8 months ago, I asked this question, and received a lot of valuable information from the community.

I have switched to nodejs, since then, and am finishing up my game. I am deeply concerned about networking issues pertaining to the usage of WebSocket data being sent through my current architecture; especially since my game uses an authoritarian server, and doesn't utilize peer to peer.

My game is a Diablo 2 inspired action RPG. As we know, for action RPGs, players utilize a lot of skills, and if games are instanced based, all players in the game need to be notified.


I am worried about scalability. Here is an example:

Shooting a fireball has a 0.5 second cool-down. This is how the data is sent:

  • Client [Skill id, Skill rotation] -> Server
  • Server [Checks cooldown, notify's players skill is being used]
  • Client [If fireball hits monster, send attack signal] -> Server
  • Server [Checks cooldown, player's range to mob, calculates damage, etc & spits out damage numbers to all players]

All this happens in less than 1 second. The WebSocket server is not even sending out the Monster AI update packets to do damage to the player, nor the monster's fireballs. So now, basically double the amount of data is being sent through the WebSocket and to all player's in a game. It gets worse; imagine if 20 players are online attacking monsters. My nodejs server will be on fire.

This method is not even 100% cheat proof, as I'm waiting for the fireball to hit the monster on the client-side to send the attack signal, instead of doing all that on the server. The problem is, I would have to be running a physics engine on the server, which would bog down nodejs's event loop even more. I'm using the P2 Physics engine from Phaser, and not simple AABB; otherwise, I could just check for collisions server-side.

To close, when a player moves around the map, the server notifys everyone else in the same game. The same goes for when a player drops an item, or when loot is generated from a monster. I just feel like I'm clogging my WebSocket server up, and am doing something wrong with all this data being sent across the pipe.


So with all this said,

  • Am I worrying too much about the amount of data being sent across WebSockets?

  • Is this data being sent normal for a games that utilizes an authoritarian server?

  • Would a Redis Pub Sub system be an ideal solution to my problems?

grammar punctuation and format; removed scale tag (not about geometry scaling); removed request for "is this how x game does it" (can not tell you how diablo 2, path of exile, etc. does it and as such these questions are offtopic)
Source Link
Gnemlock
  • 5.3k
  • 5
  • 30
  • 60

About 8 months ago, I madeasked this threadquestion. And, and received a lot of valuable information from the community.

I have switched to nodejs, since then, and am finishing up my game, but. I am deeply concerned about networking issues pertaining aroundto the usage of WebsocketWebSocket data being sent through my current architecture. Especiallyarchitecture; especially since my game uses an authoritarian server, and doesn't utilize P2Ppeer to peer.

My game is a Diablo 2 inspired, action rpgRPG. And asAs we know, for action rpg'sRPGs, players utilize a lot of skills, and if games are instanced based, all players in those gamesthe game need to be notified.

 

I am worried about Scalability because of thisscalability. Here is an example:   

Shooting a fireball has a 0.5s cooldown5 second cool-down. And thisThis is how the data is sent:

-

Client [Skill id, Skill rotation] -> Server

Server [Checks cooldown, notify's players skill is being used]

Client [If fireball hits monster, send attack signal] -> Server

Server [Checks cooldown, player's range to mob, calculates damage, etc & spits out damage numbers to all players]

  • Client [Skill id, Skill rotation] -> Server
  • Server [Checks cooldown, notify's players skill is being used]
  • Client [If fireball hits monster, send attack signal] -> Server
  • Server [Checks cooldown, player's range to mob, calculates damage, etc & spits out damage numbers to all players]

-

 

And allAll this happens in less than 1 second. And the WebsocketThe WebSocket server is not even sending out the Monster AI update packets as well to do damage to the player. Or, nor the monster's fireballs.. soSo now, basically double the amount of data is being sent through the WebsocketWebSocket and to all player's in a game. And itIt gets worse, nowworse; imagine if 20 players are online attacking monsters. My nodejs server will be on fire.

This method is not even 100% cheat proof, as I'm waiting for the fireball to hit the monster on the client-side to send the attack signal, instead of doing all that on the server. The problem is, I would have to be running a physics engine on the server, which would bog down nodejs's event loop even more. (Since I'm using the P2 Physics engine from Phaser), and not simple AABB (otherwiseAABB; otherwise, I could just check for collisions server-side for that).

To close, butwhen a player moves around the map, the server notifys everyone else in any eventthe same game. The same goes for when a player drops an item, or when loot is generated from a monster. I just feel like I'm clogging my WebSocket server up, and am doing something wrong with all this data being sent across the pipe.

 
  • Am I worrying too much about the amount of data being sent across WebsocketsWebSockets?

  • Is this data being sent normal compared to otherfor a games that utilize utilizes an authoritarian server? For example, games like Path of Exile, Diablo 3, etc.

  • Would a Redis Pub Sub system be an ideal solution to my problems?

To close, when a player moves around the map the server notify's everyone else in the same game as well. Same goes for when a player drops an item, or when loot is generated from a monster. I just feel like I'm clogging my Websocket server up and am doing something wrong with all this data being sent across the pipe. I'm sorry for such a long post, but I just feel like something isn't right in my design.

About 8 months ago I made this thread. And received a lot of valuable information from the community.

I have switched to nodejs since then and am finishing up my game, but am deeply concerned about networking issues pertaining around the usage of Websocket data being sent through my current architecture. Especially since my game uses an authoritarian server and doesn't utilize P2P.

My game is a Diablo 2 inspired, action rpg. And as we know for action rpg's, players utilize a lot of skills and if games are instanced based, all players in those games need to be notified.

I am worried about Scalability because of this:  

Shooting a fireball has a 0.5s cooldown. And this is how the data is sent:

-

Client [Skill id, Skill rotation] -> Server

Server [Checks cooldown, notify's players skill is being used]

Client [If fireball hits monster, send attack signal] -> Server

Server [Checks cooldown, player's range to mob, calculates damage, etc & spits out damage numbers to all players]

-

And all this happens in less than 1 second. And the Websocket server is not even sending out the Monster AI update packets as well to do damage to the player. Or the monster's fireballs.. so now, basically double the amount of data being sent through the Websocket and to all player's in a game. And it gets worse, now imagine if 20 players are online attacking monsters. My nodejs server will be on fire.

This method is not even 100% cheat proof as I'm waiting for the fireball to hit the monster on the client-side to send the attack signal instead of doing all that on the server. The problem is I would have to be running a physics engine on the server, which would bog down nodejs's event loop even more. (Since I'm using the P2 Physics engine from Phaser) and not simple AABB (otherwise, I could just check for collisions server-side for that), but in any event...

  • Am I worrying too much about the amount of data being sent across Websockets?

  • Is this data being sent normal compared to other games that utilize an authoritarian server? For example, games like Path of Exile, Diablo 3, etc.

  • Would a Redis Pub Sub system be an ideal solution to my problems?

To close, when a player moves around the map the server notify's everyone else in the same game as well. Same goes for when a player drops an item, or when loot is generated from a monster. I just feel like I'm clogging my Websocket server up and am doing something wrong with all this data being sent across the pipe. I'm sorry for such a long post, but I just feel like something isn't right in my design.

About 8 months ago, I asked this question, and received a lot of valuable information from the community.

I have switched to nodejs, since then, and am finishing up my game. I am deeply concerned about networking issues pertaining to the usage of WebSocket data being sent through my current architecture; especially since my game uses an authoritarian server, and doesn't utilize peer to peer.

My game is a Diablo 2 inspired action RPG. As we know, for action RPGs, players utilize a lot of skills, and if games are instanced based, all players in the game need to be notified.

 

I am worried about scalability. Here is an example: 

Shooting a fireball has a 0.5 second cool-down. This is how the data is sent:

  • Client [Skill id, Skill rotation] -> Server
  • Server [Checks cooldown, notify's players skill is being used]
  • Client [If fireball hits monster, send attack signal] -> Server
  • Server [Checks cooldown, player's range to mob, calculates damage, etc & spits out damage numbers to all players]
 

All this happens in less than 1 second. The WebSocket server is not even sending out the Monster AI update packets to do damage to the player, nor the monster's fireballs. So now, basically double the amount of data is being sent through the WebSocket and to all player's in a game. It gets worse; imagine if 20 players are online attacking monsters. My nodejs server will be on fire.

This method is not even 100% cheat proof, as I'm waiting for the fireball to hit the monster on the client-side to send the attack signal, instead of doing all that on the server. The problem is, I would have to be running a physics engine on the server, which would bog down nodejs's event loop even more. I'm using the P2 Physics engine from Phaser, and not simple AABB; otherwise, I could just check for collisions server-side.

To close, when a player moves around the map, the server notifys everyone else in the same game. The same goes for when a player drops an item, or when loot is generated from a monster. I just feel like I'm clogging my WebSocket server up, and am doing something wrong with all this data being sent across the pipe.

 
  • Am I worrying too much about the amount of data being sent across WebSockets?

  • Is this data being sent normal for a games that utilizes an authoritarian server?

  • Would a Redis Pub Sub system be an ideal solution to my problems?

added 25 characters in body
Source Link

About 8 months ago I made this thread. And received a lot of valuable information from the community.

I have switched to nodejs since then and am finishing up my game, but am deeply concerned about networking issues pertaining around the usage of Websocket data being sent through my current architecture. Especially since my game uses an authoritarian server and doesn't utilize P2P.

My game is a Diablo 2 inspired, action rpg. And as we know for action rpg's, players utilize a lot of skills and if games are instanced based, all players in those games need to be notified.

I am worried about Scalability because of this:

Shooting a fireball has a 0.5s cooldown. And this is how the data is sent:

-

Client [Skill id, Skill rotation] -> Server

Server [Checks cooldown, notify's players skill is being used]

Client [If fireball hits monster, send attack signal] -> Server

Server [Checks cooldown, player's range to mob, calculates damage, etc & spits out damage numbers to all players]

-

And all this happens in less than 1 second. And the Websocket server is not even sending out the Monster AI update packets as well to do damage to the player. Or the monster's fireballs.. so now, basically double the amount of data being sent through the Websocket and to all player's in a game. And it gets worse, now imagine if 20 players are online attacking monsters. My nodejs server will be on fire.

This method is not even 100% cheat proof as I'm waiting for the fireball to hit the monster on the client-side to send the attack signal instead of doing all that on the server. The problem is I would have to be running a physics engine on the server, which would bog down nodejs's event loop even more. (Since I'm using the P2 Physics engine from Phaser) and not simple AABB (otherwise, I could just check for collisions server-side for that), but in any event...

So with all this said,

  • Am I worrying too much about the amount of data being sent across Websockets?

  • Is this data being sent normal compared to other games that utilize an authoritarian server? For example, games like Path of Exile, Diablo 3, etc.

  • Would a Redis Pub Sub system be an ideal solution to my problems?

To close, when a player moves around the map the server notify's everyone else in the same game as well. Same goes for when a player drops an item, or when loot is generated from a monster, or whatever. I just feel like I'm clogging my Websocket server up and am doing something wrong with all this data being sent across the pipe. I'm sorry for such a long post, but I just feel like something isn't right in my design.

About 8 months ago I made this thread. And received a lot of valuable information from the community.

I have switched to nodejs since then and am finishing up my game, but am deeply concerned about networking issues pertaining around the usage of Websocket data being sent through my current architecture. Especially since my game uses an authoritarian server and doesn't utilize P2P.

My game is a Diablo 2 inspired, action rpg. And as we know for action rpg's, players utilize a lot of skills and if games are instanced based, all players in those games need to be notified.

I am worried about Scalability because of this:

Shooting a fireball has a 0.5s cooldown. And this is how the data is sent:

-

Client [Skill id, Skill rotation] -> Server

Server [Checks cooldown, notify's players skill is being used]

Client [If fireball hits monster, send attack signal] -> Server

Server [Checks cooldown, player's range to mob, spits out damage numbers to all players]

-

And all this happens in less than 1 second. And the Websocket server is not even sending out the Monster AI update packets as well to do damage to the player. Or the monster's fireballs.. so now, basically double the amount of data being sent through the Websocket and to all player's in a game. And it gets worse, now imagine if 20 players are online attacking monsters. My nodejs server will be on fire.

This method is not even 100% cheat proof as I'm waiting for the fireball to hit the monster on the client-side to send the attack signal instead of doing all that on the server. The problem is I would have to be running a physics engine on the server, which would bog down nodejs's event loop even more. (Since I'm using the P2 Physics engine from Phaser) and not simple AABB (otherwise, I could just check for collisions server-side for that), but in any event...

So with all this said,

  • Am I worrying too much about the amount of data being sent across Websockets?

  • Is this data being sent normal compared to other games that utilize an authoritarian server? For example, games like Path of Exile, Diablo 3, etc.

  • Would a Redis Pub Sub system be an ideal solution to my problems?

To close, when a player moves around the map the server notify's everyone else in the same game as well. Same goes for when a player drops an item, or when loot is generated from a monster, or whatever. I just feel like I'm clogging my Websocket server up and am doing something wrong with all this data being sent across the pipe. I'm sorry for such a long post, but I just feel something isn't right in my design.

About 8 months ago I made this thread. And received a lot of valuable information from the community.

I have switched to nodejs since then and am finishing up my game, but am deeply concerned about networking issues pertaining around the usage of Websocket data being sent through my current architecture. Especially since my game uses an authoritarian server and doesn't utilize P2P.

My game is a Diablo 2 inspired, action rpg. And as we know for action rpg's, players utilize a lot of skills and if games are instanced based, all players in those games need to be notified.

I am worried about Scalability because of this:

Shooting a fireball has a 0.5s cooldown. And this is how the data is sent:

-

Client [Skill id, Skill rotation] -> Server

Server [Checks cooldown, notify's players skill is being used]

Client [If fireball hits monster, send attack signal] -> Server

Server [Checks cooldown, player's range to mob, calculates damage, etc & spits out damage numbers to all players]

-

And all this happens in less than 1 second. And the Websocket server is not even sending out the Monster AI update packets as well to do damage to the player. Or the monster's fireballs.. so now, basically double the amount of data being sent through the Websocket and to all player's in a game. And it gets worse, now imagine if 20 players are online attacking monsters. My nodejs server will be on fire.

This method is not even 100% cheat proof as I'm waiting for the fireball to hit the monster on the client-side to send the attack signal instead of doing all that on the server. The problem is I would have to be running a physics engine on the server, which would bog down nodejs's event loop even more. (Since I'm using the P2 Physics engine from Phaser) and not simple AABB (otherwise, I could just check for collisions server-side for that), but in any event...

So with all this said,

  • Am I worrying too much about the amount of data being sent across Websockets?

  • Is this data being sent normal compared to other games that utilize an authoritarian server? For example, games like Path of Exile, Diablo 3, etc.

  • Would a Redis Pub Sub system be an ideal solution to my problems?

To close, when a player moves around the map the server notify's everyone else in the same game as well. Same goes for when a player drops an item, or when loot is generated from a monster. I just feel like I'm clogging my Websocket server up and am doing something wrong with all this data being sent across the pipe. I'm sorry for such a long post, but I just feel like something isn't right in my design.

Source Link
Loading