Skip to content
Fernandez Mathys edited this page Jul 20, 2026 · 13 revisions

Project Home

Welcome to our project's wiki page !

This page serves as a central entry point for all essential information regarding the GameProject.


Project Overview

**GameProject**is a Pygame game where you explore a vast world from a top-down view.
Our goal is to deliver an immersive and engaging experience where every interaction and challenge brings you closer to victory. Game development is simplified thanks to the integration of a dedicated map editor (conceptor.py).


Project Architecture

Information on project files and directory structure

[!tip] Structure GameProject/
├── Assets/
├── Files/
├── image_pou_gitlab/
├── Saves/
├── .gitignore
├── CHANGELOG
├── conceptor.py
├── game.log
├── requirement.txt
├── LICENSE
├── main.py
└── README.md

Content

  • main.py : The main game file, contains the game loop with the menu, game, etc. scenes.

  • conceptor.py : Developer tool to modify the game map.

  • LICENSE : Legal document defining what others can do with the code.

  • CHANGELOG : Document that lists major changes chronologically.

  • requirement.txt : Essential text file that lists all external software dependencies.

  • Files/ : Directory containing all python files.

  • Files/game_mechanics.py : Handles everything related to gameplay (dash, etc...).

  • Files/map_loader.py : Reads and modifies the JSON file.

  • Files/plant_manager.py : Plant management (planting and harvesting).

  • Files/settings.py : Configuration file for screen dimensions, title, etc.

  • Files/procedural_generation.py : File allowing, as its name suggests, to generate a map (mainly Cellular Automata).

  • Files/sound_manager.py : Handles sound effects and music.

  • Files/texture_manager.py : Manages loading and scaling of textures, as well as preparing the grid and collision data.

  • Assets/ : Contains all game assets (images, sounds, piskel, etc.)

  • Saves/ : Contains all game maps (JSON files).

  • Saves/LastSave : Manages the last loaded map and the last positions

  • .gitignore : Specifies the files and directories that Git should ignore and not track, to prevent them from being accidentally added to commits. (Ex: .log files)

  • game.log : Logs activity in the game, conceptor, and important game functions to help with debugging.


Game Controls:

  • Z,Q,S,D and the arrow keys : to move
  • SHIFT + Z/Q/S/D/ arrow keys : to move faster
  • R : To plant or harvest.
  • F : To extinguish fire.
  • P : To pause the game.
  • H : Remove 10 health points (test_vie mode).
  • J : Add 10 health points (test_vie mode).
  • K : Add 10 score points (mod_test_score mode).
  • Echap : Return to menu or quit

World Creation

Goal:

To ensure rapid and efficient development

The GameProject includes a custom-built map editor, named conceptor. This internal tool was designed specifically to facilitate world layout.
Rather than manually coding every map element or having a completely procedural map, ̀conceptor.py` offers an interface to quickly visualize, place, and organize the various components of the game world.

Editor Controls:

  • Z,Q,S,D: to move the map
  • clic Gauche: to place textures (can be held down)
  • M: wall texture mode
  • C: floor texture mode
  • L-Ctrl: change texture mode
  • F3/+: add columns/rows
  • F4/-: remove columns/rows
  • molette: zoom

▶️ Démarrage Rapide

Important

Pour cloner le projet, installer les dépendances et lancer le jeu en local :

Cloner ce dépôt en bash:

git clone https://gitlab.univ-lr.fr/projets-l2-2025/eco.io/gameproject.git

installer les dépendances:

Lancez le jeu avec:
main.py

Lancez le mode éditeur avec:
concepetor.py


📚 Explication de nos importations

  • pygame:
    Il donne les outils pour gérer les graphismes, les sons et les entrées (clavier, souris) pour créer un jeu.
  • logging:
    C'est le module de journalisation.
    Il permet d'enregistrer des messages d'erreurs, d'avertissements ou d'informations dans un fichier
  • math:
    Ce module donne accès à des fonctions mathématiques courantes.
    On y trouvera des choses comme les fonctions trigonométriques (sin, cos) et la racine carrée (sqrt)
  • json:
    Ce module sert à gérer le format de données JSON (JavaScript Object Notation).
    C'est un format très populaire pour stocker et échanger des données structurées.
  • os:
    Le module os (Operating System) permet d'interagir avec le système d'exploitation.
  • sys:
    Ce module fournit des variables et des fonctions pour interagir avec l'interpréteur Python.
    Il est utilisé pour quitter proprement le programme

🔗 Ressources Utiles

Web - Documentation Pygame
Web - Documentation Markdown pour la documentation gitlab
Livre - Pygame - Initiez-vous au développement de jeux vidéo en python
Web - Keep a Changelog
YT - I Optimised My Game Engine Up To 12000 FPS
YT - What I Did To Optimize My Game's Grass
YT - When Your Game Is Bad But Your Optimisation Is Genius
YT - Python: Creating a Grid With Pygame
YT - Scrolling Backgrounds in Pygame


:frame_photo: Visuels

exemple_generation{width="100%"}


👤 Auteurs

Nom : Fernandez Mathys
GitLab : mon profil
Nom : Soilihi Timeo
GitLab : mon profil
Nom : Lamoureux Robin
GitLab : mon profil
Nom : Pinet Theo
GitLab : mon profil

Clone this wiki locally