Operating system for mobile devices. For non-developer questions, see http://android.stackexchange.com

learn more… | top users | synonyms

82
votes
8answers
119k views

How do I get started making Android games? [closed]

I am new to game development. I am interested in developing 2D games for the Android platform. What is the best place to start with (i.e) What are the basics and how to proceed? I already have ...
16
votes
4answers
10k views

How can I develop my Android game for different phone resolutions?

For instance, the Motorola Droid is as wide as the G1, but has more height. Should I try to spread the UI out across the extra height found on the Motorola Droid? How do others handle this problem? ...
8
votes
1answer
7k views

What's the best way to create animations when doing Android development?

I'm trying to create my first Android game and I'm currently trying to figure out (with someone that will do the drawings and another programmer) what the best way to create animation is. (Animations ...
56
votes
15answers
56k views

2D Gaming Libraries/ Frameworks/ Engines for Android [closed]

Are any such things available to help me build my Android game?
10
votes
1answer
505 views

When and why is a Pool class needed to hold objects?

I've been studying opengl es and an example I saw was using a "Pool" class to keep track of touch and keyboard events. Could someone please explain how and why a pool class is needed. From what I was ...
5
votes
5answers
5k views

Why do I get this file loading exception when trying to draw sprites with libgdx?

I'm having trouble with the "Drawing Images" section on the libgdx tutorial. I set up the documents completely and I typed the code as follows: public class Game implements ApplicationListener { ...
19
votes
5answers
6k views

What should I keep in mind when making 2D games for multiple resolutions?

I'm making a 2D (Android) game. Android devices vary quite a lot in screen resolution; what do I need to keep in mind when making my game? Do I need to keep big versions of all images and scale down ...
4
votes
4answers
2k views

Which Side Was Hit?

I am working on an Android game and I have two objects A and B (both rectangles) and when they collide I simply want to know which side of B was hit. I have detected the collision fine, but I am ...
-5
votes
4answers
3k views

How to implement a 2d collision detection for Android

I am making a 2d space shooter using opengl ES. Can someone please show me how to implement a collision detection between the enemy ship and player ship. The code for the two classes are below: ...
4
votes
2answers
3k views

How to calculate shot angle and velocity to hit a moving target?

I am developing a 2D Android game and I am making an aiming algorithm for AI projectiles to hit enemies either following a path, or free moving. At the moment it just calculates where the target will ...
12
votes
6answers
5k views

Making (or emulating) a “D-Pad” on a touch-screen; virtual d-pad

With the proliferation of touch based devices, many lacking a true D-Pad, I'm wondering if anyone has any resources on how to emulate a D-Pad on a touch screen? I'm specifically interested in XNA ...
5
votes
2answers
2k views

How do I support variable screen ratios using AndEngine?

When displaying a background, AndEngine produces black bars above the image on certain devices. How do I support variable screen ratios for different devices using AndEngine?
7
votes
2answers
4k views

How do I find the angle between two vectors?

I have 3 points on my screen: a = a point which is (c.x, 0) makes a line pointing straight up b = a user input touch, can be anywhere on the screen c = a moving object a _______.________ | ...
5
votes
9answers
2k views

How do I create a game that runs on Windows, iOS and Android?

I use C++ to create windows games and now I want to step into another other OS like Android or iOS. I'm totally familiar with C++ so I tried to create app for iOS using objective C it was working ...
24
votes
3answers
14k views

Android game development in c++

So being a primarily c/c++ developer, I've always thought that the only option for mobile game development for me was using iOS, which allows for c/c++ (and minimising objective C). I heard from a ...
28
votes
4answers
14k views

Workaround to losing the OpenGL context when Android pauses?

The Android documentation says: There are situations where the EGL rendering context will be lost. This typically happens when device wakes up after going to sleep. When the EGL context is ...
8
votes
4answers
8k views

What tools are available for developing 2D games like Tetris or Angry Birds for Android?

I would like to ask the following regarding developing Tetris- and Angry Birds-like 2D games for Android: Is Java the official development language for Android? What free or commercial Android ...
19
votes
2answers
7k views

How many threads should an Android game use?

At minimum, an OpenGL Android game has a UI thread and a Renderer thread created by GLSurfaceView. Renderer.onDrawFrame() should be doing a minimum of work to get the higest FPS. The physics, AI, ...
18
votes
8answers
3k views

What all should be happening during the “Loading” screen?

Do I just need to be creating instances of all of my graphics into memory that are loaded from file? What is the best way to handle this? Do I just need some sort of assets manager that creates ...
7
votes
2answers
2k views

What do you use to support multiplayer turn-based network game for iOS and Android games?

If I'm doing a turn-based card game, what kind of technique do you use to support multiplayer gameplay over Internet? Is it socket? If it's socket, which SDK (CoronaSDK etc.) can provide solid ...
4
votes
4answers
19k views

Android game scrolling background

I'm just trying to figure out the best approach for running a scolling background on an android device. The method I have so far.... its pretty laggy. I use threads, which I believe is not the best ...
10
votes
5answers
2k views

2D collision detection

Let's assume I'm using this character. How would you implement collision detection for it? Using a bounding box doesn't seem to be a good approximation, because the bird's shape is nowhere near a ...
8
votes
4answers
5k views

sprite animation in openGL

I am facing problems on implementing sprite animation in openGL ES. I've googled it and the only thing i am getting is the Tutorial implementing via Canvas. I know the way but I am having problems in ...
8
votes
3answers
1k views

Android threads trouble wrapping my head around design

I am having trouble wrapping my head around game design. On the android platform, I have an activity and set its content view with a custom surface view. The custom surface view acts as my panel and I ...
6
votes
2answers
3k views

How to handle pixel-perfect collision detection with rotation?

Does anyone have any ideas how to go about achieving rotational pixel-perfect collision detection with Bitmaps in Android? Or in general for that matter? I have pixel arrays currently but I don't know ...
4
votes
1answer
1k views

How do I get smooth edges with OpenGL on Android?

Here is a screenshot that maybe makes clear what my problem is. I'm only drawing 2D circles with OpenGL. I already read the following: ...
10
votes
3answers
7k views

Best solution for multiplayer realtime Android game

I plan to make multiplayer realtime game for Android (2-8 players), and I consider, which solution for multiplayer organization is the best: Make server on PC, and client on mobile, all communition ...
-2
votes
1answer
1k views

Road parallax background

I am a beginner in game development. I want to create a parallax background that merges at the front and expands at the bottom. I'm sure there is a way to do this, but I'm missing something. My ...
6
votes
3answers
279 views

How can I deploy an Android game without going through the marketplace?

How do I deploy an Android app without publishing it in the marketplace? Let me back up a minute. I have short release cycles (2-4 weeks or less), and I would like to release a partially complete, ...
4
votes
1answer
1k views

How do I implement an AutoParallax Background in AndEngine GLES1?

I'm using AndEngine GLES1. In my game, I use AnalogOnScreenControl to move a sprite and when it moves vertically, the background image also moves vertically. I want to do something like this: that is ...
4
votes
2answers
2k views

How do I store level-data in Android?

I'm building a game where enemies come in waves. I want to create a file where I can define data about the waves (# of enemies, spawn times, speeds, etc.). I come from a background in iOS and would ...
4
votes
1answer
1k views

Android Game Dev: Screen Scaling

This question is very closely related to a previous question of mine: Scaling a game view with letterboxes? My game runs at 480x800 right now but when the screen is smaller or bigger than that I ...
0
votes
1answer
50 views

Is there a way to use the RGB channels of a texture as the alpha channel when applying multitexturing using OpenGL ES 1.1?

I have been trying to get texture compression using ETC1 (specifically PKM files) working for some time now. I am trying to do this without having to upgrade to OpenGL ES 2 so I have been using ...
0
votes
3answers
2k views

Implementing a basic jump in libgdx

I have seen the document for libgdx and managed to move the character and also to implement bounds but the document does not show how to implement jumping. I have downloaded the superjumper demo code ...
0
votes
1answer
1k views

rotate sprite and shooting bullets from the end of a cannon [duplicate]

Possible Duplicate: How to Align Gun with Bullets Hi all i have a problem in my Andengine code, I need , when I touch the screen, shoot a bullet from the cannon (in the same direction of ...
18
votes
4answers
3k views

How to design an AssetManager?

What is the best approach to designing an AssestManager that will hold references to graphics, sounds, etc. of a game? Should these assets be stored in a key/value Map pair? I.e. I ask for ...
10
votes
3answers
12k views

Resolution Independence in libGDX

How do I make my libGDX game resolution/density independent? Is there a way to specify image sizes as "absolute" regardless of the underlying density? I'm making a very simple kids game; just a bunch ...
8
votes
3answers
4k views

Game server for an android/iOS turn-based board-game

I am currently programming an iPhone game and I would like to create an online multiplayer mode. In the future, this app will be port to Android devices, so I was wondering how to create the ...
5
votes
1answer
2k views

Game Code Design for Rendering

I first created a game on the iPhone and I'm now porting it to Android. I wrote most of the code in C++, but when it came to porting it wasn't so easy. The Android's way is to have two threads, one ...
9
votes
3answers
9k views

Fitting Android game to different screen sizes

I am making an Android game that is only in portrait screen orientation. It works great when I run it on my phone, but when I run it on a tablet, even though the screen size is bigger, all of the ...
5
votes
3answers
1k views

Thread runs faster on a faster processor… how to control Thread speed

I have a thread that uses TimeUnit.MILLISECONDS.sleep(5); Problem is when I load my app on a faster phone say with a snapdragon, it runs at lightning speed. Is there a way to control this speed so ...
13
votes
6answers
857 views

Phone for Android game development [closed]

I've been developing casual iPhone/iPod Touch games touch for about two years. I'd like to port some games to the Android platform. Since I'm stuck w/ a two year iPhone contract I don't want to get ...
11
votes
8answers
2k views

Converting a 2D curve into points for data storage

I’ve created an algorithm which converts any curve i.e. path into minimum number of points so that I can save it into a file or database. The method is simple: it moves three points in equal steps ...
6
votes
1answer
924 views

Is the STL efficient enough for mobile devices?

When it comes to mobile game development on iOS and Android NDK, some developers write their own C++ containers, while others claim that STL is more than adequate for mobile game development (For ...
4
votes
4answers
9k views

Steps/tutorials to get into Android Game Development [closed]

Hi i want to get into android game development, I m interested in racing,fighting,target games(penalty shootout etc). can anyone post links/urls for tutorial(videos etc). I am familiar with ...
2
votes
2answers
2k views

Android: Loading bitmaps without premultiplied alpha (OpenGL ES 2.0)

Is this possible? To load textures in non-premultiplied format (Straight alpha?)? My game has 1 or 2 images which have semi-transparent pixels and I need to be able to fade them in and out but this ...
2
votes
2answers
5k views

Drawing a circle in OpenGL ES Android, squiggly boundaries

I am new to OpenGL ES and facing a hard time drawing a circle on my GLSurfaceView. Here's what I have so far. The circle class public class MyGLBall { private int points=40; private float ...
2
votes
3answers
2k views

How do I change my gravity and jumping logic to put the character at a specific height at a specific point in time?

I'm making a 2D platformer on Android using libGDX. One thing I've had a problem with recently is gravity and jumping. I found a few tutorials on the internet and was able to come up with this... ...
1
vote
1answer
2k views

Which all are the best Android 2D Java based gaming libraries / frameworks? [duplicate]

Possible Duplicate: Are there any 2D gaming libraries/frameworks/engines for Android? Which all are the best and top using open source java 2D Gaming libraries for Android?I had already ...
15
votes
7answers
12k views

How to capture video of my mobile game?

I've been keeping a blog for my current Android game and as I get closer to an actual playable version of the game, screenshots just aren’t enough to show new progress anymore. What I need is video. ...