• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps A couple coding and development questions

Apologies, but still haven't had time to look at the code. For the delta time, are you use System.currentTimeMillis or System.nanoTime?
 
Hmm ok, well that's what you should be calling. Ill try to take a look at your code today once i get this task for my engine complete
 
I am looking at it right now and I don't see anything wrong with how you went about things. Hell, you even have a object pooling system implemented to reuse game objects in order to forego the overhead of instantiating new objects. You seem to be doing everything correctly, and on top of that, I still do not see the "enemy speed up" you guys are seeing.
 
Tell you what you should do: put a label in the upper right- or left-hand corner of the screen that shows the current fps. See if you can spot a drop in FPS at all, or even a speed up.
 
Another thing I can suggest is perhaps the GC is spiking at those points. Java game dev is a finicky sucker, after all.
 
well, as for the fps, I thought of that from the start, Xd I said at first post that I get consistent 52-54 fps. it literally fluctuates with almost a pattern from 52-54 and back. As far as the GC, um, what's that? and is there a way I can fix it? By the way I'm glad the code looks good! glad u like it, never sure if what I've learned and the stuff I come up with are ever good. and as usual, thanks for helping! :)
 
The GC is the garbage collector. Tho a spike in the GC woupd make the frame rate drop significantly, so if the fps is relatively consistent, i doubt thats the case. In all honesty i am at a loss. Ill take another gander today. I have one more thing i want to look at. Ill post back if i find anything
 
Back
Top Bottom