aboutsummaryrefslogtreecommitdiff
path: root/docs/guide.org
diff options
context:
space:
mode:
authorGene Pasquet <dev@etenil.net>2026-04-06 03:41:09 +0100
committerGene Pasquet <dev@etenil.net>2026-04-06 03:41:09 +0100
commit78a924defabc862a7cfa5476091152c1ef5333ee (patch)
tree5e7e13ca27848dfe87ecf3eb82689d8e9488beb3 /docs/guide.org
parentc4ebbbdd1a0bd081a2ed9447ba8188d97ae54717 (diff)
Fixes, updated license
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.