I wanted to learn OpenGL, so I threw together a game using libgdx. Below is the text from the market page for the app.
This isn't meant to be a serious game. I threw this together in my spare time over the course of a week to learn OpenGL basics on Android. I wrote a rudimentary game engine including animation, collision detection and score keeping.
Why Abe Lincoln? When I needed an image to represent a sprite, his face popped into my mind. Maybe it's his striking facial features or the fact that he's a person that I respect deeply that made me think of him in that moment.
The sprite class holds an array of animations and the state of the sprite (position, dead, type). For each call to the renderer, the engine passes the number of frames (calculated by time since last render) to the sprite, which then advances that many frames into its current animation.
Upon completing a "death" animation, the sprite marks itself as "dead". Upon the next call to render, the engine removes the sprite from those to be rendered.
I wrote a texture library to reuse textures among sprites and animations. Animations as for a texture (by resource name) from the texture library. The library either returns the texture from a map, or loads it into the map and then returns it. This is an easy way to share a single texture for all identical animation frames.
I know this is ugly. I know it's simple. It was fun to make and I'm happy to say that I learned something in the process.