0
votes
1answer
115 views

Game Taking too long during render cycles [closed]

Firstly, I'm not asking anyone to read my code. It is only posted as a reference just in case you want to. I am asking for general tips on how to get my game running at higher FPS on android, for ...
5
votes
2answers
728 views

Why is my gameloop logic not being restricted to 60 per second?

Here is my gameloop (taken from http://www.koonsolo.com/news/dewitters-gameloop/) which is supposed to limit the game (logic) updates to 60 per seconds and render as fast as the device allows: long ...
2
votes
1answer
213 views

does order of updates and renders matter?

I know in a game loop there needs to be an order like physics should update before rendering. So, I have created two separate functions: update and render and the game loops like below: ...
2
votes
2answers
395 views

How do I calculate consistent frame timings at 60fps?

I'm writing an HTML canvas game that uses requestAnimationFrame and therefore runs at 60fps, although this is more of a question about failing arithmetic than about JavaScript. If I measure the time ...
2
votes
1answer
331 views

Synchronizing input, update and rendering threads

How do you synchronise the input-handling, state-updating and rendering threads? If a sprite position is modified due to input, the wrong position of the sprite might be drawn to the screen if the ...
0
votes
1answer
428 views

Rendering Loop Problem (Java)

I'm not new to programming, but I am relatively new to game programming. I am trying to create a version of Breakout, as a good basic game to get myself introduced to 2d game programming. I currently ...
3
votes
1answer
224 views

Framerate control and physics engines?

I am reading this article on how to control the framerate and physics calculations. But in the game I am writing, I use a third party physics library and the only thing I do to update my physics is ...
1
vote
1answer
137 views

When updating a mesh, does glBufferSubdata belong in the update or render function?

When updating a mesh does the glBufferSubdata call belong in the update function or render function? I'm trying to organize my game appropriately and knowing this would help me. This is my first ...
16
votes
4answers
3k views

Should actors in a game be responsible for drawing themselves?

I am very new to game development, but not to programming. I am (again) playing around with a Pong type game using JavaScript's canvas element. I have created a Paddle object which has the following ...