Compare commits
3 commits
Author | SHA1 | Date | |
---|---|---|---|
|
f3d44720a6 | ||
|
42a0d56173 | ||
|
aea5ca958a |
30 changed files with 25 additions and 7 deletions
.cache/clangd/index
bitmap.hpp.62887C634633116B.idxbitmap_io.cpp.181EA33891BBC2AF.idxbitmap_io.hpp.C3324F345C5DD5D2.idxcontext.cpp.EECF18BC474ACA88.idxcontext.hpp.0247079C4DA06A0E.idxgeometry.hpp.5CBEA5776F164981.idxglad.c.DC115C5ADDB0D90B.idxglad.h.76E6696D4B8D4E14.idxglobals.hpp.24BCAC15858D1B89.idxkhrplatform.h.D6CEFEA22454BFC5.idxmatrix.hpp.82213AF3AAC74723.idxmatrixbase.hpp.F11E20E9DFADCEFF.idxpong.cpp.0666B09B2C5A6C2D.idxquickwings.cpp.85EA7B40D80DA419.idxrenderer.cpp.740BAA1FB38348C8.idxrenderer.hpp.926D47CDCF3C1D01.idxrgba.hpp.FC678113A439A522.idxshader.cpp.43E3518708249EAE.idxshader.hpp.E7CD36D8F71952ED.idxshader_sprite.hpp.493F804E562576C3.idxsimple.cpp.96D892360BBE0299.idxsprite.hpp.A9098C65589F3A19.idxstb_image.h.A40CF375DB872323.idxvector.hpp.E320F2C0D8CBC593.idxwindow.cpp.C49665C3E96358E9.idxwindow.hpp.B8A7D1770B434EEC.idx
CONTRIBUTORS.mddocs
examples/quickwings
src/lib/src
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
6
CONTRIBUTORS.md
Normal file
6
CONTRIBUTORS.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
# Contributors
|
||||
|
||||
- Hartmut Seichter (dev lead)
|
||||
- Robin Rottstädt (image loader)
|
||||
- Tim Gösselmann (Win32 fixes)
|
||||
- Hannes Brothuhn (Flappy Bird clone)
|
|
@ -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
|
||||
|
|
|
@ -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,12 +12,16 @@
|
|||
#include <paradiso/renderer.hpp>
|
||||
#include <paradiso/shader.hpp>
|
||||
#include <paradiso/sprite.hpp>
|
||||
#include <paradiso/utils.hpp>
|
||||
#include <paradiso/vector.hpp>
|
||||
#include <paradiso/window.hpp>
|
||||
|
||||
#include <chrono>
|
||||
#include <thread>
|
||||
|
||||
// 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;
|
||||
|
|
|
@ -37,7 +37,7 @@ path get_executable_path() {
|
|||
#if defined(_WIN32)
|
||||
std::array<TCHAR, MAX_PATH> lpFname{};
|
||||
DWORD ret = GetModuleFileName(NULL, lpFname.data(), lpFname.size());
|
||||
return {std::string{std::from_range, lpFname}};
|
||||
return {std::string{std::begin(lpFname), std::end(lpFname)}};
|
||||
#elif defined(__linux)
|
||||
return std::filesystem::canonical(u8"/proc/self/exe");
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue