title: Android only game in OpenGL: performance in C++ (NDK) vs Java (Dalvik)
body: <p>I know that similar questions have been asked before, but...</p>
  
  <p>We want to develop (at least hope) an indie game but still a game with high quality graphics with hundreds if not thousends of moving objects on the screen so we expect very high number of polygons and requirements for hittest and perhaps some AI.</p>
  
  <p>I know the basic problem with java is garbage collection. But it's not an issue, we plan to allocate all of the required memory before the game starts and for transient objects we will use pooling (so in the game loop the new keyword will never be written). And we plan to use every possible techique mentioned here (<a href="http://www.youtube.com/watch?v=U4Bk5rmIpic" rel="noreferrer">Google I/O 2009 - Writing Real-Time Games for Android</a>).</p>
  
  <p>The main reason we insist on Java is deployment and we only want to develop for Android (for now at least) </p>
  
  <p>So can the same performance in a game be achived with Java (even if that means ugly/not idiomatic code) as if we did it with c++. If not, what are the specifics? Or perhaps if it's possible but very-very unpractical what are these reasons?</p>
  
  <p>(For example I read something about java Buffers and OpenGL are not the best pairing but don't remember the specifics - maybe some expert)</p>