Team 12 Game Development Artifact 5- Drawing guides

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.

 

This week’s artifact is going to be a little bit different. It’s going to be diffrent in both fucntalolity and pourpse.

 

What ?
It’s a system that helps debug bugs, that I often encountered when working when working on collisions. My friend Anders Jonsson, presented that idea to me in the early stages of development, so I started to work on it right away. The system development as we started to include new type of colions, so it consisted of shapes like rectangles and lines that represented collisions.

 

How ?
Every entity in the game contains either a rectangle collider, line collider or both. To draw these shapes, I made a function inside the collider to return the shape of the entity. This meant that it drew at the position of the entity and it kept updating as the game started to progress. Since a got alot of requests to show my code. I’ll sow it in both c++ and pseudo code for anyone that is unfamiliar with the language.

 

Pseudo:

 return value is type rectangle, function's name = GetRect()
{
return the rectangle shape with it’s components(x, y, width, height).
}


C++:
 sf::RectangleShape &Collider::GetRect()
{
return m_area;
}

I use this function to draw the rectangle, as mentioned above. it contains all of the entity’s properties.

 

Why ?
The answer is quite easy, I used this method of debugging simply to save time and energy as well as to get precise result when it came to creating the response to the proper colliders. Our game required near perfect collision to behave well. With the help of this method, it was easy for us to visualize the collision boxes or lines to detect if they are functional. I could go on and on on the benefit but I think that I can safely presume that you understood the reason behind it and for that I would recommend using this method when it come to handling complex collisions.

 

Tomorrow will be the day we and the other teams will present our game in the beta state, I hope that every things well and I was the best of luck to everyone involved and to enjoy the show!

One thought on “Team 12 Game Development Artifact 5- Drawing guides

  1. First of all I have to say that it’s great to see your own game concept coming to live, you and your group really captured and made it like we in group 7 dreamed about! During the beta presentations I were on the edge of my seat, it looks fantastic and I’m really looking forward to play it when final comes in two weeks!!

    About your blog post then, first off all I like the structure on the post. This is the first blog I see that have a introduction and then used subtitles to every part of your post. I really like it!

    But other than that the post was a bit confusing, you started writing about debugging and then got into collision and I could not really understand what you were writing about. A lot of things could have been more clear, for example, you could have started with “I’m gonna write about …” because this is far from easy to understand.

    I liked that you “translated” the code from c++ to something more easy to understand for people that are learning coding. Things like that make a text much easier to understand, use more examples of code and translate it in the future! It also shows that you understand what you have done.

    Keep up the good work and I’m looking forward to see the final product!

    Like

Leave a comment