4 ms·
Show HN: Tiny Humans
- thesephist 5y agoHey HN! Quick weekend hack (I did a Twitter thread of me building this [0]) that seemed fun and interesting. Apparently a lot of people were having fun seeing some of the images I could create with it [1], so I thought I'd drop it here to share some fun! Quick tutorial: - Click anywhere to drop new humans - Shift-click to delete the closest human - The other buttons do what they say In my experience, it works best on large screens when you can really put together a crowd. Check out some of the screenshots on [1] if you're stuck on mobile. [0] https://twitter.com/thesephist/status/1449609097632964608 https://twitter.com/thesephist/status/1449609097632964608 [1] https://twitter.com/thesephist/status/1449948181559713798 https://twitter.com/thesephist/status/1449948181559713798
- Mix7479 5y agoThis was really fun to play around with. Are the new humans with postures randomly created? Why does it get so slow after 10-15 iterations?
- thesephist 5y agoYep! They're completely procedurally generated to be random (within some anatomically possible range). It does get slow if you really crowd up the map (or you're on a large large screen) because I didn't particularly optimize for that case that much (and it's written in a slower compile-to-JS language I'm working on). If this was a part of something more serious I'd go back and optimize it more, but for fun, it was good enough for me. To be more specific -- the slowness comes from the fact that the entire scene is redrawn (React-style) on every change or click, instead of incrementally updating the canvas. This makes things like resizing and removing speech bubbles easy but makes other things more expensive.
- kinduff 5y agoI like the fact that you're avoiding placing new humans automatically behind the title and the links. The small details. Looks neat. Glad you had fun doing this.