Android is an operating system for mobile devices developed and maintained by Google, Inc. This tag should contain specific programming questions about Android.

learn more… | top users | synonyms

0
votes
3answers
5k 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 ...
1
vote
1answer
5k views

How to initialize a BitmapDrawable Android

I have been using a shapeDrawable object for my android games player but now that i want to add some graphics in I have to use something different I was thinking of a BitmapDrawable but as I am new to ...
1
vote
2answers
449 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, ...
0
votes
1answer
4k views

How to scroll background image-Android App

Basically, I have a main menu, and I would like the background image to scroll (parallax I believe is the term? Like the Angry Bird's title screen background). However, I'm used to just having a ...
12
votes
8answers
5k 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 ...
-4
votes
2answers
1k views

How to fire a bullet in a specific direction?

I am developing an Android game. I have problem with bullet firing. It's a space ship that has to fire bullets but right now it's firing in a random direction. I have to fire a bullet to the enemy ...
3
votes
3answers
2k views

What are the benefits of using a 2D game engine on Android?

I have thought about just coding a 2D game on Android using just pure Java and the Android SDK, no engines like libdgx, cocoa-2dx attached. I don't know if I really need to use a game engine or not. ...
1
vote
1answer
2k views

Is there a way to make a game using lwjgl work on android?

I'm working on a platformer and I'd like to make an android version. Do I need to rewrite everything for android, or can I use something to make the lwjgl code work with android?
2
votes
2answers
5k views

LibGDX Swipe Detection Left and Right

I have displayed an image at the center of the screen with libgdx. If I swipe left, the image should move to the left; and, if I swipe right, image should move to the right. Subsequent swipes to the ...
2
votes
1answer
4k views

How to implement bullet physics in libgdx

I am new at game development want to know that how can I implement bullet physics in libgdx. I searched lot of things on Internet but nothing found worthy.
0
votes
2answers
3k views

Libgdx Animation Timing

I'm having a small issue with libgdx animation. I'm using getKeyFrame() to get the current frame of the animation and I'm updating the state time by adding on deltaTime in my update function for the ...
0
votes
1answer
973 views

Rotation of Rectangle along Y-axis transformed to parallelogram

After the rotation of a rectangular view along the Y-axis, about its center, transformed into parallelogram, how do I get the rotated parallelogram coordinates? By Y-axis, I mean perpendicular to the ...
2
votes
0answers
28 views

How do I create a scrollableparallax background in AndEngine GLES1 [duplicate]

In my game I want my background to move side by side as the player moves on screen in AndEngine. I moved my sprite using analogScreenControl. I am using AndEngine GLES1. i don't want to move my ...
4
votes
1answer
3k 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 ...
-1
votes
1answer
688 views

2d triangle with OpenGL-Es on Android

hey I am trying to draw a triangle on opengl es . I just followed a tutorial to do it. eventhough everything seems to be fine it does not work. everytime I run my code it sends me back to main menu. ...
8
votes
1answer
284 views

Collision Detection Slows Screen Drawing

I have recently been pursuing game development as a hobby, and decided that in order to learn the in's and out's of game development, that I should create a game and render everything myself (without ...
-3
votes
1answer
5k views

Difference between libgdx and andengine [closed]

How to choose between libgdx and andengine?. Some people suggest using ligdx. Some others prefer andengine. If someone is favouring one above the other what would he consider choosing betweeen the ...
-3
votes
1answer
264 views

java app goes too slow in android os [closed]

The problem is that my java app contains too many animated sprites and it runs very slowly on android system. Does the usage of .gif animation instead of sprite animation will improve the speed? I ...
0
votes
1answer
978 views

Using compressed(ETC1) textures in LibGDX

I use standard android tool for compressing PNG texture and archiving it with gzip: /android-sdks/tools/etc1tool texture.png --encodeNoHeader gzip texture.pkm Then I try to load it: FileHandle ...
4
votes
1answer
2k views

Poor image quality on Android through Unity Remote

I have started to work on the company's latest project using Unity3D and the workflow is just awesome. The problem is when running the game on a real Android device (using Unity Remote) the image ...
2
votes
2answers
3k views

How to Change default Mouse pointer on emulator in Android?

I want to change default mouse pointer in Android emulator. I want to change it for my game to use different type of cursor.I am using AndEngine for my game development. Is there nay way to change ...
4
votes
2answers
125 views

Should I target a mobile phone or simulation tools are good enough?

I'm starting mobile development, and I would want to know if it's necessary to target a specific smartphone, or nowadays one can run a simulation that will provide accurate data of how the game will ...
4
votes
2answers
4k views

Making color of sprite darker or lighter

Is there any way to make a sprite darker or lighter in AndEngine? I dont want to use the alpha thing. Nor I want to loose the texture/design of the image.
1
vote
2answers
5k views

What matrix operations do I perform to translate then rotate then translate then rotate?

In an android game I want to draw a running leg. To output the thigh I do something like: // legCX,legCY is the location on screen about which the leg rotates. Matrix m = new Matrix(); ...
1
vote
2answers
3k views

Detecting Screen Resolution in Android/AndEngine to display high or low quality images

I am developing a game with 1024x600 resolution. I can't target smaller resolution devices at this resolution, so I intend to use two graphics for the game. How do I detect which graphics to use for ...
1
vote
0answers
764 views

Using Gmail credentials to authenticate users [closed]

I am developing a game in which I want the user to be able to use their Google Mail account to log in. They should be able to simply click on a Gmail login button and be taken to the Gmail login page, ...
1
vote
1answer
969 views

How to detect screen boundary using AndEngine GLES1?

I am using the AnalogOnScreenControl to move my sprite around the screen. I would like to restrict the sprite so it can not move outside the screen boundaries. I have tried putting a line at the ...
2
votes
1answer
618 views

Shooting Bullets Around a Sphere

I currently have a ship that can orbit around a sphere freely controlled by a joystick. There is a separate joystick that controls the gun and starts shooting when it is touched. Right now the ...
1
vote
1answer
1k views

Drawing Sprites in Android OpenGL efficiently?

I want to basically give myself some sprite drawing functions (making use of openGL) such as; draw(Texture,x,y) I want to do this using OpenGL-ES 2.0 on Android. Since the textures can be varying ...
2
votes
4answers
1k views

Changing background images frequently within a specific time range with Cocos2D

I am working on a game development project for Android. We use the Cocos2d framework. I have to design a page which contains two background images, I need to switch these images repeatedly within ...
9
votes
4answers
611 views

As an Android dev, what should I keep in mind for porting to iPhone?

As an Android game developer, what should I keep in mind while developing my game if I ever wanted to cross-platform the game to the iPhone? Any strategies, tips, etc. on porting to both of these ...
1
vote
1answer
344 views

Horizontal scroll only part of the view

I would like to know the best way on how to implement horizontal scrolling to only part of the view and vertical scrolling to complete view. I was able to achieve horizontal and vertical scrolling to ...
4
votes
2answers
4k 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 ...
0
votes
2answers
2k views

Memory clean up in scene management (AndEngine)

I have developed and launched a game called Bicycle Doodle GLD. In this game, I load all the game resources at the initial loading scene. The game contains 24 levels, so only the resources that ...
0
votes
2answers
2k views

How to use the box2d contact listener in android (java port)?

I don't have any idea about the box2d collision detection in android. I googled and got results that suggest to use the contact listener but I don't know how to use it in android java.
1
vote
0answers
553 views

To stop Spite animation scrolling along the background in openGL ES

After using the endless road algorithm as described here, I also implemented the scrolling of walls along with it. I have the walk animation of the person which is stationed at the center of the ...
0
votes
4answers
4k views

hidden cost while deploying game with unity3d

I just started learning unity3d. I created a small 2d game, I want to host for windows, iphone, ipad, android, windows 8, xbox and even in websites. I created it using free unity3d editor. Now I want ...
0
votes
1answer
1k views

JBox2D simple example for Android? [closed]

I'm starting to develop an Android game. I've already installed jBox2D but I can't find complete code to develop a simple application from scratch using this framework. Thanks in advance!
2
votes
0answers
361 views

Camera - View matrix in Android + openGLES 2

I am trying to use the touch screen on the tablet to control my camera movements and generate the view matrix accordingly. I get the x and y coordinates of the screen and after doing some sanity ...
0
votes
1answer
407 views

Devices or Smartphones That Can Run and Displayed Images Properly While Power of 2 Code is Disabled

Before making game apps, I want to have any certain smartphone device brands that runs on OpenGL. I have to make a code for images that doesn't need to required power of 2 images so that I can resize ...
-1
votes
1answer
2k views

Create Box2D and engine polygon Box2D body without sprite

Hey I have created my body using following code: (please read full description) Body polyBody; final BodyDef mBodyDef = new BodyDef(); mBodyDef.type = BodyDef.BodyType.DynamicBody; ...
4
votes
1answer
1k views

How do I debug two android devices simultaneously in Eclipse?

I have a multiplayer game which should be tested on two devices at the same time, if possible, with debugging. Can eclipse do this? If so, how?
9
votes
2answers
2k views

Android real time multiplayer over LAN [closed]

I've developed several games for the android platform and now planning to create my first multiplayer game. What I have in mind is basically just a 2-player game witch you can play with 2 phones over ...
1
vote
0answers
3k views

Creating live wallpaper on Android with libgdx [closed]

I try to create live wallpaper with libgdx framework. Here's my source code: repository When I run this, black screen with name of the app appears (probably empty android layout). Main game is not ...
1
vote
0answers
528 views

Converting motionevent.getx and motionevent.gety to pixel or Object coordinates in the view

I am trying to draw buttons using OpenGL I have added a Gesture Listener for the GLSurface View now i have motionevent when ever the user touches. My question is how can i convert motionevent.getx and ...
0
votes
1answer
144 views

App Programming Question: Converting Code and Project Folders for the Smartphone's OS Compatibility [duplicate]

I was thinking about how does the Angry Bird game for the iOS successfully converted into an Android compatible version. Does it involve using Phonegap or something? When making games for iOS, the ...
1
vote
1answer
326 views

My game works on the emulator and the PSVita, but crashes on Android

I made a game on PSM, ported from a previous iOS/Android game. I test it on the emulator and PSVita and runs fine. However, as I test it on a PlayStation Certified Android device, it crashes on load. ...
3
votes
1answer
2k views

irrlicht for android

I was just wondering after noticing that moblox was.built with irrlicht if there is an android port of it? Or did the dev make his own port from scratch? From my research I noticed a port project ...
10
votes
2answers
1k views

How well do functional languages perform on Android?

This is a special case of this question that I feel is particularly pertinent. I'm working on a game for Android, and I'm planning on using Scala with libgdx. I'm planning on making a performant ...
4
votes
4answers
26k 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 ...