Skip to content

apecuca/GameEngine2D

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2D Game Engine

Introduction

This is a simple 2D Game Engine with an example to showcase. The plan is to make this a full Game Engine (framework xd) where the user can just initialize and start developing. Again, this project is literally just for fun and studying, so this and other documents I write won't be that serious.

Using the engine

If you REALLY want to try using this engine, you'll need to do a few things before:

  1. Update the CMAKE_TOOLCHAIN_FILE variable on CMakePresets.json. That's the variable that tells cmake where are the external libraries (I think, I used vcpkg to automate everything)
  2. Use a compiler like Ninja or MinGW to compile the project

After that, just initialize the engine on the main function and have fun :) I'll start writing a very simple and straightforward documentation once basic physics, sound and UI support have been implemented.

Todo

This todo list is being updated as I think of new things to implement and progress on the project. I'll probably move this to a Trello board or something similar on the near future.

Engine management
  • Realtime instancing and destruction of GameObjects
    • Hierarchy
  • Component system
    • Refactor system
  • Level system
  • Class to deal with Time stuff (delta, program time, etc...)
  • Class to deal with Input
  • Task
Renderization
  • Shader rendering
    • Custom render order (improve sorting algorith)
    • Pooling system for sprites
    • Sprite support
      • Add support to the sprite class on rendering manager
      • Sprite ratio same as original image (pixelsPerUnit)
      • Custom color
      • Animation system
        • Animation switching
          • Based on conditions? Perhaps
        • Animation events (calling functions on specific frames (or timestamps, tbd))
    • Shader pooling
  • Render everything to Frame Buffer
Physics

For physics, I'll be using the Box2D (https://box2d.org/) library, a free physics engine

  • Initialize API
UI

For UI support, I'm planning on using Dear ImGui, since it has a lot of ready-to-go functionalities and it's very simple to implement and customize

  • Task
Sound

For sound, I'm still deciding on whether to use sdl2-mixer, miniaudio or SoLoud. I'll probably go with miniaudio for it's customizability and compatibility with vcpkg

  • Task
Extras
  • Change the shader's pointer from shared to unique
  • Rewrite object, level and component instanciation logic
  • Add engine as a library in main cmakelists, instead of including all files directly in the .exe
Future changes
  • When all the above tasks are completed, create new branch for the engine specialization (desktop games)

Technologies and libraries used

C++ https://learn.microsoft.com/en-us/cpp/?view=msvc-170
OpenGL https://www.opengl.org/Documentation/Specs.html
GLFW https://www.glfw.org/documentation.html
GLM https://glm.g-truc.net/0.9.9/api/index.html
Box2D https://box2d.org/documentation/
Dear ImGui https://github.com/ocornut/imgui

Extras

If you want to give me advice on how to do something better, feel free to send me a message!

About

A 2D Game Engine with a short example game.

Resources

Stars

Watchers

Forks

Releases

No releases published