Shape Smasher

188,280
0
Published 2022-01-17
Cʀᴇᴅɪᴛs :
-------------------------------
Original inspiration: from Physics Balls (Android)
Music: https://www.bensound.com/royalty-free-music

Iᴍᴘʀᴏᴠᴇᴍᴇɴᴛs ᴏᴠᴇʀ Sʜᴀᴘᴇ Bʀᴇᴀᴋᴇʀ :
============================
Other than a myriad of visual and audio tweaks and improvements, the following are the major differences to actual game play.

Collision improvement
-------------------------------
Initial collision detection is done using the touching block for speed. This meant that corners of objects (triangles in particular) would sometimes be missed completely if the ball was travelling at speed. Larger distances are now broken down into multiple smaller steps (in the same frame) to prevent this

Better physics
--------------------
Once the polygon being collided with has been identified (using Pythagoras' Theorem), the next step is to identify the side of the polygon being hit by the ball. This was previously done by calculating the perpendicular distance between the ball and the vector of each side of the polygon and using the side whose vector was shortest. This worked fine for most cases but would not always give the correct result when the ball was colliding near a corner. My next thought was to use line segment collisions but these do not always align with the "sprite touching" due to inaccuracies in the regularity of the drawing of the shapes as well as pixel size issues. I was very pleased to have a brain wave last night to use vectors from the centre of the polygon through each of its vertices to determine which side the ball lies within.

Correct wall bounces
-----------------------------
Wall bounces were sometimes very erratic. This relates to the fact that when a ball has reduced speed to a very small amount, a certain "boost" is injected to prevent a ball from being trapped or settling on top of a polygon. This was also happening on walls, so a ball colliding slowly with a wall would be boosted across the screen. This no longer happens on wall bounces.

More bonus varieties
-----------------------------
The only bonuses to be picked up were extra ball and extra damage. To add variety there are now more bonus types to be picked up -
- extra ball
- double damage
- two extra balls
- increase ball size
- decrease ball size
- power up

Power-ups
---------------
Power-up bonuses can be collected to charge up the power meter (to a maximum of 9 points). These can be spent on the following in order of power -
- Big ball bonanza
- Poly-up
- Bouncy floor
- Scatter
- Quad-damage
- Freeze
- Multi-ball
- Fireball frenzy
- Boom

#games #arcade #description(Shape Breaker was a lot of fun so here's the sequel! Better physics, more bonuses and a myriad of power-ups have been added!)