[2/10] Undo is essential for this game to stay playful and relaxing: if you misclick, a cat jumps on the keyboard, or you simply change your mind, it should always be easy to go back.
I had been scheming an undo system for a while, and now was the time to roll up my sleeves ๐ช
[3/10] Undo-redo for terrain and paths was pretty straightforward. Since the interactions between systems are procedural, a lot of animation is happening for free ๐ For ex, arches appearing where paths cross walls, stones arranging along a path, or walls sticking to the ground
[4/10] The clip above is undoing-redoing a single terrain edit, and the one below is undoing-redoing a single path stroke.
[5/10] Undo for walls, however, turned into one of the most intricate bits of software engineering I've ever had to do ๐ A single eraser stroke can have many possible outcomes - a wall is split multiple times, erased from different sides, deleted, or any combination of those.
[6/10] I ended up writing a compiler for these events into a smaller number of lower-level operations that can be sanely maintained and replayed ๐ค
Now, if you split a wall when erasing, undo will play the expected merging animation ๐ No new specific case handling required!
[7/10] Originally, I wasn't even planning to add animations ๐ฎ This month was only about undo-redo. But mid-way through, I realized that if I "just" added animations, I could extend undo-redo into a replay system, letting you watch your build recreated from scratch ๐คฉ
[8/10] Being a huge fan of time lapses made by the Sims community, and the time lapse feature in Procreate, I felt that it would resonate with the vibe of my game โจ
Et voilร ! I can now replay this small "Thank you" scene, hehe ๐
[9/10] Aaand that's all for the May update~ thank you for reading!
And huge big mountainous thank you @h3r2tic for feedback, brainstorms and being my editor for this post ๐ค๐โโ๏ธ๐
[10/10] PS: if you'd like to receive these updates in your mailbox, I have a newsletter ๐tinyurl.com/2p8u9rzp
๐ค I should probably put this link somewhere in my bio so I don't need to keep linking it every time ๐
โข โข โข
Missing some Tweet in this thread? You can try to
force a refresh
My genetic drawing toy project is now opensource github.com/anopara/genetiโฆ Disclaimer: the project is from when I was getting into programming, so dont have high expectations of the code hehe๐ I also added an automatically generated sampling mask [see thread 1/4]๐
The algorithm starts with uniform sampling, then a mask is created based on edges to allocate more samples around regions of high frequency. I finish it up with a custom mask created in Photoshop to annotate semantic centers of attention (such as the face, or people, etc) [2/4]
Continuing archaeology of my old hard drive ๐ง here's another project from 2017 where I was playing around with genetic algorithms. The algorithm has ~100 "tries" to arrange 20 brushstrokes after which it repeats the process, overlaying on top of the previous iteration [1/5]
With each iteration, the brushstrokes were progressively smaller (to imitate drawing finer details). For portraits, I also used a hand-painted mask that would allocate more samples in the region of face and hands [2/5]