Ogre3D networked game

I’ve implemented networking to a game called “Solarbound” which was my 3rd year group project. The main framework was adopted but recoding was done to trim down and optimise the framework for use with this coursework. A lot of unnecessary features and code were removed so that it would be easier to adapt the framework to introduce a multiplayer network game mode into the framework.

The features of this game include simple enemy AI, collision detection, simple score and health system for players.

The game is based on a client-server protocol. There are two executable files generated by the framework called server.exe and client.exe which are the server and client modules of the game respectively. The server.exe file functions as the host for the game. This file must be run before trying to connect clients. A very simple GUI has been implemented for the server with options to start the server, spawn enemies and also activate and deactivate Dead Reckoning (DR) algorithm. There is also an option to activate and deactivate the simulation of packet loss to further observe the effects of DR. A very simple “God Mode” is also implemented to the server module to enable the user to freely observe the game world in real-time.

The client.exe file connects the player to the server and has options for the user to input individual player names and also to input manually the server’s Internet Protocol (IP). The client also has the option to turn on and off to observe the effects of lag or packet loss artificially simulated by the server. At the moment there is only support of a maximum of 3 players due to the models available.

The overall game play is simple with players competing to outlast and outscore other players by gunning down as many enemies as they can before dying. The players can also shoot each other and each hit will reduce the player’s life by one. The game will be over when the player’s life reaches zero.

There is only one single type of enemy and which implements a simple type of AI. The enemies will spawn at random points in the map and remain static until a player gets into their “detection zone”. They will then start to manoeuvre towards the player and try to ram into the player and self-destruct.

One interesting thing to note is that OGRE3D doesn’t like multiple instances being run. So if you run the client and server on the same computer the application will speed up drastically.

Below are some screenshots from the application. Click on each thumbnail to enlarge the picture.


The executables can be found here

The source code can be found here

Share

Leave a comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.