O'Reilly logo

OpenGL ES 2 for Android by Kevin Brothaler

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Exercises

Before we head on to the next part of the book, let’s take some time to complete the following exercises:

  • Since we’re not changing the view matrix on every frame, what could you do to optimize the updates to viewProjectionMatrix and invertedViewProjectionMatrix?

  • The puck currently reacts the same whether the mallet strikes it directly or on the side. Update the collision code to take the striking angle into account; Figure 43, Unit circle, might give you an idea of how to approach this.

  • Update the collision code so that the puck also interacts with the mallets when it’s moving on its own; for bonus points, make its motion frame-rate independent. Hint: Store your movement vector as units per second, and figure out how much time has ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required