aboutsummaryrefslogtreecommitdiff
path: root/docs/guide.org
diff options
context:
space:
mode:
Diffstat (limited to 'docs/guide.org')
-rw-r--r--docs/guide.org30
1 files changed, 28 insertions, 2 deletions
diff --git a/docs/guide.org b/docs/guide.org
index af6319e..ca9cfbf 100644
--- a/docs/guide.org
+++ b/docs/guide.org
@@ -214,9 +214,33 @@ Key points:
See =demo/platformer.scm= in the engine source for a complete working example.
+* Development Tips
+
+** Debug Mode
+
+During development, enable ~debug?: #t~ on ~make-game~ to visualize collision boxes and the tile grid. This helps you understand what the physics engine "sees" and debug collision problems:
+
+#+begin_src scheme
+(define my-game
+ (make-game
+ title: "My Game" width: 600 height: 400
+ debug?: #t)) ;; Enable collision visualization
+
+(game-run! my-game)
+#+end_src
+
+With debug mode enabled, you'll see:
+
+- **Purple outlines** around all non-zero tiles
+- **Blue boxes** around player entities
+- **Red boxes** around enemy entities
+- **Green boxes** around active attack hitboxes
+
+This is invaluable for tuning collision geometry and understanding why entities are clipping or not colliding as expected.
+
* Demo Overview
-Downstroke includes five complete demo games that showcase different features:
+Downstroke includes seven complete demo games that showcase different features:
| Demo | File | What it shows |
|------|------|--------------|
@@ -225,6 +249,8 @@ Downstroke includes five complete demo games that showcase different features:
| Physics Sandbox | =demo/sandbox.scm= | Entity-entity collision, multi-entity physics, auto-respawn |
| Shoot-em-up | =demo/shmup.scm= | No tilemap, entity spawning/removal, manual AABB collision |
| Audio | =demo/audio.scm= | Sound effects, music toggle, text rendering |
+| Sprite Font | =demo/spritefont.scm= | Bitmap text rendering using non-contiguous tileset ranges |
+| Menu | =demo/menu.scm= | State machine menus, keyboard navigation, TTF text rendering |
Each demo is self-contained and serves as a working reference for a particular game mechanic.
@@ -235,7 +261,7 @@ If you cloned the downstroke source, you can build everything:
#+begin_src bash
cd /path/to/downstroke
make # Compile all engine modules
-make demos # Build all 5 demo executables
+make demos # Build all demo executables
./bin/demo-platformer
./bin/demo-topdown
# etc.