Multiplayer street fighter game

For this module I had to use both JavaScript and C++ to create a multiplayer game. The server was developed using JavaScript, specifically the FXGL engine, which sends messages to the SDL2 client side code in C++. The template given for the project to develop was a pong clone, which with more multiplayer implementation could be handed in to get an ok grade. However, this did not pose enough of a challenge and gave no room for improvement; instead, I turned the template into a fighting game.

Key Features:

  • Multiple threads

  • Raycasting

  • Server side build

  • Strong C++ and JavaScript code

For the multiplayer elements, messages to and from the players are sent through multiple threads. As well as this all the game data is stored on the Server side preventing alterations from players. When decoding player inputs the server will check what player has sent them and, depending on the player, will change the keycodes received enabling multiple players to use the same keys across different devices. In terms of gameplay ray casts are deployed to detect attacks and whether they land on the other player. On the client side animations are made using a fixed update to create an 8-bit style effect for the players using their sprite sheets for the animations.