Giter Club home page Giter Club logo

maximepremont / zappy_epitech Goto Github PK

View Code? Open in Web Editor NEW
15.0 3.0 3.0 269.72 MB

Epitech project : multiplayer game played by artificial intelligences and viewed by a graphical AR interface.

Home Page: https://github.com/MaximePremont/Zappy_Epitech

License: MIT License

Makefile 0.30% Python 2.30% C# 25.28% ShaderLab 15.15% HLSL 2.30% ASP.NET 44.78% C++ 0.30% C 9.59%
epitech game augmented-reality zappy artificial-intelligence c python cpp csharp

zappy_epitech's Introduction

⚡️ Zappy

Epitech Project, 2022 | 2nd Year (PGE) GUI

🔍 Description

The goal of the project is to develop a network game that artificial intelligences will play as a team in order to win the game. The goal of the game itself is to survive and reproduce by collecting resources to perform rituals and level up. The first AI team to reach level 8 wins the game. The zappy project is separated into three distinct parts :
       1️⃣  Server : Allows the progress of the game by establishing communication with the artificial intelligences.
       2️⃣  GUI : Graphical interface connecting to the server in order to follow the progress of the game.
       3️⃣  AI : Client connecting to server to play automatically.

Schema The official subject is available here, and the graphic protocol that inspired us here.
📄 We were also able to write documentation, available here.

⚙️ Installation

git clone https://github.com/MaximePremont/zappy_epitech.git
cd zappy_epitech
pip3 install -r requirements.txt
make

📝 Start project

Launch the server

./zappy_server -p port -x width -y height -n name1 name2 ... -c clientsNb -f freq

Launch the GUI

./zappy_gui

Launch the AI, it will next create one process per instance.

./zappy_ai -p port -n name -h machine

For more information, the documentation is available here.

🚀 Development

1️⃣  Server

Developped in C
The server controls the data, and sends the information requested by the different clients.
It uses the TCP protocol, and has been developed in a non-blocking way and able to manage several connections using select. In addition, several good practices have been implemented such as the management of transmitted data using buffers.

It consists of a network layer that handles the clients, and a business layer that handles the players. The separation of these two layers allows a total modularity of each part.

2️⃣  GUI

Developped in C# with Unity
To have a better vision of the game, which is simple, clear and ergonomic, we made a user interface with the Unity engine.

In the game, you can see the different islands that represent the tiles of the map. Each island contains food and minerals. The players move between the islands to collect resources. In real time, the information of the map are displayed, as well as the broadcast of the players that can be deciphered. By clicking on the islands or players, we can see what they contain (resources, inventory, …)

GUI

3️⃣  AI

Developped in Python3
Each player of the game is by default inactive, to animate a player the artificial intelligence must take possession of it. To do this, it must communicate with the server and send it precise instructions. Its objective: reach level 8 as soon as possible!

The AI engine is based on a shared inventory algorithm that allows all players in the team to know the resources needed for the incantation.

We use a non-blocking architecture with a circular buffer allowing the data to be stored while performing the optimal actions

def connect_to_server(self):
    self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    self.socket.setblocking(False)
    self.socket.connect_ex((self.hostname, safe_cast(self.port, int)))
    events = selectors.EVENT_READ | selectors.EVENT_WRITE
    self.selectors.register(self.socket, events)

💡 Bonus

As a bonus, we have developed a mobile application that integrates the graphic client in augmented reality. The phone connects like a classic client on the network to communicate with the server on the machine.

GUI

   💿 Full demo available here !

❤️ Contributors

       📌 PREMONT Maxime   👉   GUI + AR (Bonus)
       📌 SABRE Nolann   👉   Server
       📌 ABOUELLEIL-SAYED Ahmed   👉   Server
       📌 VALLENET Mikael   👉   AI
       📌 FERRARD Yannick   👉   AI
       📌 CARNEIRO Lucien   👉   GUI + Documentation

Special thanks to VALLENET Mikael who allowed the use of his readme to write this one.

zappy_epitech's People

Contributors

maximepremont avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

zappy_epitech's Issues

Issue templates

Is your feature request related to a problem? Please describe.
There is no issue templates.

Describe the solution you'd like
Add feature request and bug report templates to the project.

License

Describe the solution you'd like
Add a project license.

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.