3 ms·
This 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?
by Mix7479 5y ago
This 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.