Inspiration
The inspiration was The Password Game. The best part of that game is not the password, but rather the moment a new rule appears and loudly invalidates a previous rule you fulfilled. We wanted to bring that chaos to a canvas, where inspiration can take a bigger form.
What it does
It is a browser game where you have one canvas to draw a picture to fulfill around 20 rules at the same time, progressively. Rules appear one by one, designed to ensue chaos in the canvas.
How we built it
- TypeScript, strict mode, with Vite for building
- Canvas 2D for drawing and animation
- A pure TypeScript game engine that has no DOM dependency
- Custom vector-to-grid rasteriser for checks that need coverage, such as moon shading.
- Custom computational geometry for recognition: convex hulls, path length, point-in-polygon, polygon area, flood fill, and the largest inscribed triangle.
There is intentionally no machine-learning model. Every recognition decision is explainable geometry.
Challenges we ran into
Recognising drawings without machine learning. A perfect circle is easy, but a hand-drawn circle where a gap or tail out is guaranteed is not. We needed rules that were forgiving enough for humans but strict enough that a scribble could not pass as a boat.
Shapes made of several strokes. Players do not draw a box as one perfect closed stroke. They draw four lines that overshoot at the corners. We solved this by flood-filling the blank areas walled in by ink and turning every enclosed region into a virtual closed outline. That makes a four-line hull a hull, and it also means a burnt hole can be patched with one new stroke.
Accomplishments that we're proud of
- A complete drawing game with around twenty simultaneous rules and no AI model for vision.
- Recognition built entirely from geometry, so it is deterministic, explainable, and testable in Node.
- A fire system that genuinely removes ink and can make earlier rules fail again.
- An eagle that interferes with the drawing in a way that is visible, readable, and avoidable.
- A game that runs offline, uploads nothing, and ships as a small static site.
- An autopilot that can draw a valid answer on demand, which made demoing and balancing much easier.
What we learned
With backend programming background, we learned quite a bit about development on the web stack, e.g. TypeScript has always been a thought in our minds, but never applied. Furthermore, we learned that you do not always need a model to interpret visual input in computers.
What's next for The Drawing Game
- Add a daily challenge, so everyone gets the same challenge with different rules varying by the day.
- Add more scenes and rule packs: a house, a rocket, a city, etc.
- Test on more browsers, an actual pen tablet with stroke strength, and phones
- Train a model to tune the geometric tests based on the user's ability, up to a certain extent.
- Add more readable hints and guides for the rules that are hard to see.
