We'll create instances of obj_wall, obj_player, and obj_coin on this layer later. In the Create Event of obj_generator, add the following code.įirst, let’s create a new layer called layer_level. This will be the only time you’ll use the vanilla room editor for this project! Drag an instance of obj_generator into the first room of your game so it’ll initialize itself as soon as possible.
VIDEO GAME MAKER STUDIO GENERATOR
It doesn’t need a sprite assigned to it because it doesn’t need to be seen the generator will do the behind-the-scenes magic.Ĭheck the “persistent” box on the object so it’ll be ever-present throughout your game, regardless of what room the player travels to. Because this controller object will eventually read a text file and generate levels, it can be named obj_generator. We’ll need to create a fourth object that acts as a controller. It’ll be up to you to add in player movement, wall collision, and coin collecting if you choose to turn this sample into a fully-fledged game. For more ambitious games, like large platformers, you might feel restricted.įor simplicity’s sake, I won’t assign any code to the three objects. For mazes and puzzles, this isn’t a problem. You’ll come to realize that one of the major limitations to designing levels this way is that you’re restricted to uniform grid size.
You’ll quickly come to realize that writing levels is less of a feat when rows and columns of symbols line up.Īll of my sprites have dimensions of 64圆4. Consolas is Notepad’s default font and it’s monospace. txt file extension saving.Ī typeface being monospaced means that each of the font’s characters are the same width. My reasoning is two-fold: monospace typefaces and easy. I recommend a code-oriented text editor like Sublime Text or Notepad++ over something like Microsoft Word. It’s similar to Notepad.Īt the end of the day, all you need is a text editor. Mac users, your device comes bundled with TextEdit. If you’re developing a maze game or puzzle game, I implore you to consider this approach. It’s the perfect tool for mass-producing tiny levels.
VIDEO GAME MAKER STUDIO SOFTWARE
This Windows-specific software is arguably the epitome of “bare bones” and “simplistic”. If you’re on a Windows machine, chances are you’ve used Notepad before. Writing your GameMaker levels in Notepad or TextEdit When GameMaker reads the text file, it will create the associated object at an (x, y) coordinate relative to the row and column of the respective character.
In the image above, all “X” characters represent wall objects, all “P” characters represent player objects, and all “C” characters represent coins.