Implementation of a mix of Entity-Component framework approach with object-oriented programming (OOP) using MonoGame.
Assets Used: Pixel Adventure 1
Documentation (Doxyfile): ECS-MonoGame Documentation
Follow the instructions below to run the code successfully:
- Download the project as a ZIP file or clone it using GitHub Desktop.
- Open the project in Visual Studio Code (VS Code).
- Ensure that C# is installed in your VS Code environment.
- Install C# using the following command:
code --install-extension ms-dotnettools.csharp
- Make sure the .NET 6 SDK is installed
- Install the MonoGame Templates by using the following command:
dotnet new --install MonoGame.Templates.CSharp
- For font loading, you might need to install
SpriteFontPlus
. Use the appropriate dotnet command to install it.
- Ensure all prerequisites are met to run the code successfully.
The keyboard controls for the product are as follows:
- Use the A and D keys to move left and right, respectively.
- Press the SPACE bar to perform a jump.
- To navigate between levels, use the following keys:
- Press N to go to the next level.
- Press P to go to the previous level.
- Press R to reload the current level.
When exploring the project, you will come across the following folders:
-
ContentManager
The "ContentManager" directory serves as the project's content management system. It is responsible for managing and loading various game assets such as graphics, audio files, and other resources. Additionally, the ContentManager also reads and creates entire levels from a Tiled map format, providing a convenient way to design and populate game levels.
-
ESC base
The "ESC base" directory contains the core components and systems of the Entity-Component System (ECS) framework. Here, you will find the essential building blocks for creating and managing entities, components, and systems.
-
ComponentManager
The "ComponentManager" directory refers to the folder that manages the components within the ECS framework. If any changes or updates are needed for the components, this is where you should make those modifications.
-
SystemManager
The "SystemManager" directory houses the system management functionality of the ECS framework. Any minor changes or adjustments to the systems should be implemented within this directory.
-
EventManager
The "EventManager" utilizes the MessageBus class for publishing messages. This directory handles event handling and manages the communication between various game components and systems through the MessageBus. Any modifications or additions related to event messaging should be made within this directory.
-
ObjectManager
The "ObjectManager" directory contains the Entity Factory, which serves as a central point for creating and managing entities in the game. If you need to add a new type of entity, this is where you should start. Modify the Entity Factory to include the creation logic for the
-
WorldManager
The "WorldManager" directory pertains to the management of the game world within the project. It handles aspects such as scene management, level loading, and other world-related functionalities.
I am currently working on this project during my free time and planning to continue doing that at least throughout the grad school.