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

One thought on “Team 12 Game Development Artifact 3 – Collision blocks

  1. Hi, I thought that this post was really interesting. I can totally see how you and your team thought that it was really annoying and didn’t feel good to collide with the corners of the sprites. Especially for a game that is supposed to have high speeds, good collision becomes extremely important to nail down.

    It really seems like a smart way to handle the calculations without having to make pixel perfect collision. Your screenshot really helps illustrate how you did this. You said you had a system to only check certain boxes under certain circumstances but i would have really liked too know how you manage those circumstances. I have no idea how you make it so it doesn’t check all three colliders at the same time.

    Have you and your team thought about making the collision of the bat better. Maybe break the bats collider into multiple smaller ones.

    Are there any varieties of the types of icicles? If so how do you handle them.

    Would also have liked more screenshots, the ones you have right now are the same.

    I look forward to seeing this game in it’s finished state, it looks like it could be a lot of fun.

    Like

Leave a comment