GithubHelp home page GithubHelp logo

cs4513-project4's Introduction

Mitchell Caisse
mwcaisse
CS4513
Project 4

How to Build:

	Before building please make sure the ENG variable in the Makefile contains the correct path to the 
		dragon fly engine for the platform. Also make sure that INCPATH contains the correct path to
		the header / include files for the dragon fly engine.

	make
		Will build both the network manager library and Saucer Shoot 2
		
	make game
		Will build Saucer Shoot 2, and libnetwork.a if it doesn't exist, as it is
			a dependency
	make libnetwork.a
		Will build the network manager library

	make clean
		Will remove all of the build files, including log files, executables, objects, and libnetwork.a
		
How to Run:

	Usage:
		./game -h hostname -p portnumber -n
			
			-h runs the game in client mode, and specifies the host name to connect to
			
			-p specifies the port to connect to / listen on
			
			-n If given starts with network statistics set to true
			
	Example Client:
		
		./game -h ccc3.wpi.edu
			Will launch the game as a client and connect to the host running on ccc3.wpi.edu
			
	Example Host:
	
		./game
			Will launch the game as a host, and listen on the default port
			
Code Structure:

	Network Library:
	
		NetworkManager:
			Contains all of the network specific code for communicating between host and client
			Defines a message protocol for communication, as seen below
				msg-header:
					int opcode         //operation code of the message
					int len            //length of the message body
					int misc           //misc int for various settings
					char* objectType   //a 30 byte long string
				msg-body: The body of the message, variable length specified in header
			Contains methods to send and retrieve messages from the network
			Starts and initializes the connection between the host and client
		
		NetworkSentry:
			Polls the network manager for data and creates network events when data arrives
				
		EventNetwork:
			Internal representation of the message, contains all of the information in the header, and is used to
				communicate messages to objects in the game engine
		
		NetworkStats:
			Game Engine object that collects statistics on the currently open network, such as
				throughput and RTT between client and host.
			Can be enabled / disabled
			
	Game Code:
	
		Host:
			Host game object which responds to network messages sent from the client and takes appropriate action
			
		Client:
			Client game object which responds to network messages sent from the host and takes appropriate action
			
		HostStatus:
			Maintains whether the game is running in host mode or client mode
			Contains pointers to the respective Client and Host objects.
			
		ClientHero:
			A copy of the Hero which runs on the host only, Represents the client's hero.
			All key strokes received by the host get sent to this object.
			
		

cs4513-project4's People

Contributors

mwcaisse avatar

Watchers

James Cloos avatar  avatar  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.