1
\$\begingroup\$

I started working on a really really small prototype and when I ran the application i noticed the FPS was only half of what it's supposed to be at. FPS stays at around 30-31 instead of 60 - even when I literally erased all code from running sitting with an empty project it's still 30. I even tried to import an old project which used to work fine with high fps but it also runs at 30.

I also tried importing a LWJGL project and it worked fine with 60 FPS.

I've tried restarting my computer as well and other games run fine on my computer. Note that I've developed in LibGDX for quite a long time and never encountered this before - any help is appreciated!

\$\endgroup\$
  • \$\begingroup\$ My guess is that you use a windows laptop and you forgot to tell the nvdia settings to use the GPU instead of the Intel chip to run your game. \$\endgroup\$ – Alexandre Vaillancourt Dec 9 '17 at 13:29
  • \$\begingroup\$ @Alexandre I am not on a laptop. I'm on a stationary Windows 10 computer. \$\endgroup\$ – Dennis Björk Dec 9 '17 at 13:31
  • \$\begingroup\$ Ok, just checking the basic stuff :) Did you try using a profiler on your code to see what's going on? \$\endgroup\$ – Alexandre Vaillancourt Dec 9 '17 at 13:35
  • \$\begingroup\$ @Alexandre I solved it, apparently my AMD Graphics Driver had stopped working, I noticed when I right-clicked my desptop and tried to enter the settings but was met with an error message :) I'll definitely look up what profilers are, thanks for the advice! \$\endgroup\$ – Dennis Björk Dec 9 '17 at 13:58
  • \$\begingroup\$ I've also had this problem... After restarting either my IDE or my Computer the issue was resolved but came back later. I first suspected some strange GC issue with Java since it affected all Java programs; but after some extensive testing this does not seem to be the case. @DennisBjörk Nice to see that it was resolved! Now I'm left wondering what my problem is... \$\endgroup\$ – Charanor Dec 9 '17 at 13:58
1
\$\begingroup\$

The program was running slow because of a graphics driver that had stopped working. A reinstall got things back up running again! If you're in the same position as me, do what Alexandre suggested and check your nVidia settings. Also make sure that your current graphics driver is working. I noticed mine was broken when I tried to enter my settings by right-clicking the desktop and going into the "AMD Radeon Settings" and was met with an error.

To reinstall download "DDU", a display driver uninstaller. Disable all of your anti-vrius/anti-malware etc and run the program. It will create a system restore point and uninstall the graphics driver. Then download the driver again manually from the internet and things should be working!

Don't forget to enable the anti-virus again when you're done!

\$\endgroup\$
  • \$\begingroup\$ Lol tempted to say because it’s Java lol \$\endgroup\$ – ChaoSXDemon Dec 11 '17 at 2:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.