summaryrefslogtreecommitdiff
path: root/platformer/README.md
diff options
context:
space:
mode:
authorSchark <jordan@schark.online>2026-09-24 14:43:21 -0400
committerSchark <jordan@schark.online>2026-09-24 14:43:21 -0400
commitb47571e7f1b4348b526c23a6ab6b88dbcb49ecf1 (patch)
tree3c0b52b313b02f270e77844c67278e8a51822b80 /platformer/README.md
parent077dfb2774e29cc49b9d602bb3a2f5e81e4a9a63 (diff)
downloadgamedev-b47571e7f1b4348b526c23a6ab6b88dbcb49ecf1.tar.gz
gamedev-b47571e7f1b4348b526c23a6ab6b88dbcb49ecf1.zip
Add random platforms into game world for testing
Diffstat (limited to '')
-rw-r--r--platformer/README.md21
1 files changed, 11 insertions, 10 deletions
diff --git a/platformer/README.md b/platformer/README.md
index 370d263..ef39837 100644
--- a/platformer/README.md
+++ b/platformer/README.md
@@ -2,8 +2,8 @@
A small 3D platformer written from scratch in C. The only libraries are GLFW, GLEW and OpenGL.
-**Current scope:** a blank, flat world, one character (a box with a drop shadow), a third-person
-camera, and a gamepad. That's everything. The only goal right now is to **dial in character movement**:
+**Current scope:** a flat test world scattered with box platforms, one character (a box with a drop
+shadow), a third-person camera, and a gamepad. That's everything. The only goal right now is to **dial in character movement**:
running, turning, jumping and falling should feel good before anything else gets built.
---
@@ -19,8 +19,8 @@ These rules apply to every change. If a change breaks one, it needs a very good
GLEW (OpenGL function loading), OpenGL, and the C standard library, and nothing else. There are no
math libraries, no engines and no asset pipelines. This is deliberately the opposite of UE5-style
bloat: we should understand every line that runs each frame.
-3. **Minimal scope.** Start super small and grow one piece at a time. Today it's a blank world plus
- movement. Levels, enemies, audio and the rest wait until movement feels right.
+3. **Minimal scope.** Start super small and grow one piece at a time. Today it's a test world of plain
+ box platforms plus movement. Levels, enemies, audio and the rest wait until movement feels right.
4. **Readable implementation.** Someone with ~junior gamedev knowledge should be able to read any file
top to bottom and follow it. That means plain C99, short functions, descriptive names, a comment on
every *why*, and no clever macros or hidden control flow.
@@ -30,8 +30,8 @@ These rules apply to every change. If a change breaks one, it needs a very good
SM64 is the reference point for both **what** we build and **how** we build it.
**Scope.** Before SM64 had levels, its team spent a long time in a plain test space getting Mario's
-movement and the camera to feel right. We're following the same order: the blank world *is* the
-game until the controls feel great.
+movement and the camera to feel right. We're following the same order: the test world (flat ground
+plus plain box platforms to jump on) *is* the game until the controls feel great.
**Development approach.** These ideas come from SM64's design:
- **A small, purpose-built engine.** Write only what the game needs, and nothing general-purpose "just in case".
@@ -113,11 +113,11 @@ arrow keys = camera, C = recenter camera, Space = jump, R = reset, Esc = quit.
| `src/math3d.h` | Tiny header-only vector/matrix math (`Vec2`, `Vec3`, `Mat4`). |
| `src/window.c/.h` | The window and OpenGL context (GLFW + GLEW), the clock, and swapping buffers. |
| `src/controls.c/.h` | Reads the gamepad (or keyboard fallback) into one abstract `Input` struct. |
-| `src/world.c/.h` | The blank world: ground height and world boundaries. |
-| `src/physics.c/.h` | Gravity, velocity integration and ground collision for a generic `Body`. |
+| `src/world.c/.h` | The test level: ground, seeded random box platforms, geometry queries and boundaries. |
+| `src/physics.c/.h` | Gravity, velocity integration, and floor/wall/ceiling collision for a generic `Body`. |
| `src/player.c/.h` | The player's state machine. Turns `Input` into running, turning and jumping. |
| `src/camera.c/.h` | Third-person orbit camera that frames the player inside a screen-space zone. |
-| `src/render.c/.h` | Draws the ground grid, the player box and its drop shadow. Read-only. |
+| `src/render.c/.h` | Draws the ground grid, the platforms, the player box and its drop shadow. Read-only. |
**Dependency direction** (arrows mean "includes / calls"; there are no cycles):
@@ -185,7 +185,8 @@ Suggested fill-in order (each step can be compiled before moving on):
## Roadmap (explicitly *not* now)
-- Collision with real geometry (platforms, walls, slopes)
+- Richer level geometry: slopes, moving platforms, step-up onto small ledges, hand-built or loaded levels
+- Camera collision (the camera can currently pass through tall platforms)
- Loading levels
- SM64-style extra moves: double/triple jump, long jump, wall kick, ground pound
- Character model and animation