I am working currently with LibGDX and Java. Im wonder me, why LibGDX give you only a render Mehtod for game logic and rendering. Why LibGDX do this, why LibGDX does not inherited another mehtod like update ? And should I handle game Logic and rendering in the render method(Of course I split it in an render and update method)
Asked
Active
Viewed 3,648 times
3
-
render might as well be called "mainGameLoop" for all intents and purposes. – talloaktrees Mar 04 '14 at 00:52
1 Answers
5
Both render and update methods would be called consecutively if they existed. So there is not much point in separating them and complicating the API.
Of course, if you like, you can create two different methods and call them in provided render method (if you want to separate stuff). You can also conditionally call them if you sometimes want to call only update or only render.
The point here is that it serves simple purposes to have them combined and if you want advanced stuff you can always extend the functionality.

Tanmay Patil
- 6,882
- 2
- 25
- 45
-
-
http://stackoverflow.com/questions/21781161/how-can-i-do-something-every-second-libgdx – Tanmay Patil Jun 25 '16 at 15:43