There are many, many programming styles, and some would argue that theirs is the best one to use, but the truth is that almost any style is fine as long as you are consistent when using it and it is clear and obvious what everything is and does.
#Game maker studio crashes on startup code#
The style you program in is the way you place your brackets, how you indent the lines, and how you declare and name variables, etc., and is essential to making your code clear and readable to other people (and to your future self, when you have to come back to this project after a time on something else). When it comes to writing code everyone has a style. With that said, lets move on and look at some general tips for writing good GML code that you can apply at any time. Basically, if it isn't broken, don't fix it and keep what you learn here for your next project. You have to strike a balance between readable, flexible and modular code with the time and energy required to change things, as well as the overall gain at the end. If your game runs fine and you are happy with things as they are, then don't rush to change everything just to squeeze a few extra FPS out. This is a guide, and not the be-all-and-end-all-definitive-100%-perfect method to write your game! The things mentioned here are generally more on the organisational and micro-optimisation scale and should be incorporated into your coding habits when you feel comfortable with GML and think that they are appropriate. If your Catalyst Control Center has the Switchable Graphics tab go there and browse to locate retro_maze.exe and set it for High Performance.In this article we are going to cover some "best practices" for when you are using GameMaker Language ( GML for short) to code your game, and at the same time explain a little bit about the inner workings of GameMaker Studio 2.īefore we continue, however, it is worth noting two very important points: If applicable to your graphics card, go to "Graphics" > "3D" and move the slider across to Performance so it is set for Optimal Performance ģ. Go to "Graphics" > "PowerPlay" - Set Plugged In and Battery to Maximum Performance Ģ. If you're using an ATI/AMD card, there's a huge variation between the Catalyst Control Center settings and it may vary, but should be found in advanced mode and be similar to this:ġ. If there's no such option, it means that the integrated gpu is already disabled and it is not the issue there. See if there's a "Preferred Graphic Processor" setting, change from "Auto select" to "High Performance NVIDIA Processor". Power Management Mode settings, select "Prefer Maximum Performance" ĥ. And also, it could be that the game is defaulting to integrated graphics rather than using the graphics card, usually if you're on a laptop.
#Game maker studio crashes on startup drivers#
First thing i recommend is reinstalling and/or updating your drivers if necessary, to see if it works. This usually happens due to graphics card driver-related issues. That is an error creating textures and graphics-related resources and is somewhat common within GameMaker: Studio games unfortunately.