Monthly Archives: December 2014

Multiplayer TicTacToe

Project  Link on Github

This project was undertaken as part of my Distributed Systems class in college. The goal of the project was to create a game of TicTacToe that could be played on two different platforms and played cross platform. This project was completed with another person in my class. I wrote the java client for the game while he wrote an android app to play the game. We wrote the server code in python together and used mysql for our database.

The first step was to create the individual clients to play the game locally. I had to create a java client using the swing library for graphics. This wasn’t too hard task as I had experience with the library in previous projects. I had to have a game screen which could be used to play games, a lobby screen used to join games and a login/register screen to log in to the system.


We then had to create the server code. We wrote python scripts and hosted them using XAMPP on one of our laptops. The python scripts were written for each part of the system, to login users, register users, join games, create games, update games and get leaderboard statistics. Each script interacted with the database using mysql and sent the result back to the client using json. We then had a json parser to get the results in the client and check and use each part.


games  users


The clients are able to play cross platform as they both access the server in the same way. This means a user can play on either platform and play opponents on either platform. Game states are updated on the server and update all the clients connected to a game. All the code can be seen on github as well as more screen shots and the full report of the project at this link




Tagged , , , ,

Grifball Manager

I really enjoy the sports management genre to play and likewise I’m really interested in creating games in this genre too. I expanded on things I learned from my Hurling Management game here. The game is based on the game mode Grifball from the Halo series. The goal is simple to get the ball (bomb) into the enemies goal. You can kill your enemies and they will respawn and the game is played in teams. I added a few things to improve the management side of things of the game. For example substitutions can be made in between rounds.

The game simulates rounds of grifball with each team trying to get the ball into the goal. Each tick is 3 seconds and simulates the actions of each player in the game. Players can move in 4 directions, attempt to kill another player if they are in range or do something with the ball if they have possession of it. Their actions are decided by the positions and the roles given to them by the manager. Each of these made it more likely or less likely for them to take certain actions in the game. For example an Attacker set to Berserker is going to try kill everything on the map and does not care about the ball and a Full Defender will hang back even when the ball goes up to be ready on defence if the ball is turned over.

Positions – Role 1 – Role 2 – Role 3

Attacker – Normal – Berserker – Scoring

Scorer – Normal – Full – Playmaker

Defender – Normal – Full – Dynamic




Decision making is done using arrays to store the probabilities of actions and then running random numbers to get the outcome. This is done for each player and they are all updated for each tick. The round will simulate and then give a result to the player at the end. They can then make tactical changes depending on how it went, either by changing positions, mentality or by subbing in new players for the next round. It keeps going until one team wins 4 rounds.




I have also added a simple tournament mode that can have 4 teams play a 2 round knockout tournament. The teams can be selected and the CPU matches will simulate while the player can play his/her own matches. Single matches can also be played in two player mode where the second team can also be user controlled by someone else. Both players set up their tactics independently and start the match to see who wins.

The code can be found on github



Tagged , , , , ,