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

learn more… | top users | synonyms

2
votes
1answer
251 views

How should I determine direction from a phone's orientation & accelerometer?

I have an Android application which moves a ball based on the orientation of the phone. I've been using the following code to extract the data - but how do I use it to determine what direction the ...
0
votes
2answers
4k views

Android Java rectangle collision detection not working

I had been hard coding a collision detection system which was buggy. Then I came across using rectangles for collsion detection. So I put it all in and it does not work, I put a log in and it never ...
-1
votes
1answer
4k views

Receive UDP packet in android [closed]

I'm sending UDP packet to android over a wireless network from some other software . how can I receive that in android ? should I write a client in android to get the data?
3
votes
1answer
2k views

Open GL Android frame-by-frame animation tutorial/example code

My first question was asked wrong, so I need to ask again :) I found out, that I will have to do an OpenGL animation for my Android game. The closest (known) example is Talking Tom (but I don't know ...
1
vote
1answer
120 views

Initializing OpenFeint for Android outside the main Application

I am trying to create a generic C++ bridge to use OpenFeint with Cocos2d-x, which is supposed to be just "add and run" but I am finding problems. OpenFeint is very exquisite when initializing, it ...
-1
votes
1answer
328 views

How to integrate ad mob ads in cocos2d android portal?

Could anybody tell me how to integrate ad mob ads in my cocos2d android app.
1
vote
1answer
731 views

How can I place a ProgressBar in Android using Cocos 2d?

I want to place a horizontal progress bar in my Android application and I want to change its progress color. I used the following code, but the progress bar is not being displayed. CCProgressTimer ...
1
vote
1answer
375 views

How do I generate a level randomly?

I am currently hard coding 10 different instances like the code below, but but I'd like to create many more. Instead of having the same layout for the new level, I was wondering if there is anyway to ...
5
votes
1answer
9k views

OpenGL ES 2 on Android: native window

According to OGLES specification, we have the following definition: EGLSurface eglCreateWindowSurface(EGLDisplay display, EGLConfig config, ...
1
vote
1answer
1k views

Android frame by frame PNG animation

I am new at Android game development. I have done some apps before, but none of them are games :) So, I wanted to do a frame-by-frame animation of PNGs. I tried with AnimationDrawable, but ...
1
vote
1answer
4k views

How does the rectangle bounds (x,y,width,height) in libgdx work?

I cant work out how to use the rectangle bounds in libgdx I am currently using the superJumper example and have 2 or 3 examples with that are: <!--this is the pause button in the top right ...
0
votes
1answer
2k views

Android device - C++ OpenGL 2: eglCreateWindowSurface invalid

I am trying to debug and run OGLES on Native C++ in my Android device in order to implement a native 3D game for mobile smart phones. The point is that I got an error and see no reason for that. Here ...
3
votes
2answers
403 views

Creating new games on Android and/or iPhone

I have a succesfull Facebook poker game that is running very nicely. I was asked if I can port my game to other platforms - mainly mobile devices (phones as well as tablets, would tablets need a ...
3
votes
1answer
513 views

Photon alongside LibGDX

Can anyone point me to a possible implementation of the Photon network engine along with LibGDX for Android? Or any multiplayer networking SDK for all that matters. From reading source code it ...
0
votes
1answer
4k views

How to know if an actor is touched in libgdx?

I am using "Gdx.input.isTouched()" in the render method of my Screen method, to know where is touched, but when the touch is dragged in the screen, it also activates the events i want only when an ...
1
vote
1answer
363 views

New way of integrating Openfeint in Cocos2d-x 0.12.0

I am trying to implement OpenFeint for Android in my cocos2d-x project. My approach so far has been creating a button that calls a static java method in class Bridge using jnihelper functions ...
2
votes
2answers
756 views

Importing a windows project into android using cocos2d-x

What I am trying to do today is to import a full project to Android, but no tutorials are available for that that I have seen. My approach was to create a new android project, copy all the classes and ...
0
votes
1answer
572 views

Android Loading Screen: How do I use a stack to load elements?

I have some problems with figuring out what value I should put in the function: int value_needed_to_figure_out = X; ProgressBar.incrementProgressBy(value_needed_to_figure_out); I've been ...
4
votes
1answer
3k views

Can you embed a Unity3d mobile project into an existing native mobile app?

I am creating an application for both Android and iPhone that will have a few mini games in it. I would like to create the non game section in native Android and iPhone. My question is, is it possible ...
2
votes
2answers
653 views

In OpenGl ES 2, should I allocate multiple transformation matrices?

In OpenGl ES 2, should I declare just one transformation matrix, and share it across all objects or should I declare a transformation matrix in each object that needs it? for clarification... ...
4
votes
1answer
211 views

Clicking on clues and other objects in a 2D cluedo like game

I'm a java/android programmer, but I don't have any experience in game programming, I'm already reading proper books, like "Pro Android Games", but my concerns are more about the ideas behind game ...
-1
votes
2answers
338 views

How to spawn a character at certain point and walk to a set point

I am making a game where I have a background image of a neighborhood. Each location has a different number of customers that are generated to walk on sidewalks. They all walk to a specific location ...
1
vote
0answers
437 views

Adding Libxml2 to an Android project under Cocos2D-X

I am having problems porting Libxml2. I like it because it works under windows like a charm with <libxml/parser.h>. When I reference the libraries I just cannot find the right path to them, ...
7
votes
1answer
4k views

Box2D Difference Between WorldCenter and Position

So this problem has been brothering for a couple of days now. First off, what is the difference between say Body.getWorldCenter() and Body.getPosition(). I heard that WorldCenter might have to do ...
3
votes
3answers
242 views

When is it best to load screens in mobile games?

In the develpment of a mobile game, is it a good to load all the screens at the start of the game, or destroy and create new ones during the game? I am doing the second thing, because I suppose that ...
-1
votes
2answers
147 views

How do I fix these compiler errors in Apple Crunch?

I've been looking around and I finally got the full source code for a game called Apple-Crunch from Google Code. But when I put it into my project, the source code included so many errors in the ...
2
votes
2answers
746 views

Horizontal wrapping with AndEngine

How would one implement the effect of a sprite disappearing on one side of the screen and appearing on the other using AndEngine? Like in Kid Icarus, seen here at around 1:22.
2
votes
2answers
429 views

Implementing unlockable items on Android

I know this would be a beginners question (some of you might think) but I would like to know different approaches for this. I have a game with lets say 20 unlockable items, at the main menu I have a ...
3
votes
1answer
667 views

Any good smartphone simulators available?

I'm trying to find a good smartphone simulator to test HTML5 games on. Doesn't matter if it is only 1 phone or a library of phones, iOS or android. As long as it's as close as it can get to the ...
2
votes
2answers
412 views

What frameworks are the best for automated game testing (self running) for Android games?

Could you please recommend any test automation frameworks that would allow the creation of self running demos/tests for Android games? I would like to create a "fly-trough" for my levels, create ...
1
vote
1answer
504 views

Distributing an Android game with plugins via the market

I'm new to Android development, and was wondering how the following could be achieved within the confines of the Android market as a distribution channel: One main application, which handles the ...
1
vote
2answers
2k views

How do I get the source code from a Google Code game project?

I'm trying to get the Hedgewars source code. When I went to the downloads tab, it doesn't specify which is the actual game. I tried downloading it using the SVN Checkout on Tortoise, but it seems ...
2
votes
1answer
2k views

Why wont the LibGDX's main class Initialize on Android Launcher?

So I was searching for different ways that could suit me in programming and came across LibGDX. Naturally I looked at the tutorial. As I was doing it, I was following the steps word for word, except ...
1
vote
1answer
3k views

How would I use JBox2d in Java?

So I did some research and a found Box2d. I then proceeded to download it and the testbed. Now that i have it, I don't know how to properly use it. I'm looking for a clear simple answer on how to ...
5
votes
1answer
1k views

Things to do to port game made for iOS in Unity to Android?

I have just made my first game for iOS and submitted it to app store. I was thinking of porting my game to Android also. I would like to know things one need to do/remember to port game made for iOS ...
1
vote
1answer
757 views

Where do I find the code for the open-source game Warmux?

I found an open source game called Warmux but I don't know how to get the code. I downloaded the file from here, but I don't know where to go from there. I didn't find any instructions on how to use ...
3
votes
1answer
7k 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 ...
0
votes
1answer
876 views

What should be learned for someone starting in Android Games? [closed]

I know this might be a little subjective. But I've read the other questions. A lot of answers kept on popping up like to use box2d, libgdx, andEngine, etc. So the real question is, what would be ...
1
vote
1answer
876 views

Android opengles 2.0 :different resolutions rendering and input

I'm currently developing a sprite based 2D game for android using opengles 2.0. I've got some basic rendering done that mimics the spritebatch functionality of xna (draw sprite, rotation, color). But ...
-1
votes
1answer
3k views

I am looking for a simple tutorial for sprite animation in android [duplicate]

Possible Duplicate: What's the best way to create animations when doing Android development? I saw a couple of them on the internet but they are beyond my level of understanding ...I ...
7
votes
1answer
6k views

Is libgdx fit for 2D game development on Android or are there simpler alternatives?

I'm looking for a Java framework to develop 2D games on desktop and Android. I've looked at Slick and I really like the API, however the developer himself says if you want a framework for Android and ...
4
votes
1answer
3k views

libGDX Multitouch Controls

Has anyone had any trouble implementing multitouch on-screen controls in libGDX, such as multiple joysticks? I've tried and I can't seem to get libGDX to play nice with multitouch/multiple pointers on ...
1
vote
1answer
3k views

Using NinePatch in libGDX for Loading Bar

I am trying to create images for a loading bar in libGDX. I came across the NinePatch class and I was hoping to use it for this loading bar, since stretching images with a plain Texture or Sprite ...
10
votes
2answers
644 views

How can I tactfully ask users to help support my free game?

So, I have a game that has a few dedicated users, but very few actual users. It is a free game on the Android marketplace, supported via ads. I've been toying with the idea of periodically popping up ...
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 ...
4
votes
5answers
2k views

Is it worth planning to be cross-platform in mobile game development?

Disclaimer: my goal is not to use cross-platform frameworks like Unity. I am currently planning a mobile game which I intend to first launch on iOS. However, I am wondering if it is better to write ...
1
vote
1answer
2k views

OpenGL es glDrawTexfOES() 2D texture is totaly black no color

First of all I know this is a duplicated question and I check out another questions but didn't helped! I'm trying to convert my android game from canvas system to the GL10. After lots of googling I ...
3
votes
1answer
1k views

OpenGL ES drop shadows for 2D sprites

I've got a an OpenGL scene rendered with a bunch of sprites, and I'd like to automagically add drop shadows to all of them. Here's a picture showing what I mean: The scene uses orthographic ...
0
votes
1answer
910 views

Flash Professional vs FlashBuilder 4.6 for mobile app development

From the marketing materials I see online, it seems to me that FlashBuilder 4.6 is a subset of the functionality available in Flash Professional. If I understand correctly, mobile app development ...
4
votes
1answer
6k views

Using the AssetManager in LibGDX

I am trying to use the AssetManager class in LibGDX and I understand how it works but I am trying to implement a loading screen. I have followed the AssetManagerTest.java file here, but I am having a ...