This is an OpenGL ES 2D hardware accelerated sprite demo built in Android Studio. It demonstrates animated sprites with rotations and touch screen controls.
You will find you can load an image using the GLSprite class or entire sprite sheets containing frames of animations of different sizes and even change the display resolution of the screen. The sprite movement is controlled by a delta time calculated from the time between frame updates so that the demo runs at the same speed on different hardware configurations.
Here are is a screenshot of the demo app running:
Download the required software here:
- Install Android Studio
- Open the OpenGL-ES-2D-Sprite-Demo project
- Select Tools -> SDK Manager -> SDK Platforms tab and ensure Android API 34 is installed
- Select Tools -> SDK Manager -> SDK Tools tab and ensure Android SDK Build-Tools 34 is installed
- If there are still build errors try selecting File -> Invalidate Caches...
You should now be able to press the run button and launch the application on a connected device.
If you want to test the application using a virtual device:
- Select Tools -> Device Manager
- Click Create Device
- Choose a device. I recommend Nexus S
- Download a system image
- Give the device a name and click Finish
You should now be able to press the run button and launch the application on a AVD.