Devlog #044: Crate detection and optimisation

This is an update I've been aching to share: Crate detection has been implemented!
You now see a nice little checkmark when crates are dropped onto platforms with the same color. A counter in the top right will indicate your total progress by showing how many crates have been successfully delivered.

While doing some performance tests I did see some problems when using a lot of tiles and crates.
I've worked on improving the performance and have been able to boost it significantly. Still I'm not sure if the performance is good enough. I guess I will find out when I actually build an official level.
One of the big improvements was using space partitioning for the collision detection. This means the program monitors the locations of the colliders and sorts them in a list of spaces. 
When a collider then wants to check for a collision it only checks the colliders in the same space as itself. This way the program does not need to check all the colliders that are far away.

I also visualized these spaces when viewing the game in debug mode. You can see tem drawn as white boxes.

That's it for now!
I'm planning to start on sounds next. Most challenging will probably be implementing the clashing sounds when a crate hits the ground. The sound volume needs to be adjusted to fit the speed of impact.

Get Rocket Shipment

Buy Now$8.99 USD or more

Leave a comment

Log in with to leave a comment.