You draw the level on a sheet of paper with a marker, point a webcam at it, and the game builds the map in real time. If you change the drawing, the level updates instantly.
| Stroke color | Meaning |
|---|---|
| Black | Platforms |
| Red | Hazards (on the roadmap) |
flowchart LR
A[Webcam] --> B[4-corner area<br/>+ perspective correction]
B --> C[Stroke detection<br/>threshold + local contrast]
C --> D[Contours to polygons<br/>Douglas-Peucker]
D --> E[Frame-to-frame<br/>stabilization]
E --> F[Godot<br/>level collisions]
- Collisions are polygons with vertices (simplified contours), never a pixel grid.
- The camera and vision code run on a separate thread and hand the polygons to Godot through a thread-safe structure.
- You can test it without a webcam by loading an image.
| Folder | Contents |
|---|---|
godot/ |
The game project (Godot 4 .NET, C#) |
prototype/ |
Vision prototype (WinForms + OpenCvSharp). See its README |
AIDocs/ |
Technical documentation: vision, stabilization, decisions and roadmap (in Spanish) |
- Windows 10/11
- .NET 8 SDK
- Godot 4.x .NET edition
- A webcam (optional, an image-loading mode is available)
cd prototype
dotnet run- Open Godot and click Import.
- Select
godot/project.godot. - Click Build (hammer icon), then press F5.
- Detect black drawings on white paper and turn them into polygons
- Thin strokes (local contrast)
- Frame-to-frame shape stabilization
- Area selection with 4 corners and perspective correction
- Godot project with player, camera/vision and screen flow
- Rebuild the level when the drawing changes without losing player state
- Red strokes as hazards
- Persistent calibration
- Windows export
More detail in AIDocs/roadmap.md.
This project was built with AI assistance: Claude (Anthropic) was used as an assistant to write and review code and documentation. Design decisions, testing and the direction of the project are the author's.
MIT © 2026 Daniel Fernandez
