tron-demo: Add pseudo-3D Tron room flythrough demo

Copy of emulator-template with a TronRoom sketch demonstrating the 3D
toolkit: camera transform (forward fly + sway + bob), 1/z perspective
projection, solid shaded cubes with painter's-algorithm depth sorting,
1/z-scaled billboard entities, depth fog, and world-space scrolling
grids. Respawn margin keeps objects from straddling the camera near
plane. Includes the 60 fps pacing and Makefile sketch-dependency fix.
This commit is contained in:
Dejvino
2026-11-16 21:01:03 +01:00
parent 89e235cafe
commit 80d931b875
2 changed files with 272 additions and 113 deletions
+3 -1
View File
@@ -41,7 +41,9 @@ all: $(EMU)
# Compile + link: main.cpp includes the sketch .cpp, forming one TU.
# -DAPP_INO makes the sketch's .ino filename available to #ifdef EMULATOR.
$(EMU): $(EMU_MAIN) $(SHIMS)
# Depend on the sketch too, or sketch edits won't trigger a rebuild.
SKETCH := $(APP_DIR)/$(APP).cpp
$(EMU): $(EMU_MAIN) $(SHIMS) $(SKETCH)
$(CXX) $(CXXFLAGS) $(SDLFLAGS) $(INC) $(DEFS) \
$(EMU_MAIN) -o $@ $(LIBS)