Colliding some more

Ok, today was a scrum meeting. Sprint planning.

I had almost colmpeted the circle circle and rect vs rect. I sat down Before the meeting and tommi was there. I had overthought my check collision functions. I had a bool function to iterate through the elements of the collider arrays and compare them with each other, and every time an overlap was true, the checkcollision function was returned true.

That means every time two object collided, the funktion stopped because it was returning true and the next update it was called again and Went from the beginning of the two collider Array iteration. if nothing collided it would return false.

By making it to a void funktion and moved the std::cout from the update funktion in GameState to the checkcollision function.

This is how the rect vs rect looked then and now to compare the difference in code lines.
Before

after

After

now I can say the circle vs the circle and the rect vs rect collisions work. The rect vs rect will also need an offset because I will need to have the fish to be able to stop at solid objects, such as a rock or the Corrall Wall. This is my weekend relaxation. When the rects also really collides and are solid I can check out the rect vs circle again.

This brings me back to the sprint planning. I only have to finish these things and then the mechanics of the game will be almost complete. The other programmers in the group made sprites on the screen and the gameobjects seem to finish up soon. Alpha is comming up soon.
We also have a spritesheet and many different animations such as Idle, moving, eating and more.

I will leave to the other members to explain their work.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s