View Single Post
Old October 2nd, 2012, 01:51 PM   #10 (permalink)
Senior Member
jonbonazza's Avatar
Join Date: Jul 2010
Gender: Male
Posts: 1,936
Device(s): Nexus 4, Samsung Galaxy S II, HTC Evo 4G, Amazon Kindle Fire
Carrier: ATT

Thanks: 235
Thanked 478 Times in 292 Posts

Okay, well changing the value of position.x is simply changing the value of a particular spot in memory. This operation takes next to nothing in terms of efficiency and in no way should cause an issue. As far as rendering goes, you would be rendering the frame regardless, and weather the enemy is at x=0 or x=800, as long as 0 > x > screenWidth, it's going to be rendered regardless.

In all honesty, I haven't worked with the OpenGL JNI bindings in the Android SDK in a LONG time, so I can't speak for how well they perform on modern devices any more than "It's going to be slower than going full C++," but If there are only going to be around 20 animated objects on the screen at any given time, I would assume that modern hardware would be able to handle it no problem. Unfortunately, without seeing your actual code, I can't really give you any hints as to where you could optimize.

With that said, you will never see the case of a 100% consistent framerate throughout the game. That's just not physically possible. You will always have dips, no matter how hard you try. The question is, are the dips so severe that it adversely affects gameplay or are the just dipping to the point where they are slightly noticeable?
jonbonazza is offline  
Reply With Quote
The Following User Says Thank You to jonbonazza For This Useful Post:
donovanvaught (October 2nd, 2012)