Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
araujo88 committed Apr 2, 2024
1 parent 7b0e785 commit bef08f9
Showing 1 changed file with 29 additions and 18 deletions.
47 changes: 29 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,38 @@
# Nano Game Engine

A simple 2D game engine built using the SDL2 library. This engine provides basic functionalities like player movement, world rendering, and a modular entity system to ease the addition of new in-game objects and features.
A simple 2D game engine built using the SDL2 library. This engine provides foundational functionalities for creating 2D games, including player movement, world rendering, and a modular entity system to facilitate the addition of new in-game objects and mechanics.

## Features

- Basic player character with 4-directional movement.
- Simple world/tile rendering system.
- Modular entity system: Easily add new game objects or features by implementing the `IEntity` interface.
- Event handling for all entities.
- Easily extendable for more complex game mechanics.
- Modular entity system: Easily add new game objects or mechanics by implementing the `IEntity` interface.
- Event handling for all entities, enabling interaction and response to player inputs or other game events.
- Collision detection to handle interactions between entities.
- Easily extendable architecture for developing more complex game features.

## Class Hierarchy

- **IEntity**: Base interface for all entities in the game, providing a contract for rendering, event handling, and updating logic.
- **Character**: Abstract base class for movable entities, extending `IEntity` with common attributes like position, texture, and collision detection.
- **Player**: Represents the player character, implementing specific movement logic and player-related functionalities.
- **NPC**: Non-player characters with potential for AI behaviors, quest interactions, or other game mechanics.
- **World**: Handles the rendering of the game environment, such as tiles or static background elements, implementing the `IEntity` interface to fit within the game's update and rendering loop.

## Dependencies

- [SDL2](https://www.libsdl.org/)
- [SDL2_image](https://www.libsdl.org/projects/SDL_image/)
- [SDL2_ttf](https://www.libsdl.org/projects/SDL_ttf/) (if text rendering is added in future)
- [SDL2_ttf](https://www.libsdl.org/projects/SDL_ttf/) (optional, for future text rendering features)

## Getting Started

### Installation

1. First, ensure you have the SDL2, SDL2_image, and SDL2_ttf libraries installed.
2. Clone this repository:
1. Ensure the SDL2, SDL2_image, and SDL2_ttf libraries are installed on your system.
2. Clone the repository:
```bash
git clone https://github.com/araujo88/2d-rpg-game-engine.git
git clone https://github.com/araujo88/nano-game-engine.git
```
3. Navigate to the project directory and compile the game:
```bash
Expand All @@ -32,26 +41,28 @@ A simple 2D game engine built using the SDL2 library. This engine provides basic
cmake ..
make
```
4. Run the compiled game:
4. Execute the compiled game binary:
```bash
./game # in your build folder
./game # from within the build folder
```

### Usage

Use the arrow keys (``, ``, ``, ``) to move the player character around the world. You can easily extend the game by adding more entities or features using the provided `IEntity` interface.
- Navigate the player character using the arrow keys (``, ``, ``, ``).
- Extend the game by creating new subclasses of `IEntity` or `Character` for diverse gameplay elements.
- Implement custom behaviors for NPCs or interactive world elements to enrich the game environment.

## Contributing

If you would like to contribute to the development of this 2D RPG Game Engine, please:
Contributions are welcome to enhance and expand the Nano Game Engine:

1. Read the `TODOs` documentation.
1. Review the `TODOs` documentation for areas of potential improvement.
2. Fork the repository.
3. Create your feature branch (`git checkout -b feature/YourFeature`).
4. Commit your changes (`git commit -am 'Add YourFeature'`).
5. Push to the branch (`git push origin feature/YourFeature`).
6. Create a new pull request.
3. Create a feature branch (`git checkout -b feature/AmazingFeature`).
4. Commit your changes (`git commit -am 'Add some AmazingFeature'`).
5. Push to the branch (`git push origin feature/AmazingFeature`).
6. Open a pull request.

## License

This project is licensed under the MIT License. See the `LICENSE` file for details.
This project is released under the MIT License - see the `LICENSE` file for details.

0 comments on commit bef08f9

Please sign in to comment.