Post news Report RSS Devlog #013:Flags, Errors and Crate detection

The last month I've made a lot of progress. Read all about it!

Posted by on

Crate delivery

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.

Before starting on this achievement, I rounded up work on the level designer with creating some error screens when the user enters an invalid level name for example.
Here's how it looks:

Error screens 1

I started adding flags to the platforms. The flags make the platform colors a lot clearer, plus it's a nice little heads-up that you found a platform when exploring.
Here's a small preview on how it looks currently while designing a level.

Platform flags 1

It may not look like much, but I've combined this change with a lot of preparing work for the crate/ship detection on platforms.
Behind the scenes the game now recognizes and manages platforms, which by themselves know exactly which tiles are part of it.

After implementing crate detection, I started doing some performance tests to see how my game holds up with about 10 crates in a level and many tile colliders. I did see some problems unfortunately.
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 lists 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 them drawn as white boxes.

Space partitioning

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.

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: