WIP: For Internal Use Only
-
So I have decided to flesh out my gamejam entry to a game proper. However, it will be on hold for a while until I finish my other big project.
I did however re-share a new version with a few things I regret I did not have time to add in the jam:
- The cutscene is now skippable by pressing X.
- The zoom effect looked like crap, but has now been improved.
- The bouncing ball physics were crap, and have now been fixed.
- Added rumble effect when bouncing on a virus.
Download code:
NXKFGFQM5C -
Superb stuff but I have to disagree on one thing 'bouncing ball physics were crap', tbh I would be thrilled if I could get ball physics even close to that good.
-
@SteveZX81 Thanks! Once it is no longer pending, download the new version and see the difference for yourself! It’s like night and day!
-
My first stab at the ball bouncing (which in my defense I did really, really late at night) was taking the result of the collideSprites() function, which returns, among other things, a vector called resolution_a (described as "Vector - How sprite A was pushed during the collision { x, y }"). So I just multiplied that vector with a constant and set that as the new speed for the sprite.
That kind of worked, but it was very inconsistent. Sometimes the balls would just pass through the viruses, and sometimes they would fly away super fast. It looked kind of bad, to be honest.
So I decided to fix this. I still wanted to use the c.resolution_a, since that seemed easier than having to calculate angles and stuff myself. So what I did was taking the returned vector, normalizing it using the normalize() function, and then multiplying it with the speed the ball had before the collision.This worked perfectly, and the bounces feels really good now. Very satisfying!