I noticed LibGDX puts game logic and rendering in the same thread.
Wouldn’t it be better to put them in a separate thread and let the CPU not bottleneck the GPU or the opposite?
However this could cause some “OpenGL context not found on current thread” errors or something similair.
I would like to find a solution that enables us to make use of all the cores our CPU’s have
Use multithreading for intensive things that can be done independently, like writing to bytebuffers or reading files, then use a single thread for the graphics context.
Although, in most common instances tuning performance is a better solution than trying to manage multiple threads.
It’s useless to update the game more often than its frame rate. The user only sees the current state of the game 60 times a second (in case of 60 fps) so computing it in smaller intervals would just be a waste of processing power. That’s what delta time is for.
It’s not about updating it more often but rather using all cpu cores so work is spread. There could come a point where the load is too much for 1 core and fps will because it’s handled on the same thread.