Giter Site home page Giter Site logo

zappy's Introduction

PSU Network Unit - Zappy

Subject here

Introduction

This project is about playing a game.
In this game, the goal is to reach level 8.
To elevate to the next level, stones are required and sometimes multiple player must be present.
Differents kinds and quantities of stone are required depending on the level to reach.
Along with stones, food is required to live as they are consumed with time.
Stones and food can be picked up from the ground or dropped to the ground.

The project is composed of 3 modules:

  • The server module [C]:
    • It implements the game and exposes it to clients.
    • It manages clients asynchronously.
    • It has 3 modes: Player mode, UI mode and Administrator mode.
  • The AI module [Python]:
    • It can connect to the server and play the game.
    • It is able to get all the way to level 8.
  • The UI module [Typescript]:
    • It can connect to the server and access custom commands to hook into the state of the game.
    • The server notifies it of every events occuring in the game.
    • It represents the game world as a 3D scene using Three.JS.

Build instructions

Here are the instructions on how to build the different modules of the project on Linux and UNIX-like OSes.

Server

The server module is implemented in C.
It can be found in the server/ folder.

No dependancy is required to build it except gcc and make.

To start the build, do either:

# From the repository root folder
make -C server

# From the server/ folder
make

To restart the build, use make re instead of make

You can then launch it like this:

# From the repository root folder
./server/zappy_server [-n [teams]...] [-f [ticks per second]] [-p [port]] [-h]

# From the server/ folder
./zappy_server [-n [teams]...] [-f [ticks per second]] [-p [port]] [-h]

GUI

The graphical interface is implemented in TypeScript and uses Three.JS.
It can be found in the gui/ folder.

For building the GUI you will need Node (version 9 or above) and NPM.
You can install Node and NPM via NVM or follow the instructions over at nodejs.org.

To start the build, do either:

# From the repository root folder
cd gui

# Install the necessary module
npm install

# Install webpack
npm install -g webpack webpack-cli

# Compile TypeScript and pack the source
webpack

# Launch web server
node .

Note:
The port for the web interface is 33333.

The default port to the server module is 33334 (on localhost).
You can change it via the --serv flag.

Example:

node . --serv=10.14.59.200:8080

zappy's People

Contributors

arthurknoep avatar cedricthomas avatar hirevo avatar maximejen avatar thibautcornolti avatar

Watchers

 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.