Hello there!
I've tried to look up something similar to my issue, but I don't know if my issue is an issue with my own program or its a general java thing.
Here's a video of the issue:
The framerate drops seemlingly randomly for one frame from 16ms to 33ms, but that might just be aliasing issues with that comes from "Fixing your timestep"
However, sometimes when I distort space, for a second or two the framerate drops, then goes back to normal. The issue is that, during that time, nothing extra is really happening.
One container gets added to an ArrayList the first frame that the distortion happens, and the distortion animation is a single vector normalization followed by a multiplication that happens for, like, a a second. So nothing crazy or abnormal happens during the time that the framerate drops that isn't happening in the seconds after the framerate goes back to normal.
I know that java does a lot of very aggressive runtime optimizations. One of the only things warping affects is a function, getInfluence(vec2 pt), that describe how much a point gets distorted from its original position. This function get called, say, a couple thousand times a second.
Though, that function also gets called when the framerate goes back up (1:00 to 1:05 in the video)
Does anyone know what that framerate drop could be attributed to? It's really aggravating, and profiling doesnt really work on such sort, sporadic timespans. The real action of the game happens the moments after the distortion happens, and I really don't need that to accompany a framerate drop.
Thanks! :D