Home » Android » games

games

OpenGL ES Texture Mapping

With this example we are going to demonstrate how to perform OpenGL ES Texture mapping (OpenGL ES on Android). We shall create a square and we will apply a texture onto it. A texture is nothing more than a bitmap image. This method is very useful when creating 2D games and is the preferred way to display images using OpenGL. ...

Read More »

Displaying Graphical Elements with OpenGL ES

In this example we shall show you how to display graphical elements with OpenGL ES on Android. First off, 3D graphics happens in the Cartesian Coordinate System. That means that the coordinate system used has three dimensions. X, Y and Z. Traditionally X goes from left to right, Y from bottom to top, and Z from me into the screen ...

Read More »

OpenGL ES rendering example

This is an example of how to perform OpenGL ES rendering on Android. OpenGL for Embedded Systems (OpenGL ES) is a subset of the OpenGL 3D graphics application programming interface (API) designed for embedded systems such as mobile phones, PDAs, and video game consoles. OpenGL ES rendering can be done following these steps: Create a class that extends Activity Create ...

Read More »

Measuring Frames Per Second (FPS)

This is an example of how to measure frames per second (FPS) in an Android application or game. Measuring FPS in an Android game is very important because it allows you to gauge how smooth the game is. In general, the more FPS the better user experience. For a better understanding, make sure to check the Android Game Loop example ...

Read More »

Game loop example

In this example we shall show you how to create a game loop in Android. Before starting, you should check our Basic Game loop example in order to understand the basic concepts. To create a game loop in Android one should perform the following steps: Create a thread that will be used as the game loop Implement the run() method ...

Read More »

Basic game loop

This is an example of how to create a basic game loop with Android. Before following this basic game loop example, you might wish to check out our Android Game Development Tutorials series. To create a basic game loop in Android one should perform the following steps: Create an Android activity (here called DroidzActivity) Implement the onCreate method Create a ...

Read More »

Using bitmap fonts

With this example we are going to demonstrate how to use bitmap fonts in an Android Application. Android is running on a wide variety of devices with lots of different screen sizes and resolutions. So bitmap fonts can help you address the problem of using a consistent font face across different devices. For this tutorial we are going to use ...

Read More »

Particle Explosion example

In this tutorial we are going to see how can we create a Particle Explosion effect in our Android Application. An explosion is just a number of particles (pixels or small shapes in this occasion…) that move in random positions and with random speeds around the screen originated from the same source. In our tutorial we will assume that our ...

Read More »

Sprite Animation in Android

With this example we are going to demonstrate how to  create and display a Sprite animation in an Android Application. A Sprite animation is a moving image animation that you will have seen in a gif image. For example imagine a human walking.               To create this kind of animation in Android is simple. ...

Read More »

Moving Images on Screen

In this example we shall show you how to create and display moving Images on the screen in your Android Application. For example let’s have a moving image that will move through the screen and it bounces back when it hits the edge of the screen. This is an example of a very basic animation that you might want to ...

Read More »