Giter Site home page Giter Site logo

rohanmenon92 / networkingcoursework Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 15.24 MB

Networking coursework during my course at abertay where I created a game where you can fire at a target and use a shield to bounce back shots. Uses a simple server to client architecture. Start a server on your project and connect multiple clients to it.

C++ 96.56% CMake 3.44%

networkingcoursework's Introduction

NetworkingCoursework:

Networking coursework during my course at abertay where I created a game where you can fire at a target and use a shield to bounce back shots.

Video Link: https://youtu.be/0DpAjEppBFA Report: https://github.com/RohanMenon92/NetworkingCoursework/blob/master/1901120-NetworkGameReport.pdf

Description:

The game is a simple game where a server needs to be run first and then multiple clients can connect to it. Each client has a Player associated with it that can fire Bullets that are associated with the player.

Communication is done with TCP from client to server and a stream UDP from server to client. This is to prevent cheating and also ensure that all clients are receiving the same instance of the game. I use dead reckoning and interpolation for rendering on the client. The server world is the one that decides the game rules and positioning of all objects in the world.

Instructions:

Start by running the application and inputting ‘s’ in the terminal to start a Server. Then open another instance of the application and put in ‘c’ and input a username and server ip address to start a Client.

  • If a Bullet hits a player, it reduces it’s health by 1 if it is not shielded.
  • If it is shielded, the bullet will change colour to the player’s colour and bounce off of it.

Controls:

  • W or Right Click: Move the player towards current mouse position
  • S or Middle Mouse: Put a shield and prevent player movement
  • SPACE or Left Click: Fire a bullet towards the mouse position

Screenshots

Server and log

Clients and log

networkingcoursework's People

Contributors

rohanmenon92 avatar

Stargazers

Melnik Irina avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.