Home » Android » Android Games (page 3)

Android Games

Android Game Development – Using Bitmap Fonts

Android is an OS running on many types of devices with different screen sizes. Because of that it is pretty difficult to address font related issues regarding both size and appearance on these platforms. To use a consistent font face across devices I have used bitmap fonts. That is, each character is represented by a bitmap. We can create an ...

Read More »

Android Game Development – Particle Explosion

Ever wondered how explosions are created? Let’s take a little detour and try to implement a basic particle explosion. An explosion is nothing more than a bunch of particles (be them pixels, small shapes or images) scattered across the screen, originating from a single point. Not all the time but mostly and for the sake of simplicity we’ll assume that ...

Read More »

Android Game Development – Sprite Animation

If you followed the series so far we are pretty knowledgable in handling touches, displaying images and moving them around. But a moving image it’s a pretty dull sight as it looks really fake and amateurish. To give the characters some life we will need to do more than that. That is what animation is all about. A rock is ...

Read More »

Android Game Development – Measuring FPS

In the previous entry we have created a game loop that runs at a constant speed and constant (more or less) FPS. How can we measure it? Check the new MainThread.java class.           package net.obviam.droidz; import java.text.DecimalFormat; import android.graphics.Canvas; import android.util.Log; import android.view.SurfaceHolder; /** * @author impaler * * The Main thread which contains the game ...

Read More »

Android Game Development – The Game Loop

The game loop is the heartbeat of every game. We used a very rudimentary one so far (you can find it here) without any control over how fast or slow we update our game state and which frames to render. To recapitulate, the most rudimentary game loop is a while loop that keeps executing some instructions until we signal it ...

Read More »

Android Game Development – Moving Images on Screen

In the previous post we’ve displayed an image and implemented a very simple drag functionality. Things we should know by now following the series: launch an Android application in full screen use a separate thread which controls the application (the game loop) load an image from the resources acquire the canvas and draw the image onto it handle basic touch ...

Read More »

Android Game Development – Displaying Images with Android

Before moving to the actual game loop let’s display some graphics so we can get some measurements done. If you haven’t checked it out please do as it is imperative that you understand how a thread updates the screen. You can check it out here. Displaying an image using Android is extremely simple. To scale the problem down we will ...

Read More »

Android Game Development – A Basic Game Loop

Following the series so far you we have an understanding of the game architecture. Even if just briefly but we know that we need to take input in some form, update the internal state of the game and finally render it to the screen and also produce some sounds and/or vibrations. Furthermore we have created an example Android project for ...

Read More »