Hi, so I’m making a game in Processing but unfortunately, I can’t seem to get the program to run smoothly. Sometimes it will stutter while running, while the next time be completely fine even though it is running the same code the whole time and is quite minimal. I have already replace code so that objects are reused, but even just making a single line slowly draw along the screen by shifting x every frame causes stutters.
Not sure if I can upload a whole project here but I’m going to try:
Any help would be greatly appreciated!
I have tried multi-threading which didn’t seem to make it any faster ( thread() for calculating pipe’s positions separately in a while loop while draw() just draws the current state )
To play the game you press ‘S’ to go to the playing mode and press/hold space to actually make the game run