This project use SDL library and Lua embeded C++ code create 2D game Engine about 2D game. The project is built based on Mac OS system
Install sdl2:
$brew install sdl2
install sdl2 image:
$brew install sdl2_image
Install sdl2 font support:
$brew install sdl2_ttf
Install sdl2 mixer:
$brew install sdl2_mixer
install lua:
$brew install lua
- Game initialize: SDL, TTF, window, SDL renderer, Load all component;
- Fix time step for multicomputer(Game::Update());
- Double render buffer(Game::Render());
- Create Entity manager to load entity into entity vector.
- Create Asset manager to manager the assets from the file.
- Multi component class inherit from component main class :
- TransformComponent.h : control the transform of entity
- TileComponent.h : tileMap draw based on camera position
- TextLabelComponent.h : font in the game
- SpriteComponent.h : animation of entity
- ProjectileEmitterComponent : shooting of enemy and player
- KeyboardControlComponent.h: Process input from keyboard
- ColliderComponent.h : collision with other entities.
Lua Load the Entity from Lua level file
You can check the demo video for single enemy game engine Here !