Skip to content

davidkha44/projet-jeu

Repository files navigation

Contributors Forks Stargazers Issues MIT License

ENSEA PLT Project 2021-2022: Royal War

logo

c++ version software version

Table of Contents

Introduction

The [PLT] Projet Logiciel Transversal (Transversal Software Project) is the third year project in specialization [IS] Informatique et Systèmes (computer science and system) at ENSEA.

About the game

Presentation

  • Genre : Strategy Game
  • Players : 1 to 2 players

Royal War is a strategy game that can be played solo against the AI or against an opponent.

Your main objective is to destroy your opponent base.

You have a base and several buildings where you can spawn your troops. Each troops have their own strength and weakness, it falls to you to choose what kind of troops you want.

Rules

Starting

You start with a dragon, a mage, a knight, an archer and a soldier, just like your opponent.

Permitted moves

  • Key M : move mode for the selected character
  • Key A : attack mode for the selected character
  • Key T : pass your turn to your opponent

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

Resynchronize the package index files

sudo apt-get update

Install with apt-get

sudo apt-get install build-essential \
dia \
libsfml-dev libxml2-dev libmicrohttpd-dev libboost-all-dev \
python3 python3-pip \
lcov gcovr

Install python package with pip (or pip3)

pip install gcovr

Install NodeJS sh sudo apt install nodejs

Install the server dependencies sh npm install express socket.io npm install -g localtunnel

Install socket.io and its dependencies

  1. Use git clone --recurse-submodules https://github.com/socketio/socket.io-client-cpp.git to clone your local repo.
  2. Run cmake ./
  3. Run make install(if makefile generated) or open generated project (if project file generated) to build.
  4. Outputs is under ./build, link with the all static libs under ./build/lib and include headers under ./build/include in your client code where you want to use it.
  5. Install the dependencies with sudo apt-get install libjsoncpp-dev rapidjson-dev libasio-dev libwebsocketpp-dev catch

Installation

  1. Clone the repo npm install socket.ionpm install socket.io```sh git clone https://github.com/davidkha44/projet-jeu cd projet-jeu

2. Build it
```sh
projet-jeu$ make

Usage

Basic Testing

Print a hello world message

projet-jeu$ bin/client hello

Render demo

projet-jeu$ bin/client render

Engine demo

projet-jeu$ bin/client engine

Radom AI demo

projet-jeu$ bin/client random_ai

Heuristic AI demo

projet-jeu$ bin/client heuristic_ai

Server

  1. Launch the server with node ./src/server/jsserver/index.js
  2. Run lt --port 3000 --subdomain fredurl
  3. Launch your server with ./bin/server listen <ROOM_NAME>
  4. Join the created room with ./bin/client network <ROOM_NAME>

Release History

  • 1.1

    • Environnement de développement
    • Ressources
    • Rapport section 1 : Présentation générale
    • Code : affichage message ./bin/client hello
  • 1.final

    • Rapport section 2 : Description et Conception des états
    • Code : implantation et tests unitaires états ./bin/client state
  • 2.1

    • Rapport section 3 : Description et Conception du Rendu
    • Code : rendu d’un état ./bin/client render
  • 2.2

    • Rapport section 4 : Règles de changement d’états et moteur de jeu
    • Code : changement d’état ./bin/client engine
  • 2.final

    • Rapport section 5 : Intelligence Artificielle
    • Code : IA random
  • 3.1

    • Rapport section 5 : Intelligence Artificielle
    • Code : IA heuristique
  • 3.final

    • Rapport section 5 : Intelligence Artificielle
    • Code : IA avancée basé sur un arbre de recherche
  • 4.final
    • Rapport section 6 : Modularisation

Built With

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.