/15-466-f21-base6

Base code for game6: Multiplayer (http://graphics.cs.cmu.edu/courses/15-466-f21/game6.html)

Primary LanguageC

Sword, Shield, and Ward

Author: Siheng Li, Wenxuan Ou

Design: It is a real time rock paper scissor simulator where players can drop in and out.

Networking: In client each client sends a header and then 3 bytes denoting which attack they chose. In server, the server sends either an init/update header with the player ids to each client or a message with a size header, as well as messages of [playerid, 3 bytes denoting attack chosen by that player]. The source of truth for the score is generated deterministically locally, which would not be ideal if we have cheaters.

Screen Shot:

Screen Shot Screen Shot

How To Play: Press q, w, e to attack: With less than 4 players, it is basically rock paper scissors. When it is 4 players, swords can hit adjacent players, shields can block adjecent swords, and ward hits the opposite side and wins as long as they don't choose ward.

Sources: Scene created by our own with Blender. Anything in the previous base codes.

This game was built with NEST.