Creating a game application – Stage 1

Now that we can write characters to the GLCD screen, some interesting possibilities present themselves. The first one to consider is a simple character-based game application known as PONG. Pong was one of the first arcade video games featuring 2D graphics, originally marketed by ATARI Inc. (http://en.wikipedia.org/wiki/Pong). We'll develop the game in stages, as this is a good development strategy. We'll start by describing a simple recipe named Bounce with limited functionality. The idea of this recipe is just to animate a ball so that it appears to bounce around the screen. Provided we can redraw the ball more than 25 times a second (25 Hz), it will appear to move. The ball is represented by a character ...

Get ARM® Cortex® M4 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.