Trouble with a seemingly simple snake game(Solved!)
Posted: Sat Nov 19, 2022 8:50 pm
Hi! Thanks for your consideration in helping me and my friends out,
We've got a snake game here, operating in a 25x25 grid with no special obstacles,
the only special things going on is an aspect ratio library called SimpleScale, and the Moonshine library applying the CRT and Scanline shaders.
The game starts paused, you can hit P to un-pause it and will be assigned a direction, WASD and arrow key inputs are supported
The snake moves at the BPM of the soundtrack multiplied by the players score divided by 50, minimum 1
meaning the snake moves at 114 BPM and every 50 points his movement speed doubles.
The snake in question is actually a flute fish, and his snake body is comprised of stone fish.
His food ? People unfortunate enough to be in the water haha
So, the problem in question. Seemingly at random points the game freezes completely, no error codes, just a full crash.
I've tried making this error re-creatable but have failed, only knowing that it will EVENTUALLY occur.
If you hit F1 you will enable lovebird on its default settings, as well as a screen in game showing your texture and script memory usage/ FPS and etcetera. I haven't been able to find anything special happening on my end to cause this problem.
Through search on the forums someone did say it had something to do with the Lua51.dll file and JIT, so I tried using some code that they provided to fix the issue at the bottom of my main scripts load function, but the problem still occurs.
If anyone could narrow down why this problem is occurring that would help out allot I hope i'm just doing something madly wrong and it isn't on Love's end, as I really do enjoy this framework.
We've got a snake game here, operating in a 25x25 grid with no special obstacles,
the only special things going on is an aspect ratio library called SimpleScale, and the Moonshine library applying the CRT and Scanline shaders.
The game starts paused, you can hit P to un-pause it and will be assigned a direction, WASD and arrow key inputs are supported
The snake moves at the BPM of the soundtrack multiplied by the players score divided by 50, minimum 1
meaning the snake moves at 114 BPM and every 50 points his movement speed doubles.
The snake in question is actually a flute fish, and his snake body is comprised of stone fish.
His food ? People unfortunate enough to be in the water haha
So, the problem in question. Seemingly at random points the game freezes completely, no error codes, just a full crash.
I've tried making this error re-creatable but have failed, only knowing that it will EVENTUALLY occur.
If you hit F1 you will enable lovebird on its default settings, as well as a screen in game showing your texture and script memory usage/ FPS and etcetera. I haven't been able to find anything special happening on my end to cause this problem.
Through search on the forums someone did say it had something to do with the Lua51.dll file and JIT, so I tried using some code that they provided to fix the issue at the bottom of my main scripts load function, but the problem still occurs.
If anyone could narrow down why this problem is occurring that would help out allot I hope i'm just doing something madly wrong and it isn't on Love's end, as I really do enjoy this framework.