I've had issues with the same thing before. I would code my game on my computer, and then go test it at school or a friends computer and suddenly the "lag spikes" disappeared. I don't know if the issue is hardware related or what, but LibGDX has never played nicely with my computer. Maybe it was poor coding, I don't know.

I've given my .jar to a friend to test out, as well as I have tested it out on my gaming PC and a laptop.

My PC and laptop is using an AMD processor, my friend is using an Intel processor, we both get the chunky camera movement, so I don't believe it is isolated to our computers.

Not sure how I would use VisualVM to even test this out as I believe the code I use to render the map is extremely small, I can't really see how something would be affected by this. I've tried out 3 different maps, so I don't think it is something map related.

I have kinda same looking problem on my PC.. It happens on top 1/4 of the screen. It only happens when game window is at the upper most position on screen. If I move game window down, shuttering disappears o-o

this might not help, but i had a similar problem once when my laptop was on power saver mode and for some reason the cpu time% allocated to my program was lowered by windows. it made the frame rate very erratic.

ah you youngsters.ok now listenimplementing delta time correctly is very very hard. it will make your problems worse. the reason you would use it would be if you expect your game to go above or under 60 fps frequently. if not, using a constant delta time is absolutely recommended. either set it to 0.016 or ignore it all together.this board is old and there is a plethora of information, you may wanna read some of it.

bottom line, if this is pc only: cap fps to 60 make sure it doesnt go below, if it does then the game is slower, which is fine since it means the pc is too weak to play your game anyway.

ah you youngsters.ok now listenimplementing delta time correctly is very very hard. it will make your problems worse. the reason you would use it would be if you expect your game to go above or under 60 fps frequently. if not, using a constant delta time is absolutely recommended. either set it to 0.016 or ignore it all together.this board is old and there is a plethora of information, you may wanna read some of it.

bottom line, if this is pc only: cap fps to 60 make sure it doesnt go below, if it does then the game is slower, which is fine since it means the pc is too weak to play your game anyway.

As I've mentioned earlier in this thread and in the title of this thread....

check out gameloops and stuttering on jgoits not really that much of an issue with libgdx vsync

generally speaking if more stuff is going on the less it stutters; that is my experience. I think it has to do with the fact that when the cpu isnt very busy these spikes are more noticable.So my tip for is just keep developing the game and check back later

check out gameloops and stuttering on jgoits not really that much of an issue with libgdx vsync

generally speaking if more stuff is going on the less it stutters; that is my experience. I think it has to do with the fact that when the cpu isnt very busy these spikes are more noticable.So my tip for is just keep developing the game and check back later

Alright, thanks! So the best bet is to just enable vsync and keep on going?

generally speaking if more stuff is going on the less it stutters; that is my experience. I think it has to do with the fact that when the cpu isnt very busy these spikes are more noticable.

Just having experienced this problem myself, I asked google and found this thread. When moving around the map (Im not using tiled), the screen seems to get a small shunt or lag at a regular interval of about 1 second, even when I am multiplying my movement values by the delta.

I added in a for-loop to render all of my graphics 100x per frame, and the stuttering disappears completely. Very strange!

Does anyone know what is actually causing this? Something to do with the frame rate timer libgdx uses perhaps? It seems to me to be something that shouldnt really happen.

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