Is a great tool; it is especially suited for rapid development and small projects. However, as a project becomes bigger, it becomes more difficult to find things, easier to break it, and generally harder to work on. This is of course true for any production environment, and there are many things you can do to tame the beast of scale.
I VITMORA FORMULA j Vitamin A.25,000 USP Units ' (from Fish Liver Oils! Engines, appliances, gadgets to lighten labor and make for better living. Mm maker By John M. Mason What a fellow makes in his regular job today is. (1) Full simplified course on Industrial Electricity— this is the same text used by a.
Here are 60 things to make Game Maker projects more maintainable. General Use postfixes to prevent name clashes It is possible (but incorrect) to give, for example, an object and sprite the same name. To prevent this from happening accidentally, use postfixes to distinguish different types of game-elements (sprites, sounds, objects, rooms, and so on). Use postfixes instead of prefixes – this makes it easier to find specific objects in the object tree, and to read your code. EDIT The following Game Maker file illustrates how name clashes can lead to bugs: Use folders to structure resources Generally, the object folder structure should follow the inheritance hierarchy, with further separation as necessary.
Other resource folders should reflect the groups of the objects to which they belong, or be subdivided by their function. Use a Development Standards Document Compile and work from a development standards document to promote consistency across projects and between developers. At the very least, this document should define:. your naming convention;. your folder structure;. your layering convention (see below);. positions of controllers; and.
icon code (if you use one – see below). Resources Do not make the embedded drawing tool part of the pipeline if your main drawing tool is an external tool.
![Maker Maker](/uploads/1/2/5/4/125463961/871215780.jpeg)
This prevents every change from becoming an error-prone two-step process. Use dynamic content Loading images from files, creating sprites and objects dynamically, and constructing levels programmatically makes it a lot easier to change assets, since the Game Maker file doesn’t need to change whenever the asset changes. Design art around a grid Use a grid, and design objects for that grid to simplify world construction and object placement. GUI Draw your GUI in a separate room and overlay this room over every level. Use a widget-and-style approach for complicated GUIs For complicated GUIs, it is worth defining generic widgets (such as buttons or menus) that can be configured using parameters. Keep style elements (colour, font, borders) in separate objects.
This makes it easier to change styles in one place, instead of in every widget. It also makes it easier to make the GUI skinnable. Do as much of the GUI layout programmatically as is possible Laying out a complicated GUI can be extremely labour intensive, so that changes to the GUI layout can become unmanageable. Using layout functions can greatly improve the ease with which the GUI can be extended or otherwise modified. Extensions Make extensive use of Game Maker extensions Using provide several advantages:.
extensions make it possible to reuse functions more effectively;. extensions make it easier for more people to work together (people making extensions needn’t modify the main Game Maker file); and. extensions can be put under separate version control, and so reduce the impact of a roll-back. Every script function you define should be considered for implementation as a DnD action in an extension. It is useful to have a general usage extension, that you can use across projects, as well as a project-specific extension.
Remember to whether somebody has not already implemented a particular function in an extension! Document extension actions properly Don’t leave any of the fields (such as Description, List Text, and Hint Text) in the extension maker empty, and take care to make the List Text and Hint Text display as much field information as possible (by using the @keywords – see the Extension Maker Help Documentation). Spend time making (or searching for) proper icons for your extension actions Forgetting what an action does kills maintainability; a descriptive icon will significantly reduce this. Always define a script function for every DnD action This way it is easier to unit-test features (see below), and possible to use the functionality from a script. Actions and Scripts Learn how to use the merge facility effectively to facilitate for teamwork This is not Game Maker’s safest feature: there are many pitfalls, for example:.
be careful for name clashes; and. all elements get new IDs (so be careful if you use hard=coded IDs).
However, with careful planning, this feature can help several developers can work together on a project. For example, every developer works on his / her own file, which is merged into a final game. Avoid complicated branch logic in the GUI action editor Complicated branch statements are hard to read in the DnD interface, and editing these constructs is error-prone. Put complicated branch logic in a script. Avoid assigning too many variables in the GUI action editor Rather use a script. This way, tweaking the values of several variables becomes a lot easier. Never use the Execute Code action Always use the Run Script action, and put the code in a separate script.
This way the code is easier to find, reuse, and use in an extension. Always use blocks to demarcate if-then-else constructs in the DnD interface even when a statement block is only one line. This makes it much more convenient to add stements to the block in future, and reduces the risk of introducing a bug because of incorrect blocks. Make use of named global constants Using named constants makes code easier to read, less error-prone, and easier to change the value. If you define them in the Global Game Settings dialog, they appear highlighted in your code.
Use expressions as constant values You can use expressions when you define constants (in the Game Settings dialog). For instance, to define a colour, you can set the value as makecolor(255, 128, 64). Initialise the variables of an object in one place either in a single file, or as DnD actions in the Create event of that object. It might be better to do it in a file if you need to document usage.
Declare global variables in one file only This serve as an easy way to see all the global variables, and is a good place to document their usage. Always assign function arguments to named variables Like this.
1: globalvar activitydict; 2: 3: activitydict0 = bed; 4: activitydict1 = tv; 5: activitydict2 = stove; 6: activitydict3 = washingmachine; 7: activitydict4 = radio; 8: activitydict5 = noone; 9: activitydict6 = computer; 10: 11: assert(ACTIVITYCOUNT 7, 'The wrong number of activities have been initilised in the script 'init'); Always check that functions do not return noone When searching for the nearest instance of an object, for example, make sure that the function does not return noone (even when you think it is impossible). At the very least, display a helpful message. It is common that your assumption of impossibility might be violated by future changes. Use unit tests Write for all your script functions. You can also set up unit tests in special test rooms, that will test object behaviour in specific preset conditions. When you are protected with unit tests, you make make changes boldly.
Log success and failures to a file. Make unit tests runnable with command line parameter This way, unit testing can be automated.
Use the log file to detect failures. You can use the parametercount and parameterstring functions to get the command line parameters fed to the game.
Use a Game Maker file to put in unit tests for the general purpose library This special file will not only help detect bugs in your extensions, but also serve as a usage document. Implement a debug menu screen Implement a screen with special debug functionality, and only display this when the game is run under a special mode. The debug screen should have ways to:.
run any level;. run scratchpad levels (see below); and. run unit tests. Implement a test room for a scratch pad It is often necessary to test a new feature in a room that is already part of the game. Resist the temptation to test new features in existing rooms.
![Game Maker Text Box Engine Oil Game Maker Text Box Engine Oil](/uploads/1/2/5/4/125463961/982731222.jpeg)
It is easy to mess up a room when implementing a new, untested feature, and it can be hard to remove this feature if it doesn’t work out. Rather, have a minimal room ready that is fully integrated into the game, and use it as a scratchpad to test new features. Implement debug drawing mode In many cases your game can be too complex to rely on logging or inspecting variables one by one to perform adequate debugging. Drawing extra information with instances, and using colours and other graphical elements effectively, can make it a lot easier to spot errors. This technique is especially useful for AI and simulation. Implement cheats It is not only a useful debugging aid, but also guides the design (the technical design – not the game design!) to be more modular and flexible. A cheat (for example, a God-mode) that is hard to implement, can indicate a problem in the design (for instance, deductions to health is made in several objects, instead of in a single one or just a few).
Use a global game options to switch on and off some features For example, this can be used to display debug info, or skip some eye-candy to increase load speeds. Do not chaotically comment in and out pieces of code or action logic to achieve this effect: it is error prone in larger projects and in teams.