Team 12 Game Development Artifact 3 – Collision blocks

On our way to beta! Team 12 is working on a game called DashBat. The game is going to be a mix between speed runners adm super mario kart, the player is in a flying state. To progress through the level the player needs to avoid multiple objects at a high speed and to reach the end of the level in a short time.

I’m gonna talk about on of the artifacts that I worked on, collision blocks. This artifact is a bit different, so far I have only talked about artifacts that i have created, but this one was most implemented from another game engine and was converted or rewritten to match our game better.

So what is it ?

The collision blocks are consisted of three boxes or colliders, each one of them has a different size and position. Both the scale and the position is related to the original entity. They are basically a resized version of the entity’s bounding box. They were designed in a way to only be used if the right conditions are met. That means we can use collider one and three without working about the second collider, avoiding unwanted calculations.

The functionality

I’m not going to go into detail on how the collision worked, because it was not the purpose of this artefact. But i’m gonna explain how I  broke the original collider into three parts. Having a pre-existing collider meant that I needed two more collider to make this method work. I started by creating the needed colliders for each entity in the game. Each collider had to be resized and positioned differently to improve the collision in the game. Here is picture of the thought behind the collision blocks.

blog_3

Why?

The original collider made the the whole process “ugly” for a lack of a better word. It was really hard to tell when a game object is going to collide with other objects, making the main mechanic of the game (flying) boring and plainly unresponsive. We could have used perfect-pixel collision, but after some research, we found out that it a bit taxing and could slow the game down and breaking the already working collider was the far easier method at the time, plus having experience with that particular collision system helped alot.

Thank you for reading! Stay tuned for more artifacts for the next three weeks.

Marwan

About Marwan Al-Salman

2014  Programming