I'm currently working on a tile-based game. The problem is: When i make a runnable jar file and open it in my computer, i have 55-60 FPS, but if one of my friends open it, the FPS don't pass 18. I have to mention that my PC is slower (in hardware) than theirs.

Since you wrote this, can we use it separate from LWJGL without having to meet the licensing conditions of LWJGL? Or at least adapt parts of it? I just don't want to do this part of the license x)

Quote

Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

maybe this kind of loop will help (inded feel free to replace currentTimeMillis by nonoTime...)

EDIT: after reading it dos not seems to be as good :/

this one seems better, it will do a fixed step logic/physic and will render only if at least one logic update has been performed (and then max FPS will be also limited to update logic rate but will run logic the same even on computer with very low FPS and will only consume requiered CPU on fastest computer):

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19

mainLoop(){time=getTime(); //System.currentTimeMillis or other methodintelapsedTime=(time-lastTime);intnbLogic=elapsedTime/20;intinterpolateMs=elapsedTime%20;

if(nbLogic!=0){for(intn=0;n<nbLogic;n++)doLogicFor20ms();//interpolateMs can be used to extrapolate rendering...drawAllObjectsOnScreen(interpolateMs);}elseThread.sleep(1);

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org