7
votes
3answers
1k views

Is a separate thread for game loop compulsory for simple games?

I am new to game development. In order to learn I am recreating this game on android platform. You can observe the game-play video at the above link. It is a simple game. I have read a lot of ...
0
votes
1answer
175 views

Framerate and game loop on mobile

I'm searching how to manage game framerate on mobiles devices, here is my problem: On a computer with got something like that: void main() { while(game.isRunning()) { ...
0
votes
1answer
91 views

either use a for loop or iterator for the List of sprites for loop Optimization in libgdx

I am making and there I am making a frequent use of java.util.ArrayList for enemies, coins and shots. Is there any other utility in libgdx better than this from the Performance point of view. ...
0
votes
0answers
76 views

Time on touch events?

Whats the best way to have a touch even cause an action for a specific period of time or deltaTime? It seems like it should be simple, but I have tried while and for loops based on int counts for ...
1
vote
0answers
83 views

Accessing variables from non-neighbouring classes specifically in game development (Android) [closed]

Edit Using direct access while breaking the law of demeter looks like this: res.sprite.drawQuad(res.sprite.xScreen,res.sprite.yScreen, mMVPMatrix); Using proxy methods / getters / setter looks ...
0
votes
2answers
417 views

Android Loop : Draw Loop : How to pull off smooth FPS?

I am writing 2D side scrolling bullet hell-like game. I am at a point where I struggle to pull off smooth fps. I have separated loop that manages drawing. However I want update the position of ...
6
votes
1answer
575 views

Android game loop's effect on cpu/battery usage - unexpected results

I will try to keep this question as concise and as readable as I can. I recently came across an odd problem with my Android game that I'm developing. It's an openGL ES 2.0 game and initially I was ...
2
votes
1answer
181 views

How to implement a multi-platform Java 2D game engine's graphics?

I'm not sure whether this question should be posted here. I'm trying to make a basic generic game engine in Java. Here's what I have so far. public abstract class Device { public abstract void ...
2
votes
2answers
236 views

Correct utilisation of gameloop (Android)

When using a gameloop like (much simplified)............ updateLogic(); render(); How does one perform 'single' operations? I mean, things like triggering sounds (which will only be played once), ...
0
votes
0answers
588 views

Android OpenGL ES 2.0 gameloop problems

I implemented a gameloop found here: http://www.koonsolo.com/news/dewitters-gameloop/ into my OpenGL ES 2.0 Android game. The tutorial was written with the canvas API in mind, not OpenGL so I made a ...
2
votes
1answer
2k views

Android: Improving surfaceView?

I'm using Surfaceview in my Android app. I have two threads, one for UI and another for rendering and updading the UI. I am limiting my frames per second to 30 fps and have employed frame-skipping ...
1
vote
3answers
854 views

Android, how important is deltaTime?

Im making a game that is getting pretty big and sometimes my thread has to skip a frame, so far I'm not using deltaTime for setting the speed of my different objects in the game because it's still not ...
2
votes
1answer
276 views

Handling various frame layouts in Android

I am trying create a Contra or the old TMNT game (but a simple one) like game for Android. For the game I decided to divide my main screen in three parts - upper for stats, mid for the game and lower ...
11
votes
2answers
5k views

how should i develop my android game efficiently?

I have attached a image of a flow chart that i made in paint. The image shows how i want to develop my game. I want a game that runs great with smart coding that is easy to update and ad features ...
3
votes
1answer
234 views

How can I organize code for views efficiently?

I'm making a video game for the Android platform and I need advice on the overall set up of the activities and views in the code. I don't need actual code, psuedocode will do, but actual code always ...
-3
votes
1answer
1k views

What can be the cause of sudden lag spikes in my Android game?

My Android game has sudden lag spikes sometimes. I know this is due to something going wrong. My phone has a 1GHz processor so there shouldn't be a problem. Basically I use the Canvas class to render ...
1
vote
2answers
690 views

Game Loop: Should resources be initialized in the game loop or in the respective classes? (both?)

For example, lets say we have an enemy class in my Android game project. I am initializing the enemy bitmap to be used with certain sprites in my game loops init. I am then calling the respective ...
4
votes
5answers
603 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 ...
4
votes
4answers
17k 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 ...
3
votes
1answer
2k views

Handling game states for Android

Currently developing a game for Android. I went through a tutorial to get sprites, loop, etc. up and running, and it all works fine. The way it is currently set up is that Main creates a canvas, the ...