VgaGames 3 - Tutorial 3

[.. upper level ..]

Tutorial 3

In the last tutorial we created a single-player ping-pong game.
The check for collisions (ball with borders and player) was done manually, where the ball after moving was being checked against all relevant objects.

One problem was, that just the target position of the moving ball was checked for collisions.
Theoretically the ball could have been jumped over an object, so that no collision was detected.
Another problem was, that the check had been done against all objects independend of being near or far.

With collision functions these problems can be circumvented.
Using quadtrees just a few number of objects near to the moving object is being checked to save time.
With VG3_coll_q_find() or VG3_coll_check() every step of the moving object is being checked.

We refer to the previous tutorial and modify the ping-pong game to use collision functions.

<<Prev Top Next>>