/projet-sfl

2D 'zelda like' game. Made with CPP & SFML.

Primary LanguageC++

Project logo

Projet SFL

Status


Game made for an academic projet by students of the Lyon 1 Claude Bernard University.

πŸ“ Table of Contents

🧐 About

2D 'Zelda like' game. Explore the open-world to fight your ennemies and fulfill the request of the NPCs.
Available on Linux and MacOS.

🏁 Getting Started

These instructions will get you a copy of the project up and running on your local machine.

Prerequisites

What things you need to install the game and how to install them.

  • For LINUX : G++, SFML
  • For MacOSX : G++ (SFML files are included in the project)
  • To update the documentation : Doxygen, graphviz

WSL is not working with this game

You can install them with your favorite package manager like :

sudo apt-get install libsfml-dev 

Folder structure

Folders tree
β”œβ”€β”€ bin
β”‚
β”œβ”€β”€ data
β”‚   β”œβ”€β”€ fonts
β”‚   β”œβ”€β”€ maps
β”‚   β”œβ”€β”€ sounds
β”‚   └── textures
β”‚
β”œβ”€β”€ doc
β”‚   β”œβ”€β”€ html
β”‚   β”‚   └── index.html
β”‚   └── sfl.doxy
β”‚
β”œβ”€β”€ extern
β”‚   └── SFML
β”‚
β”œβ”€β”€ image.png
β”‚
β”œβ”€β”€ Makefile
β”‚
β”œβ”€β”€ obj
β”‚
β”œβ”€β”€ README.md
β”‚
└── src
    β”œβ”€β”€ Core
    β”‚   β”œβ”€β”€ Entity
    β”‚   β”œβ”€β”€ Game.cpp
    β”‚   β”œβ”€β”€ Game.h
    β”‚   β”œβ”€β”€ Map
    β”‚   └── StateManager
    β”‚
    β”œβ”€β”€ main.cpp
    β”‚
    β”œβ”€β”€ SFML
    β”‚
    └── txt

Installing

  • Open a terminal to the project root directory.

  • Compile with

make
  • Clear all the objects and executables files with
make clean

πŸ”§ Running the tests

You can run all the class tests by running the following executable

./bin/exec 2

🎈 Usage

After compiling :

SFML version

  • Execute the SFML version with
./bin/exec 0
  • To move along all axis use : Z Q S D
  • To attack an enemy use : Left click
  • To pause the game : Escape
  • To restart the game after Game Over : Space
  • To mute the sound of the game press : M
  • To open the debug mode press : P
  • To quit press : X or the cross button.

Note : fullscreen behaviors are unpredictable. Only in-game screen resizing is recommended

Text version

The player is represented by a 'O', the enemies by 'E' and the collision boxes by 'X'

  • Execute the text version with
./bin/exec 1
  • To move along all axis use : Z Q S F
  • To quit press : x or the cross button.

πŸ“˜ Documentation

  • You can access to the actual documentation here.

  • You can open the documentations with your favorite navigator : doc/html/index.html

  • You can update the documentation with

make docs

⛏️ Built Using

πŸ—“οΈ Specifications

You can find our specifications.

πŸ”„ UML Class Diagram

You can find our UML Class Diagram.

πŸ“Œ Trello Board

You can find our Trello Board .

πŸ—ΊοΈ Create your own maps with the Tiled software :

Collisions and spawns layers :

You can download Tiled software here.

Collision and spawn layers :

You must use object layers named :

  • "PlayerSpawn" for player's spawn
  • "EnemySpawn" for enemies' spawns
  • "Collision" for every objects that players, NPC and enemies couldn't go throught
  • "NPCSpawn" for NPC's spawns. To specify the sentence of NPCs, go to the property panel on the left and Custom Properties -> Add Property, then set Property Name to "Dialog" and select String type. You can also set NPC's direction by modifying Rotation value.

You should save your map using CSV format.

Note : Check the actual map at the folder location data/maps/mainTilemaps.tmx and reproduce the layers with the objects properties

✍️ Authors