I’m making my first game with MonoGame (and Nez), a very simple game where you shoot aliens that fly up from the bottom of the screen. I thought everything was fine until I did a release build of the game, opened the exe, and saw that the movement of the aliens were slower than in Visual Studio. When I run a debug build of the game in Visual Studio, the performance is completely fine (3500-4000 fps). Also, the movement of the aliens is always the same after each build, with them moving at the correct speed. However, when I run the exe of the same build outside of Visual Studio (either a release or debug exe), the fps is consistently about 1000 fps lower (though this is not noticeable, and I wouldn’t know this without the fps counter). However, the biggest problem is that the aliens sometimes move slower than they’re supposed to, despite the builds being the same. Everything else in the game runs completely fine, however. The menus don’t lag, and the timer in the corner seems to be running correctly; the aliens are the problem. Also, the speed doesn’t vary between alien to alien while the game is running; the alien speed is consistent when the game is running, it just varies between launches of the game.
I then wanted to see if this problem occurred on another computer (both the computer it’s being developed on and the test computer are running Windows 10), and after running the exe on the second computer, the aliens moved significantly slower than on my main computer. However, like before, the menus and timer are completely unaffected.
Is this a problem with my code, the way the exe is being built, or something else? I’m pretty new to MonoGame/Nez/C#, so my code might not be the most optimized/efficient. Linked below are related classes:
Alien (the individual aliens)
AlienScene (the Scene where the game is actually played)