Implementing Pushey: Eggerland's Namesake Mechanic
The Eggerland and Adventures of Lolo franchise draws much of its rich puzzling from the ability to push eggs and emerald frames. Snakey becomes mechanically interesting once you account for the game’s pushing mechanics, so let’s finish Snakey and do the pushey-push thing. B efore we begin, let’s go through some helpful context. Normally the ground doesn’t move much and that simplifies the code for standing on it. Programming challenges start to appear when mobile entities start standing on each other and pushing each other around, challenges that many games sidestep or don’t implement at all . We can’t just sidestep pushing for Eggerworld because pushing is a pillar of Lolo’s arsenal. Lolo can push a single egg or emerald frame as long as there is space for it to be pushed into. Once the pushed thing bumps into any obstacle, further pushing in that direction becomes just as immovable as any rock. FYI, each entity in our code is responsible for its own movement in its own update() meth