Skip to content

A real-time multiplayer slot racing game with retro graphics

License

Notifications You must be signed in to change notification settings

mgreenw/slot-racer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Slot Racer

Authors

  • Nathan Allen
  • Pulkit Jain
  • Max Greenwald

Slot Racer

This is a game that allows multiple players to play slot-car racing against one another

Setup

  1. Use Python 3.7.1: python --version
  2. Setup a virtual env: python -m venv ./venv
  3. Then, activate the vevn: source ./venv/bin/activate
  4. Then, do pip install -r requirements.txt

When done, deactivate the venv: deactivate NOTE: If you don't have glfw3 on your Mac, please do the following:

  • Install brew
  • brew install glfw3

Usage

  1. python run_server.py [HOSTNAME, default='localhost'] [PORT, default=8765]
  2. python run_client.py [HOSTNAME, default='localhost'] [PORT, default=8765]

Code Overview

  • ./slot_racer
    • ./__init__.py: packages the game
    • ./client
      • ./__init__.py: packages the client
      • ./client.py: implements the Client and all its associated functions
      • ./extra.py: implements the extraneous functions this module needs
      • ./renderer.py: implements the Renderer which renders the game
      • ./socket.py: implements the Socket which allows each client to maintain a socket connection to the server
      • ./assets: contains files used to create the explosion effect
        • ./explosion-0.png
        • ./explosion-1.png
        • ./explosion-10.png
        • ./explosion-11.png
        • ./explosion-12.png
        • ./explosion-13.png
        • ./explosion-14.png
        • ./explosion-15.png
        • ./explosion-16.png
        • ./explosion-2.png
        • ./explosion-3.png
        • ./explosion-4.png
        • ./explosion-5.png
        • ./explosion-6.png
        • ./explosion-7.png
        • ./explosion-8.png
        • ./explosion-9.png
        • ./explosion.gif
    • ./communication
      • ./__init__.py: packages the communication
      • ./serializer.py: implements the Serializer used by clients and servers to communicate with one another
    • ./game
      • ./__init__.py: packages the game itself
      • ./physics
        • ./__init__.py: packages the physics module
        • ./physics.py: contains all the helper functions that allow us to conduct physics
      • ./state
        • ./__init__.py: packages the state of the game
        • ./extra.py: implements extraneous definitions used by the state
        • ./state.py: implements the state of the game itself. Specifically, the Car and the Track
        • ./test.py: implements tests for the state
    • ./server
      • ./__init__.py: packages the server
      • ./extra.py: implements extraneous definitions used by the server
      • ./server.py: implements the Server and all its associated functions

About

A real-time multiplayer slot racing game with retro graphics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages