From aea5ca958aeee379f0b0221f2ca5a86d0dced05a Mon Sep 17 00:00:00 2001 From: Hartmut Seichter Date: Sun, 25 May 2025 14:03:25 +0200 Subject: [PATCH 1/2] update to contributors and ideas files --- CONTRIBUTORS.md | 6 ++++++ docs/README.md | 10 ++++++---- examples/quickwings/quickwings.cpp | 4 ++-- 3 files changed, 14 insertions(+), 6 deletions(-) create mode 100644 CONTRIBUTORS.md diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md new file mode 100644 index 0000000..f5d7881 --- /dev/null +++ b/CONTRIBUTORS.md @@ -0,0 +1,6 @@ +# Contributors + +- Hartmut Seichter (dev lead) +- Robin Rottstädt (image loader) +- Tim Gösselmann (Win32 fixes) +- Hannes Brothuhn (Flappy Bird clone) diff --git a/docs/README.md b/docs/README.md index 64ecc08..b373f58 100644 --- a/docs/README.md +++ b/docs/README.md @@ -4,6 +4,7 @@ Here some ideas for improving this tiny engine: ## Rendering - [ ] replace the OpenGL renderer with a Vulkan backend +- [ ] add sprite atlas support (test case Kenny flappy bird) - [ ] add animatable sprites (access to UV mapping and tiling) - [ ] add a SDF based renderer (parametric tiles and font rendering) @@ -15,11 +16,11 @@ Here some ideas for improving this tiny engine: ## System Level - [ ] add a `Asset` handler to load cache and manage assets -- [ ] introspection of file system if we load assset +- [ ] introspection of file system if we load asset ## Design -- [ ] replace some of the 'unkown source' assets +- [ ] replace some of the 'unknown source' assets ## Build / Dev Support - [ ] add a test rig either with Snitch or Catch2 @@ -27,10 +28,11 @@ Here some ideas for improving this tiny engine: - [ ] add CPU and GPU benchmarks to address various issues -# Issues +# Performance +For such a small engine, this should never happen: -```sh +```bash Performance counter stats for 'bin/paradiso_pong': 555,35 msec task-clock:u # 0,042 CPUs utilized diff --git a/examples/quickwings/quickwings.cpp b/examples/quickwings/quickwings.cpp index 2259737..17730a7 100644 --- a/examples/quickwings/quickwings.cpp +++ b/examples/quickwings/quickwings.cpp @@ -1,8 +1,7 @@ /** * paradiso - Paradigmen der Softwareentwicklung * - * (c) Copyright 2023-2025 Hartmut Seichter and Contributors, Robin Rottstädt, - * brxxh (Hannes Brothuhn) + * (c) Copyright 2023-2025 Hartmut Seichter and Contributors * */ @@ -13,6 +12,7 @@ #include #include #include +#include #include #include From 42a0d56173d77152b4cc210a17bacdff822ca7e5 Mon Sep 17 00:00:00 2001 From: Hartmut Seichter Date: Sun, 25 May 2025 14:12:20 +0200 Subject: [PATCH 2/2] add some notes about design problems in quickwings --- examples/quickwings/quickwings.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/examples/quickwings/quickwings.cpp b/examples/quickwings/quickwings.cpp index 17730a7..dd51112 100644 --- a/examples/quickwings/quickwings.cpp +++ b/examples/quickwings/quickwings.cpp @@ -19,6 +19,9 @@ #include #include +// TODO remove all hard coded 'magic' values! + +// TODO - remove global variables const int frame_rate = 60; bool game_over = false; float risky_pos_x; @@ -38,6 +41,7 @@ struct Background { paradiso::Renderer renderer{}; + // TODO no constructors in rule of zero Background() { auto backgroundImage = paradiso::BitmapIO::get().load("background-day.png"); @@ -91,6 +95,8 @@ struct Pipe { bool pos_reset = false; + // TODO no constructors in rule of zero + Pipe() { auto pipe_image = paradiso::BitmapIO::get().load("pipe-green.png"); @@ -115,6 +121,8 @@ struct Pipe { void update() { + // TODO improve state handling + if (game_over == true) { paused = true; } @@ -174,6 +182,7 @@ struct Grass { paradiso::Renderer renderer1{}; paradiso::Renderer renderer2{}; + // TODO no constructors in rule of zero Grass() { auto grassImage = paradiso::BitmapIO::get().load("base.png"); grassLeft = paradiso::Sprite{ @@ -244,6 +253,7 @@ struct QuickWings { int collision_counter = 0; + // TODO no constructors in rule of zero QuickWings() { float scaleh = 0.08f; float scalew = 0.158f;