Space Invaders Online

Details

  • Type: Tech Demo
  • Platform: PC
  • Language: C++
  • Date: 2023
  • Duration: 3 Weeks

Contribution

This project was made to study general networking theory and how to build networked applications using Windows Socket API (WSA). Space Invaders was chosen for its simplicity as an example game to make using the netcode built using WSA. The game uses a Client-Server Model where each can connect to an authoritative master server that utilizes a lobby system to connect players with each other. The netcode includes many standard features such as Timeout, 3-way-handshake connection process, re-connections and RTT-based disconnection. Many latency handling techniques were implemented as well such as Movement Interpolation, Input Prediction and Server Reconciliation. The Transport Layer of the netcode includes many optimizations as well such as utilizing Bitpacking to pack data into packets of bits instead of bytes which saved over 80% of the normally required bandwidth.