Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

Repository files navigation

DrawinGame

A platformer where you draw the level by hand on a sheet of paper.

Godot C# OpenCV

Platform Status License Last commit Stars Built with AI assistance


DrawinGame demo: a drawing on paper becomes the game level

What is it?

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)

How it works

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]
Loading
  • 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.

Repository structure

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)

Try it

Requirements

Vision prototype

cd prototype
dotnet run

Game

  1. Open Godot and click Import.
  2. Select godot/project.godot.
  3. Click Build (hammer icon), then press F5.

Roadmap

  • 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.

AI disclosure

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.

License

MIT © 2026 Daniel Fernandez

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages