Tagged Questions

Android is an operating system for mobile devices. For non-developer questions, see http://android.stackexchange.com

learn more… | top users | synonyms

1
vote
2answers
2k views

Android landscape mode game

I am beginner in android game development. I want my game to run only in landscape fullscreen mode (currently I have Optimus 2X with resolution 800x480 in landscape), and I don't know how to set it. ...
1
vote
1answer
423 views

How can we match polygon data structure with a background image

I am referring to this fireball game. The ball will collide with background, which is in polygon form. I was wondering, how I can match my polygon data structure with the background image. Say, I ...
0
votes
3answers
290 views

Collision Error

I am having trouble with collision detection part of the game. I am using touch events to fire the gun as you will see in the video. Note, the android icon is a temporary graphic for the bullets ...
0
votes
2answers
568 views

Bitmap & Object Collision Help

Is it possible to detect when an object and a bitmap collide. I have an arraylist of sprites that I am shooting with an image. I tried using this method here but as soon as the bitmap appears the ...
1
vote
2answers
780 views

Cocos 2D putting things on the cocos thread or not?

We are using Cocos 2D for Android and are unsure if it's a good thing to execute our non-ui tasks on the Cocos thread as a way to get the animations in our game to pause. What is the recommended ...
5
votes
3answers
4k views

What are some ways to separate game logic from animations and the draw loop?

I have only previously made flash games, using MovieClips and such to separate out my animations from my game logic. Now I am getting into trying my hand at making a game for Android, but the game ...
8
votes
2answers
1k views

Java code for client-server game on Android

I have developed a game on Android. Now I want to play it on wifi or 3G. I have game packets which I want to send form client (mobile) to server then to another client (mobile). I don't know how to ...
2
votes
3answers
2k views

How can I convert an image from raw data in Android without any munging?

I have raw image data (may be .png, .jpg, ...) and I want it converted in Android without changing its pixel depth (bpp). In particular, when I load a grayscale (8 bpp) image that I want to use as ...
2
votes
1answer
4k views

Faster way to draw dynamic meshes in OpenGL ES

I'm writing a 3D game which is going to inlcude some dynamic meshes. For now, my code looks like this : private float[] mVertices; private FloatBuffer mVertexBuffer; public void onDrawFrame(GL10 ...
0
votes
1answer
719 views

2D game physics, doing it right

I have a ball that you can make jump, I have a sneaking suspicion I'm doing this wrong. It works now, to the extend that gravity pulls the object down toward the ground, but I'm having trouble ...
-1
votes
3answers
259 views

Populating NPC's Outside Of Loop

This was my original question: Populating Sprites I used the following code to spawn Enemy Sprites in my game. I have 2 types that I was using and it would display one then remove it and display the ...
2
votes
2answers
447 views

How do I add a text area to my 3D android world

i am learning 3d game development on android , i was wondering is it possible to add text areas or any thing that allows a user to enter a text in a 3d world ? and how ?
0
votes
1answer
1k views

Creating Projectiles (Beam)

I am making a simple shooter game for Android where the player is a human and is being attacked by aliens. How would I make a laser beam, so that when the user touches the screen or presses the ...
2
votes
2answers
207 views

android game - lock_layer timed out

I'm developing a (scroll) game and i'm getting weird messages in LogCat: lock_layer() timed out but didn't appear to need to be locked and we recovered(..) lock_layer timed out (is the CPU ...
7
votes
2answers
372 views

android game - how to store game elements so gc wont fire

I'm developing a android game and I have a question about storing the game elements without firing garbage collector. My game needs a collection where the game elements are stored according to x,y ...
5
votes
1answer
836 views

android game saving game state

I'm developing a game and i've ran into some questions about saving and resuming the game. Let's say i have 10 animated sprites drawn every frame (which move side to side) and everytime i press the ...
2
votes
1answer
981 views

android zoomable and scrollable board game

I'm developing a Android board game and have a question regarding creating a board that is zoomable and scrollable. The board contains a static background, characters (players) and the actual "level" ...
0
votes
1answer
2k views

Java/Android pixel perfect hit detection

I am making a game for android which I need hit detection between two objects. The first bitmap I have is a flying superhero, and the second bitmap is anything that he collides with. The superhero ...
1
vote
1answer
1k views

How should I structure my Android platform board game?

I'm new to developing Android games, but not new to developing mobile games (J2ME). I'm currently developing a board game, for a school project, with 2 things - a board and a spinning wheel (both are ...
5
votes
1answer
314 views

Is it okay to release a playable, but not graphical, game to the Android Marketplace?

I'm working on my first simple game for release. I'm going to have it to a point of being playable, interface complete, but very few if any graphics, and no overall style aside from the basic Android ...
-1
votes
1answer
1k views

Tower Defense Game SurfaceView Structure

I am building a tower defense game for android where you have to defend the base from mobsters who have a bounty on your head. You start out with a certain amount of life, every time an enemy reaches ...
4
votes
5answers
617 views

Flash Game not working on Android

I am not sure if I will be able to provide enough information for someone to answer this question, but any ideas might help. I am creating a tower defense game in Flash and I eventually want to make ...
30
votes
4answers
16k 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 ...
-2
votes
1answer
838 views

Want to develop android game

I want to develop a 3D multiplayer game for android , what is the best game engine , what is the best software to create 3d objects to import them to android ? Thank you .
5
votes
2answers
1k views

Most useful free third party Android Game libraries?

Since I have started finding a good third party libraries for game development on android platform, Im getting confused. So want to know from the people who are already using some of the game ...
2
votes
1answer
545 views

OpenGL ES GL_FIXED versus GL_FLOAT

I am writing an app for Android, using OpenGL ES 1.x I am confused as to whether I should use GL_FLOAT or GL_FIXED, the priority being performance regarding GPU operations(does GL_FIXED need to be ...
1
vote
1answer
2k views

What is an efficient flood-fill algorithm?

I am working on a game in which I have to fill a closed region with color. Currently I'm using a non-recursive, scanline-based flood filling algorithm. But in my case it is slow. Can anyone provide me ...
-3
votes
1answer
354 views

Populating Sprites

I am making a android game, it's a tower/base defense like type of game (yea I know it is kind of confusing), I was wondering if anyone knows a good way to have the attacking sprites randomly generate ...
1
vote
1answer
916 views

Android : Some textures not loading after resuming twice

This is an odd one. When I press home and then restart my game I reload all my textures (checking glIsTexture on the id's first). If I do this once, all textures load as expected, but if I do it ...
5
votes
1answer
200 views

How to test a network game on a mobile device

I am looking to test a network game with say, 10 or more users, on a mobile device. Think of it like an MMO with a lot less users. (Assuming I can get 10 running, I'd test for more users later) The ...
4
votes
3answers
429 views

How to improve my Pong like game

I have published a free game on Android Market called AstroTennis. This is like a classic pong game, but it has an asteroid moving in the middle which deflects the ball making it sometimes harder to ...
-2
votes
2answers
1k views

Using Renderscript for game development on android [closed]

Does any one know anything about using Renderscript for game development in Android 3.0. If you know, can you provide some good examples or demo links?
0
votes
1answer
2k views

Android sidecroller template

I want to create a sidescroller game for Android but it seems stupid to reinvent the wheel and since there are a lot of android sidescroller games already out I though that there must be some sort of ...
4
votes
3answers
2k views

Does AndEngine have a way to manage scenes?

Does AndEngine have a way to manage scenes (for example, main splash, menu, options, main game), and should I use a different scene per activity?
6
votes
1answer
301 views

Should I distribute different versions of the same game for different mobile platforms?

I'm currently making a game on the Android platform. I don't know whether to do a "smartphone edition" and a "tablet edition" or simply to do one edition. If I put high definition textures, the users ...
3
votes
1answer
186 views

What are the specifications for 3D animated game assets on the Android platform?

(apologies if this is phrased vaguely due to my lack of knowledge; I'm happy to change the question entirely if someone can suggest a more realistic query) I'm getting a grip on creating 3D ...
4
votes
4answers
3k views

Need a good quality bitmap rotation algorithm for Android

I am creating a kaleidoscopic effect on an android tablet. I am using the code below to rotate a slice of an image, but as you can see in the image when rotating a bitmap 60 degrees it distorts it ...
2
votes
2answers
735 views

Resume option on game in android

I made simple puzzle game. I want to add a "Resume" option to it, so when user opens the game, he can pick up where he left off last time.
6
votes
1answer
1k views

Adding a simple mix() destroys the framerate

I have a very simple shader and added linear fog via mix like this: finalColor = mix(finalColor, vec3(0.5, 0.8, 0.95), vUVoutAndViewZ.z); Note that the view Z distance is in the variable that also ...
4
votes
3answers
4k views

Price for Unity on Android and iPhone?

I was looking at the Unity site, and I was a bit confused with the pricing. It says it's free, but for iOS/iOS Pro or Android/Android Pro. I need to shell out $400 minimum each. So if I want to ...
3
votes
1answer
6k views

Is it possible to overlay EditText box on a GLSurfaceView on Android?

I am trying to add a "PlayerName" box on top of a opengl menu background, is this possible? I've tried various layouts, but they don't seem to allow an EditText box to appear on top What is the ...
10
votes
2answers
9k views

OpenGL ES 2.0 Point Sprites Size

I am trying to draw point sprites in OpenGL ES 2.0, but all my points end up with a size of 1 pixel...even when I set gl_PointSize to a high value in my vertex shader. How can I make my point sprites ...
4
votes
2answers
248 views

How can I determine a budget for RAM used (LRU involving VRAM, in particular)

After some profiling, I've determined that one of my most expensive functions involves drawing text. As a solution, I'd like to implement a LRU type of cache that will "remember" the vertices, tex ...
1
vote
1answer
1k views

Passing an OpenGL texture ID loaded in NDK back to java

Is it possible to load a texture using the NDK, but pass the result back to use in java. I have used the code in the link above and it appears to load the png correctly and generates a texture ID ...
7
votes
5answers
3k views

How can I refer to Android assets in other directories?

My project was initially not meant for Android, and its assets are organised along the following directory structure (I hope the ASCII art renders reasonably well): / +- engine/ | +- src/ | ...
3
votes
1answer
12k views

Loading PNG textures for use in Android OpenGL ES1

I'm very new to Android and OpenGL coding (I have previously used ogre3d). I am trying to find an efficient way to load PNG textures. It is currently taking around 8 secs to load 3 512x512 textures ...
1
vote
2answers
431 views

OpenGL ES multiple indices

I need suggestions for the best method of acheiving what I am trying to do: -Using either OpenGL ES 1.x or 2.x I need to pass a bunch of vertices to the GPU. Each one has 3 attributes: Position, ...
1
vote
1answer
481 views

OpenGL ES indices optimization

I am using OpenGL ES 1.x/2.x I have 2 attributes to be passed to the GPU(one is colors, one is vertices, one color per vertex). I use indices. Both attributes will use the same indices array This ...
13
votes
4answers
20k views

Fastest way to draw quads in OpenGL ES?

I am using OpenGL ES 2.0 I have a bunch a quads to be drawn, would love to be able to have to pass only 4 vertices per quad as if I were using GL_QUADS, but basically I just want to know the best way ...
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 ...