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
1answer
50 views

Make a sprite jump to a certain direction in libGDX

I was wondering how you can make a sprite jump to a certain direction in libGDX just like the brick does in the famous mobile game "Amazing Brick' I want to make my sprite jump up a bit to the right ...
0
votes
1answer
48 views

Scene2d How to make it work for a Visual Novel

I kinda understand that you can use Scene2d for a Hud or stuff like that, I'm new to Java and so far I've done games that update in real time like let's say Flappy bird (simple games), so i wanted to ...
3
votes
2answers
234 views

Profiling LibGDX game with GLProfiler

I am trying to profile my LibGDX game, It runs on 60FPS on PC and 42-45 FPS on MY mobile phone. Either I improve performance and raise it to 60, or lock it at 30 (I don´t want to do this). I have ...
4
votes
2answers
658 views

How can I change width of sprite Dynamically?

I want to change width of sprite dynamically but i can't perform it.!! Here i want to change only my white sprite i want to use these type of facility in my game in using AndEngine I want to display ...
0
votes
1answer
3k views

Alpha Value at 0 Shows Black for Android Canvas Bitmap

There have been a few questions similar to this but none seem to give a straight answer. If I am creating a Bitmap from a .png image and want to set a color (i.e. true pink) to transparent, the color ...
0
votes
1answer
61 views

WiFi Game Controller Protocol

I'm wanting to use mobile devices to control a game. I'd like to use an industry standard protocol for wifi game controllers rather than roll my own, but have been unable to find any standard. Does ...
0
votes
0answers
101 views

How can I change the color of the default android drawable star?

I asked a question before and I got an answer to do this: Drawable drawable = getResources().getDrawable(android.R.drawable.btn_star); drawable.setColorFilter(Color.YELLOW, ...
0
votes
0answers
38 views

Create a new layout?

After the user gets to a certain score in my game, I wan't to display a medal next to the users name. Doing this pro grammatically will make the image disappear after the user leaves the app. How can ...
1
vote
1answer
44 views

How do I run an APK in a device from the Unity IDE without rebuilding the binary?

I know that the button Build creates the APK in my disk. And the button Build and Run creates it and sends it to a real device if connected via USB. Question: Is there any way to "Run" from the ...
1
vote
1answer
56 views

Admob - gradle configuration error

I've followed this tutorial https://developers.google.com/admob/android/quick-start, but I'm stucked at gradle configuration. I've added line compile 'com.google.android.gms:play-services-ads:8.3.0' ...
1
vote
0answers
42 views

Game layout is messed up?

After trying to add a banner ad to my game, the rest of my games content has moved up! I have the following XML code: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout ...
1
vote
1answer
31 views

How to add images?

I was adding images after reading in the documentation: This means that if you generate a 200x200 image for xhdpi devices, you should generate the same resource in 150x150 for hdpi, 100x100 for ...
1
vote
1answer
17k views

'Resetting' Google Play Games Services so app forgets it previously connected (so it shows confirmation screen again)

When I first integrated Google Play Games Services into my app, it came up with a 'confirmation screen', something like: App Name wants to connect to Google Play Game Services I don't recall the ...
1
vote
0answers
84 views

Unexpected behaviour after adding animator and Unity editor crash

I have realy strange problem which accured after adding animator(I suppose) to prefab Object. Situations looks like follow: I had object which have only sprite renderer, collider2D and script ...
1
vote
0answers
23 views

LibGDX: ActorGestureListener after change position

I have this code to get pan touch inside an Image and it works fine, but when I uncomment this line img.setPosition(100, 100); it doesn't work anymore, why? Texture tex = new ...
2
votes
0answers
45 views

Libgdx - multiple images in a group, best practices - also overdraw question

I am trying to right a card game, that will have an image in the middle, a coloured border and potentially a symbol in the top left. I am using libgdx and a stage/scene2d. The image will change ...
3
votes
1answer
29 views

How can I communicate a Joystick with a SurfaceView?

I have two classes: JoystickView (Extends View). GameView (Extends SurfaceView): It will be updated by a Thread that call the onDraw Method. Now, if I retrieve a direction by OnTouchEvent inside ...
2
votes
2answers
2k views

Error building Player: CommandInvokationFailure: Failed to re-package resources. See the Console for details

I get following error while building to Android with Unty 5.2.2f1 (with a new&clean project). Notes: I use GPGS 0.9.27 and Soomla Core 1.2.1 and Profile 2.2.1 and maximum supported Facebook ...
0
votes
2answers
410 views

Speed up loading of png files (used for textures) in Android OpenGL Game

My game has a few texture atlases that need to be loaded (in my XHDPI folder they total 3.49MB) and on a top-end device they don't take that long to load, however on a low-end device they seem to take ...
2
votes
1answer
90 views

LibGDX: Do I have to dispose a texture if I load it from AssetManager?

AssetManager manager = new AssetManager(); manager.load("texture1", Texture.class); manager.load("texture2", Texture.class); manager.load("texture3", Texture.class); //And so on... And then I load ...
-2
votes
2answers
177 views

C++ Multi-Platform (Windows, Linux, Android) OpenGL(ES) Solutions or Tutorials? [closed]

I'm sorry if this has been asked recently and I'm not Googling it right, but I've been digging all week for something. I've got a game prototype I made in Unity, and I have some decent experience ...
0
votes
0answers
222 views

Surface View show black screen

i need necessary help! please anyone?! My GamePanel's Surface View show black screen (or don't show at all) on testing even though in the code every-thing looks fine!! Am i missing something?! Note: ...
4
votes
1answer
89 views

Should texture regions sizes be power of two?

Is it advisable for my individual texture regions inside this texture to be power of two, or that won't make any difference? I've read on several places that it's recommended to use power of two ...
1
vote
0answers
77 views

error after changing the app name

I have made a game in Libgdx(eclipse).I changed the name of the app inside the string.xml file.Now I have an error in AndroidManifest.xml. in this line: android:label="@string/app_name"‬ (line 12). ...
1
vote
2answers
340 views

get View from LibGDX for Android

I am making a LibGDX app, and I need to get the view to put to an Android app. Here is the code to get the view: package jangkoo.game.shadowfiend.android; import ...
4
votes
2answers
105 views

What should be the code design for interactions management in a game with lots of object?

I'm writing a 2d game for Android in Java using LibGDX. The game consists many interactions between different types of objects. Most of them happen between enemies and bullets. At the beginning, I ...
1
vote
0answers
62 views

why doesn't work this example [closed]

I am new to game development. I was trying to use this http://blog.gemserk.com/2012/07/03/drawing-a-projectile-trajectory-like-angry-birds-using-libgdx/ projectile example in eclipse android using ...
4
votes
2answers
72 views

Does scene2d(libGDX) know when an image is drawn out of the screen?

I mean, I want to make a tiled map using scene2d, so in the render method of my game... @Override public void render(float delta) { Gdx.gl.glClearColor(0.5f, 0.5f, 0.5f, 1f); ...
0
votes
0answers
25 views

how to pin down a sprite partly in unity?

I am working on a simple do not let the bombs hit the floor game for android. You control a stick which can rotate to left or right depending on where on the screen you touch (left or right). But I ...
1
vote
2answers
86 views

How to make ranked matches in a head-to-head multiplayer game?

I am working on a field hockey like game for Android and iOS. Currently I support being able to play against another player online in a client/server fashion where one device host and the other ...
0
votes
1answer
94 views

Rotate heading relative to agent's local space

I'm having a little trouble translating a point in my game's world space to an object's local space. I have a cannon in my game with a normalized heading vector that's always supposed to point in the ...
1
vote
0answers
48 views

Image Buttons Have Low Resolution Quality

I'm using Synfig Animator to draw my animations for my android game I'm also using Android Studio to write the code for it, However. On testing, the images that i'm using looks very bad and unfocused ...
1
vote
0answers
27 views

Two devices calling the same servlet, one receives the intended response, the other receives null, but call is definetly made with valid parameters

I'm developing a multiplayer card game (this context only involves 2 players). One player invites other players. Once the game initiator sends all the invites, he goes to a "WaitingRoom" activity, ...
0
votes
0answers
27 views

Adding a score element to your android game

I said I'd show the following 3 classes so that you know exactly what I'm doing. The three class I posted are used in a game I'm working on and they are concerned with the login and register part of ...
2
votes
1answer
203 views

How do I check for collision between an ellipse and a rectangle?

I am working on LibGdx framework for developing a 2D isometric tower defense game.All my sprites are drawn in 2D isometric view. I have used an array list to store 8 points at boundary in the ...
-1
votes
1answer
102 views

Sprite disappears on android

I am programming a game in 2D for android and pc/mac. The sprite is the same and it's visible on the pc/mac. But once I use android and move the sprite, it disappears. The code is this: what could be ...
0
votes
0answers
24 views

Different layouts?

I have had trouble in the past with optimizing my game for different layouts, so that the players don't see the game in different ways on different screens. Someone told me that the normal directory ...
1
vote
1answer
38 views

Rendering sprites on a Mali-400 MP device

I started developing a small cross platform game engine using OpenGL, I am working actually on a sprite batch renderer. Everything is working fine on OS X, iOS, Win32, and some Android Devices. Here ...
0
votes
0answers
73 views

“Choppy” visual of game

I'm using interpolation to move objects on scene smoothly and in same speed. But in reality it looks like they are not moving smoothly - it looks like as game is running at 15 FPS or something like ...
0
votes
1answer
63 views

Libgdx fix small objects on android devices

I'm having issues with optimizing my game for android. I've basically created a simple menu with two buttons (see pictures below)! The size of the window is 720x480px ( in the Desktop Launcher ). My ...
0
votes
1answer
61 views

drawing a horizon / sky in OpenGL ES 2.0

I want to render a sky: My camera is at the origin, and I want there to be a white background for all world coordinates with z < 0 (would normally be considered y > 0, but I have a different ...
0
votes
1answer
58 views

How to Create levels in game in libgdx [closed]

I am create trying to create a Android game using Libgdx. I want to Create levels in game . So what i do. Which classes i need to use and how to create them explained. Plz help.Also i want to add ...
4
votes
1answer
559 views

Cross-platform C++/OpenGL ES development (iOS/Android) [closed]

I already have reasonable experience with C++ and OpenGL, and I have recently decided to try out mobile game development. After successfully creating a simple OpenGL ES Android app using Java, I ...
9
votes
0answers
298 views

Load ads in splash screen?

I have some ads that take a very long time to load. I was wondering it it is possible to have them load while the use was in the splash screen. I have looked at this answer: ...
17
votes
3answers
2k views

Saving player's progress in a Unity game

I am making a game using the Unity game engine. I want to save the player's progress including level, experience points, chosen character, etc. Presently I am using playerprefs but I want to know ...
3
votes
1answer
56 views

Libgdx - GLSL shader which uses mod doesn't seem to work properly on android

Through trial and error I've managed to come up with a scanline-ish shader I'm satisfied with. On my desktop testbed it looks like this: Basically, every 2nd(vertical) pixel is darkened. However, ...
3
votes
1answer
272 views

Why is my game freezing?

Ok here is what I have done. I have made a simple test game where you move a character around. I built it and installed the app onto 2 different devices (as it will be a multiplayer game later). ...
1
vote
1answer
95 views

How to implement constant velocity and collisions without gravity

I am learning game development and i am trying to implement the AndEngineBox2D Extension such that my character is always moving at a constant velocity, when it collides with a body sprite, the ...
-1
votes
1answer
103 views

How would I implement a realistic stock market?

I'm making a corporation simulator, and it contains stocks. In the game you can buy and sell stocks, but I can't implement a realistic change in the price for them. How do I make them change up/down ...
-2
votes
1answer
51 views

how to set in vector float x y coordinates [closed]

i am use eclipse java android i am try to projectile trajectory in my game like angry birds example here ...