Skip to content

Epitech project - This is an RPG made during my studies using C language & CSFML library.

License

Notifications You must be signed in to change notification settings

MikaelVallenet/my_rpg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My_RPG

This project is one of the freest project of your first year. Create your own RPG.
Your main challenge for this game will be to create a complete product using everything that you and your
team know.

We had the best grade of the promotion, a guarantee of quality 🏆

Description 🌄

Your game must follow the following rules:
      • The player needs to have characteristics which you can find in the status menu.
      • The player can fight enemies, statistics will impact the fights results.
      • There must be NPC in your game.
      • You need to implement at least one quest.
      • The player must have an inventory which can contain a limited set of items.
      • The player can earn experience by winning fights and accomplishing specific actions.
      • With enough experience, the player can level up, upgrading its statistics.

To realize our project, we were only allowed to use some functions,
most of them being forbidden such as: printf




We started with the creation of a game engine,
that is to say that we created functions allowing to add buttons, particle generators, animated texts...
as simply as possible to save time later.
You just have to call the function and the new object will be stored after the linked list of its type




Another important part, is the creation of a JSON parser and writer.
We were obviously not allowed to use what already exists, so we remade a JSON parser
which you will see will be useful later on.

The parser is integrated in the project sources or available alone on this repository

ReadMe Card


Then, after preparing our game engine, we made a scene system that fades at each scene change,
then we focused on the menu, a smooth interface, intuitive, buttons that have pixel accurate hitboxes.
This is what we wanted and what we did.




It was also important to create a menu setting.
We decided to program sliders for the sound,
buttons for frames per second, and for full screen.




After that we have the different saves, the game can manage up to 3 different saves,
if you create a new game you will have the choice between 4 different skins,
which does not change anything to the gameplay.
The saves are saved in .json format




Speaking of the json format, here is an example of a map file.




And speaking of maps, our maps are on five different layers to recreate a 3D effect,
including a collision layer to manage the hitbox.
The maps were entirely created by ourselves using Tiled software, then exported to json format




We also have event management integrated directly into the map files.




It is also possible to talk to NPCs, which move according to patterns.
They stop when they detect you near them, you can talk to them, then animated texts are displayed,
the facial expressions change according to the dialogues.




Moreover, talking to the NPC allows you to unlock quests.
Dialogues, events, accessible zones evolve according to the quests and the player's progress.




Then, in some areas it is possible to be attacked by monsters, the fight takes place in two phases.
a first phase of attack where you have to press the space key at the right moment,
the bar moves thanks to a sinusoidal function.




Then the defense part is a "Hell bullet", you are the blue ball and you have to dodge the red balls
that are generated by 4 particle generators on the edges that are moving to avoid blind spots.
Moreover the statistics of the monsters (level, attack) define the number, the speed, the damage of the red balls.




Fighting monsters gives you experience and items, some events also give you items.
All of this is directly manageable from an inventory that handles drag & drop or double click to equip/use an item.
It is also possible to throw an item out of the inventory by drag & drop to delete it permanently.




By the way, in terms of experience, each time you pass a level you unlock a star that allows you to improve your skill tree.
Each upgrade unlocks another one, several paths are possible, will you choose attack, defense or speed in priority? 😎




To finish this description, here is the in-game menu,
with the possibility to save, to go back to the menu, to quit the game,
to open a minimalist in-game settings menu, or just to resume the game.




Now that you know everything, it's time to explain how to play the game.

Installation 🔎

⚠️ This project requires CSFML 2.5.0 to run.

 git clone https://github.com/Mikatech/my_rpg.git
 cd my_rpg
 make

Start project 🏁

./my_rpg

Results 🏆

Label Note
Total 200 / 200

Maintainers 😎

About

Epitech project - This is an RPG made during my studies using C language & CSFML library.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published