diff options
| author | Schark <jordan@schark.online> | 2026-09-23 23:09:55 -0400 |
|---|---|---|
| committer | Schark <jordan@schark.online> | 2026-09-23 23:09:55 -0400 |
| commit | dab65412376d1b73381446f969c1461c24169811 (patch) | |
| tree | 27adfec438a9bd9f3c96a740ab54016df5f68b80 /platformer/src/world.c | |
| parent | af03f388cbcff795158ea8345b5c876470229e8b (diff) | |
| download | gamedev-dab65412376d1b73381446f969c1461c24169811.tar.gz gamedev-dab65412376d1b73381446f969c1461c24169811.zip | |
Base prompts
Diffstat (limited to 'platformer/src/world.c')
| -rw-r--r-- | platformer/src/world.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/platformer/src/world.c b/platformer/src/world.c new file mode 100644 index 0000000..2dffb72 --- /dev/null +++ b/platformer/src/world.c @@ -0,0 +1,29 @@ +/* + * ============================================================ + * FILE: world.c + * + * PURPOSE: The blank test world: an empty, flat square of ground where we + * tune movement. It stays empty on purpose, like the test space + * SM64's team used before building real levels. + * + * FITS IN: Implements world.h. Has no dependencies besides config.h and + * math3d.h. physics.c is its main caller. + * + * IMPLEMENT: + * - world_init(): nothing to do yet. Leave a comment saying this is where + * level data would be loaded. + * - world_ground_height(x, z): return 0.0f. Mark the unused parameters with + * (void)x; (void)z; so -Wextra stays quiet, and add a comment saying this + * is where a heightmap/platform lookup will go. + * - world_clamp_to_bounds(p): clamp p.x and p.z with clampf from math3d.h. + * - world_spawn_point(): return vec3_make(0, 0, 0). + * - world_half_extent(): return WORLD_HALF_EXTENT. + * + * CONVENTIONS: Y up. The ground surface is the plane y = world_ground_height. + * + * NOT IN SCOPE: Anything that isn't flat ground. Don't build a collision + * system "for later"; add it when the first platform shows up. + * + * DONE WHEN: It compiles warning-free, and the player can't leave the square. + * ============================================================ + */ |
