Category Archives: Networking

Networking assignment


For the networking assignment I plan on doing a really simple League of Legends (LoL) style game with multiple players and a set of about 3 different spells.

I’ll be using the “Arena.fbx” (converted to AIE format to help loading times) and Marv as he character.

Arena level
Arena level preview. The red glitches are the nav mesh (I’ll hide it in game)

The characters will be sort of “Space adventure” rather than the genre of LoL because it suits Marv better.

I’ll be texturing the entire level with a space looking metal texture (maybe tinted blue or something) and the players will just be tinted their colour.

I plan on making it similar to LoL.


So because I had actually not played much of it before I decided to play it, and got dragged into a game with friends (when I say dragged I just mean easily peer pressured because I’m a chump and I’m just procrastinating).

The results were a bit sad:


So after enduring that escapade, I figured the game will appear as follows:

  • Camera’s Z and angle will be locked at a 45 degree angle looking down at the player
  • the player will move around independently of the camera’s X and Z position (the player can move the camera around)
  • The player will use a* to move around a nav mesh when clicked on a certain position
  • The player will have various abilities assigned to certain keys

The players can attack and do spells. Each spell costs mana and has a cooldown. Each character will have the same spells and attacks as I’m going to focus on the networking rather than the depth of the game.

So this is what the players can do:

  • Level up – they start at level 1 and each level takes twice as many points to reach. you gain more and more XP the more you kill players and get hits on players / not dying for ages (multiplier)
  • Attack (more damage per level) (click on enemy)
  • Medkit – heals player over time, has a cooldown (A) (requires level 2)
  • Throw Mine – explodes when player touches it does lots of damage – get 1 every time you die and respawn (S) (requires level 3)
  • Shoot Destroyer Blaser- does lots of damage depending on your level, has a cooldown (D) (requires level 5)



  • Right clicking places a target for player to walk to
  • When a target is places, the player must perform an A* pathfinding search to get to it
  • When the player has found this path, he will have to walk towards it in nodes
  • Once the player is in the last node’s triangle, he will seek out the point directly
  • Player will animate and face the direction he’s walking
  • I won’t worry about player colissions, but if I do, I can check to see if there’s an enemy in the current tri, then check the distance


  • Camera will be locked to a good distance and angle
  • When player moved mouse pointer to a certain distance from the screen’s edge, the camera will move in that direction
  • The camera should have a limit to how far it can be moved in certain directions so player doesn’t get lost (There’s no minimap)


  • Clicking on an enemy will do a spherical collision and attackes will be dealt to that enemy
  • The player will send attacks constantly 1 after the other like a gun
  • Each bullet will fly towards the enemy, if it hits it, it will take damage (spherical collision)
  • The big bullets will move the same speed but will look bigger
  • The mines will basically be the same as big bullets except they won’t move. They will also do the same damage


  • Healing will just be done with a timer and heal a certain amount of player health over time
  • When a player has no health, he dies and is re-spawned in 5 seconds
  • The game ends after a 5 minute timer runs out (or 10 minutes, whatever). The winner is the one with the most kills
  • Or first to 20
  • Player is spawned as far away from the opponent as possible on a random nav point (loop through each nav point and get distance)


Yeah I know, all that other stuff is fluff, but here’s the juice to the orange of assignment:

  • First time you run the program, it asks to be a server or client
  • if you are a client, the client will ask to connect to a server. Once connected, the client will send all player info to the server
  • On the server side, when started the game, the player is put in the game and assigned as player 1. Their colour is random.
  • The server will listen for connections, and if there is one, it will add the new player with its data to the game, and then send the client the server’s player info
  • When the client is connected to the server, it will wait for all players on the server’s info and add all these players to the list on the client side with unique IDs.
  • The client will update its positions and send the server every action that is performed and also the position. Each client or server will then animate each character and move it to the new position. Animations and effects will be done on client side.
  • If a player’s client decides that a player has been hit with a bullet, then that info is sent to the server, the server then tells every client this so it updates its info
  • This info is sent at about 12 times per second (every 0.083 seconds)

Apart from these points, the only other thing would be end game state which will be controlled by the server. The timer will also be synced with the server.

That’s it for now. Happy everything.