Poseidon's Plunder

Multiplayer capture-the-flag game set underwater. Written in C++.

Setup is a bit complicated- check README.txt for instructions.

Made with a team as a class assignment. I created the initial design and wrote most of the networking code as well as some postprocessing visual effects.

This was a project for my Computer Game Programming course. I came up with the idea, pitched it to the class, and it was selected as one of a small number of games that would be developed. The team consisted of me and three others, all of whom were mostly programmers. In addition to the original idea, I did most of the networking in the game, as well as some postprocessing rendering features.

For the design, my idea was to take a competitive capture-the-flag first person shooter and give it an extra 3D aspect by setting it underwater. In the past I have enjoyed classic multiplayer FPS games like Halo CE, so I wanted to capture that experience, plus have an extra level of situational awareness from enemies that could be above or below you.

The networking code uses a simple client-server model. Communication between the clients and the server happens by opening a socket and writing into and reading from a buffer. The server holds game state information like the location of each player, each harpoon, and the two treasures. It sends this info to the clients, who update their visual display of the other players. Clients have total control over their own movement (so that they don't jitter when the server communication is slow), which they send back to the server to update their player position. This means that in theory a hacked client could move at any speed or teleport around the map, but since it was a small project we decided we were okay with that. Collision only happens serverside, so it can be somewhat jittery, but replicating this logic clientside would have taken more time than we had to work on the project, and we prioritized other things.

To develop this game, we started from a basic C++ example game that the professor had created for one of our assignments, which was a simple first-person movement controller. Since we were in a very minimal environment, the game did not look very exciting, so I wanted to add some visual effects to make it look better. Inspired by postprocessing effects in Unity, I added a subtle vignette effect on the camera which darkens the edge of the screen in order to help players focus on the center. The vignette turns red if you have been shot, which I found to be an effective indicator. I also added depth blur, where further away objects get fuzzier like in real life. Another team member added depth fog to make it look more like the world was underwater.

Each player has only one harpoon they can shoot, both for thematic reasons and to make networking easier (there are a fixed number of objects in the game given a certain player count). An idea I had that didn't make it into the game was to allow players to reel in to their harpoon while it was lodged in the ground in order to zip around the map. Even without this feature, and even though there are some significant flaws (you can clip through the ground sometimes, and you can stun-lock another player by shooting them repeatedly), the game is pretty fun and succeeds in my original design goals.

Screenshot

Controls:

Arrow keys + Enter: navigate menus

WASD + mouse: move (you can swim in any direction!)

Mouse left click: fire harpoon (shoot enemy players to stun them!)

E: grab enemy treasure (bring it back to your own treasure spot to score!)

Download (Windows)

View on GitHub

 

Back to home