Hi Artpunk
Game looks fantastic. Love the affect you have on the gems when you destroy the boxs. How did you get them to bounce like that.
Hi METR1C The bounce on the loot is using the bullet behaviour in combination with an instance variable to control how many times it can bounce (only once).
EDIT
Heres a .c3p to show how its working.
So when a crate is destroyed it spawns some loot. Crates have an instance variable which determines the kind of loot, it can be random, a low value coin, high value gem, or an item like a health increment or ammo.
On creation loot has bullet behaviour enabled and its speed and angle set to propel it upwards. Some randomisation is added to the speed and angle to create variation.
When loot collides with the tilemap for the first time, an instance variable is incremented by 1 and its angle is set to 270 (straight up) and speed to 105. So all loot bounces the same way.
When loot collides with tilemap the second time the bullet behaviour is disabled and speed is set to 0.
An additional condition re-positions the loot to appear exactly on top of the tilemap, because when the bullet behaviour is disabled the loot items are often overlapping the platform tiles by several pixels, giving the appearance of being half below the platform.. So a conditon is needed that ensures the loot sits nicely on top of the platform.
The same system is used to control bouncing of shell casings from the players weapon too.
Originally I had this working using the physics behaviour. That worked really nicely as well. The bounces looked really realistic but I decided it was overkill to use physics just for some bouncing coins, so I ended up doing it with the bullet behaviour.
Hope that makes sense?