Skip to content

2D Game Engine with OpenGL and Entity Component System

Notifications You must be signed in to change notification settings

burningbuffer/anemone-engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

anemone-engine

Building a 2D Game Engine with OpenGL and Entity Component System

Features

  • Entity Component System
  • Box2d Physics
  • Event system
  • Small OpenGL Render system

TODO

  • Tilemaps
  • Shader 2d lighting
  • Animation system
  • Layer and level loader

ECS Usage example

Create a CoreHandler for ecs management

Create a component

gCoreHandler->CreateComponent<TransformComponent>();
gCoreHandler->CreateComponent<SpriteComponent>();

Create systems

auto movementSystem = gCoreHandler->CreateSystem<MovementSystem>();
auto renderSystem = gCoreHandler->CreateSystem<RenderSystem>();

Create Entity

Entity tank = gCoreHandler->CreateEntity();
gCoreHandler->AddComponent(tank, TransformComponent{glm::vec2{230, 270}});
gCoreHandler->AddComponent(tank, RigidBodyComponent{});

About

2D Game Engine with OpenGL and Entity Component System

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published