Skip to content

3D shooter game for the online games subject of videogames development & design bachelor's degree

License

Notifications You must be signed in to change notification settings

Lladruc37/3D-Shooter-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Backfired!: A 3D Shooter Game

We are developing a 3D shooter game for the Networks and Online Games subject of the Videogame Development & Design bachelor's degree. The intended goal is to have 4 different players in the game.

Link to Drive to see the deliveries and link to see the final delivery (UPC Login is required) Link to the GitHub Repository

About the game

Backfired! is an FPS free-for-all where the end goal is to get 5 points. Here's the twist, when you shoot you are also moved backwards, which can be used to jump and move in a fun and unique way. All the players can't move by any other means they would expect.

Networking Aspects

  • Connectivity method: We use UDP since our game is a FPS we want a fast connectivity even if we lose some packets.
  • Syncronization model: We use snapshot interpolation in combination with state interpolation.
  • Network architecture: Our game has a client-server architecture and the server is not authorative since the server is listen-based.
  • Object replication: We have the 4 steps that are recomended (mark, uniquely identify, indicate class, serialize) however we don't send multiple objects per packet since each client only sends their own player object.
  • Object serialization: We use streams to send the data. The structure we use is:
    • Header (information about the packet type and who is sending it).
    • Data (depending on the packet type).
  • Snapshot compression: We use fixed point to send less data losing very little precision. We also use geometry compression to use 3 numbers instead of 4 for the rotation.
  • Latency hiding: We use client side prediction with client side interpolation to have both the smoothness of interpolating between packets and have less frames of delay.
  • Scalability: We use instanciating both for the players and the healthpacks.

Team Contributions:

  • Sergi Colomer: UI, Gameplay, Ping System, Sockets & Ports, Server to Client comunication, Chat, UIDs, Lock protection, Lerping, Closing Connections, Bug Fixing & Optimizations, QA
  • Guillem Alava: UI, Gameplay, Ping System, Scenes Creation & Structure, Chat, UIDs, Lock protection, Lerping, Music & SFX, Closing Connections, Ingame Console, Bug Fixing & Optimizations, QA
  • Carles López: Gameplay, Bug Fixing, QA
  • Núria Lamonja: Bug Fixing, QA

Instructions to start the game:

As of now, Backfired! only works on LAN.

  • If working with 2 or more separate computers:

    • Load HostJoin scene
    • Press "Create" on one PC and "Join" on the others
  • If working on the same computer (as shown in the demo video):

    • Build the project with the following scenes
      • Scenes/HostJoin -> Scene 0
      • Scenes/ServerHost -> Scene 1
      • Scenes/ClientJoin -> Scene 2
    • Open any instances of the .exe generated in the same computer

How to Play

Creating/Joining a lobby:

  • Fill in the input fields and press the corresponding button
    • As the Host, you will be asked for your name and the server's name
    • As a Player, you will be asked for your name and the server's IP

In-game Features:

  • To toggle locking & unlocking the mouse, press [F1].
  • To chat, click on the input field and simply write whatever you want and press Return to send the message.
  • To shoot press [M1]. This is used both for shooting at your enemy and for movement.
  • To look behind you press [M2] or [Left Alt].
  • Use the mouse to control where the camera points.
  • To mute all sound press [F11].
  • To activate the in-game console press [F12].

Changes/Errors fixed from previous delivery:

  • When a player joins, information about all players is sent, even if they aren't moving.
  • The players now spawn in a random spawnpoint of a few. By doing this, we don't have to worry about the problem of spawning inside a building or too close to another player.
  • We added lock protection to the lists that could be modified and read simultaniously.

Known bugs:

  • If the server is completely still when a new client joins mid-game, they won't see this player until they move themselves or even the mouse.
  • Sometimes lerping and correcting the error makes the player jitter trying to correct their position. This is probably because of the difference in ms between sending and recieving messages. It is more clear when you do singular shots, as it is when the position is more dependant in predictions by the program rather than accurate positions sent by the original client.

Credits:

About

3D shooter game for the online games subject of videogames development & design bachelor's degree

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages