Retrospring is shutting down on 1st March, 2025 Read more

Anonymous · 2mo

how did you program the powerups for the maya game? I want to make something like it, and would like advice

Hmm...
this one is a bit complicated to answer, but I'll give it my best shot. Internally, I have an enum (basically a fancy int) tracking Maya's power state, and another tracking her size. For the flight suit it's pretty simple, there's code that gives her the ability to glide only when she has the flight powerup. But for fat and inflation, they're a bit more complicated: Those forms have completely unique physics just for them, that's entirely different from her physics while thin. So a lot of the code is just set up to run differently depending on that, and there's all sorts of extra bits to it specialized for those forms (like her unique walk while inflated, or gaining momentum from bouncing while fat, etc.

Retrospring uses Markdown for formatting

*italic text* for italic text

**bold text** for bold text

[link](https://example.com) for link