And now, bricks
Bricks can now be spawned. And they can be spawned in sequence, as well. This is turning into an actual game!
Of course there's a fun thing that this exposes, where if the ball hits multiple objects at once, the force is cumulative, and so this can cause the ball to very quickly careen out of control. Oops. (It also doesn't help when the ball spawns in the middle of a bunch of bricks but that's better fixed by just making the ball spawn logic smarter.) This should be fairly easy to fix, perhaps by taking the average, rather than the sum, of the impulses. Or just applying the impulse immediately rather than allowing multiple collisions to happen but that has other unfortunate consequences.
Ball velocities should also be capped to a maximum.
So far I'm building stuff with the expectation that it'll be specific to Little Bouncing Ball, but a lot of the components I'm building can probably be reused and generalized and so on. "Strangers" will be interesting to do, in that it's a completely different sort of game (think JRPG cut scene) but still, a lot of these game components will actually be applicable, surprisingly enough.
Of course when I get to that point I'm going to need to do a bit of a... well. See the title.
UPDATE: I went ahead and tried averaging the impulses, rather than summing them, and it worked amazingly well! I also fixed an issue with the bricklaying on phase 3, and added a prototype visual effect for pausing. (There will be a lot more that happens on pause in the future, but, you know. Prototype.)
Leave a comment
Log in with itch.io to leave a comment.