Search Results

Search found 3 results on 1 pages for 'droidmachine'.

Page 1/1 | 1 

  • Problem with drawing textures in OpenGL ES

    - by droidmachine
    I'm developing a 2D game for Android and i'm using the framework which has been told in the book which named Beginning Android Games by Mario Zechner.So my framework is well designed and using OpenGL 1.1.It's similar to libgdx. When i put my textures adjacent each other in my 2d surface,there are some spaces size as 1 px.But this problem only occur on my tablet.There aren't a problem like this on my phone.It's like in this picture: What can be the problem?I can't fix it from one week.

    Read the article

  • How do I draw a scrolling background?

    - by droidmachine
    How can I draw background tile in my 2D side-scrolling game? Is that loop logical for OpenGL es? My tile 2400x480. Also I want to use parallax scrolling for my game. batcher.beginBatch(Assets.background); for(int i=0; i<100; i++) batcher.drawSprite(0+2400*i, 240, 2400, 480, Assets.backgroundRegion); batcher.endBatch(); UPDATE And thats my onDrawFrame.I'm sending deltaTime for fps control. public void onDrawFrame(GL10 gl) { GLGameState state = null; synchronized(stateChanged) { state = this.state; } if(state == GLGameState.Running) { float deltaTime = (System.nanoTime()-startTime) / 1000000000.0f; startTime = System.nanoTime(); screen.update(deltaTime); screen.present(deltaTime); } if(state == GLGameState.Paused) { screen.pause(); synchronized(stateChanged) { this.state = GLGameState.Idle; stateChanged.notifyAll(); } } if(state == GLGameState.Finished) { screen.pause(); screen.dispose(); synchronized(stateChanged) { this.state = GLGameState.Idle; stateChanged.notifyAll(); } } }

    Read the article

  • Android OpenGL deltaTime Measure issue

    - by droidmachine
    I'm measuring deltaTime like that: deltaTime = (System.nanoTime()-startTime) / 1000000000.0f; startTime = System.nanoTime(); But I'm always getting different float values and because of that my game is stuttering.What can be the problem of that? 09-03 03:51:59.219: D/a(21807): 0.017184043 09-03 03:51:59.234: D/a(21807): 0.016405167 09-03 03:51:59.249: D/a(21807): 0.018071748 09-03 03:51:59.269: D/a(21807): 0.015293334 09-03 03:51:59.284: D/a(21807): 0.016080335 09-03 03:51:59.299: D/a(21807): 0.018669458 09-03 03:51:59.314: D/a(21807): 0.014720625 09-03 03:51:59.334: D/a(21807): 0.01605596 09-03 03:51:59.349: D/a(21807): 0.017086169

    Read the article

1