HankyDoodle is a draw-and-guess game for iOS and Android. The main part I enjoyed working on was the file storage. I had to come up with a format for the drawing animations that had to be small but store enough information to be able to animate it at playback speeds. It also had to be practical to store and serve hundreds of thousands of them - right now I'm sitting at slightly less than 20,000 drawings. Currently, the drawing sizes are typically between 1 and 12kb.
Drawings are recorded as a stream of operations that include each stroke's tool, colour, points and timing. The format (a small RLE/palette/varint container) and the renderer are one C core, which gets shared + linked multiple ways. This makes sure the rendering is byte-identical across all platforms (iOS, Android and WebAssembly). Unfortunately I did mess up some of the code used for flood fills and if I don't render the image at the same size the drawings come out slightly differently (for that reason I render all drawings at one size then resize after when I need thumbnails). Luckily I did build a version system into the drawings, so it's something future me (sucker) can deal with at some point.
Drawings are stored in S3 and served via CloudFront. The backend is PHP and MySQL, but built in a way that I should be able to scale it out/replace it as needed.
Although it was not originally planned, it makes a pretty neat demo that you can navigate to the website and playback drawings as well. https://hankydoodle.app/d/01M37AKQF6MCRRXCHB3YSAVBVG is an example of one of the more detailed drawings by someone with way more talent than me. The app has a 'word of the day' feature where users can submit their own artwork and that's an example of an extremely detailed one.
Features of the game:
- 1v1 async drawing and guessing. You draw a picture. Your opponent guesses when they get the chance.
- A forever guess mode. If you don't want to draw you can just go in and guess drawings made by others. Drawings get 'released' into the forever guess pool once a user has guessed the drawing.
- A word of the day where anyone can take a crack at drawing the word.
- A showcase where the best drawings can be found.
- Offline drawing, where you can draw while offline and without any sort of signup.
- A 'doodlepedia' where you can try and draw every word.
- An online portfolio of your drawings (such as https://hankydoodle.app/u/TP1N34).
- Privacy mode, where your drawings are private and only the folks you draw with can see them.
- Family mode where certain drawings and words get filtered completely out of your view.
The app has an unobtrusive banner ad which can be removed via a $3.99USD/year subscription. I know people don't like subscriptions, but that was the best alternative I could come up with and still keep the app free to most while covering my costs.
Happy to go deep on the format, the renderer, the fill, or the solo-dev tradeoffs.
hankinsoft•1h ago
It's built with SwiftUI on iOS and Jetpack Compose on Android, both sitting on top of a shared C codec and renderer (also compiled to WebAssembly for the website). PHP/MySQL for the backend, and S3/CloudFront for storage.
Every new use starts with a game that includes one of my previous drawings. Yes, that's really me (I get lots of folks writing 'Are you an AI?'). Depending on what I'm up to, it may take me a bit to respond to drawings. I do store my drawings so I can re-send them to different users as I get LOTS of drawings per day and drawing a new one each time would leave me with no time left to work on anything else.
App Store: https://apps.apple.com/app/hankydoodle/id6754983889 Google Play: https://play.google.com/store/apps/details?id=com.hankinsoft...