Skip to content

Latest commit

 

History

197 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Diavolo Engine

A minimal 2D game engine built in C++23 using SFML 3.0 and Entity-Component-System architecture.

Prerequisites

  • C++23 compatible compiler
  • CMake 3.20+
  • SFML 3.0+

Build & Run

VS Code

Open the project in VS Code. The workspace is pre-configured with build tasks and launch configs.

  • Run Connect4: press F5 or open the Run & Debug panel and select Connect4
  • Run BeachWar: select BeachWar from the Run & Debug dropdown and press F5
  • CMake status bar button (bottom of screen): defaults to Connect4; click the target name in the status bar to switch

Command line

# First-time setup
mkdir build && cd build && cmake .. && cd ..

# Build and run a specific game
cmake --build build --target Connect4 && ./build/Connect4
cmake --build build --target BeachWar && ./build/BeachWar

Tests

cd build && ctest

Dependencies

Auto-fetched via CMake: Dear ImGui, ImGui-SFML, toml++, Google Test

References

High level diagram

flowchart TD
  Diavolo["Diavolo (Engine Core)"]
  Window["SFML RenderWindow"]
  DebugUI["DebugUI (ImGui)"]
  Assets["Assets"]
  Scene["Scene"]
  PlayScene["PlayScene"]
  EntityManager["EntityManager"]

  AISystem["AISystem"]
  MovementSystem["MovementSystem"]
  AnimationSystem["AnimationSystem"]
  CollisionSystem["CollisionSystem"]
  LifespanSystem["LifespanSystem"]
  CameraSystem["CameraSystem"]

  %% Core relationships
  Diavolo --> Window
  Diavolo --> Assets
  Diavolo --> DebugUI
  Diavolo --> Scene
  Scene --> PlayScene
  PlayScene --> EntityManager

  %% ECS Systems
  EntityManager --> AISystem
  EntityManager --> MovementSystem
  EntityManager --> AnimationSystem
  EntityManager --> CollisionSystem
  EntityManager --> LifespanSystem
  EntityManager --> CameraSystem

  %% User input and rendering
  Window --> Diavolo
  DebugUI --> Diavolo
  PlayScene --> Window
Loading

About

A minimal 2D game engine using C++23, SFML, and ImGui

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Used by

Contributors

Languages