CaddieOpen in CaddieDownload for Mac

The stuff no one tells you about game development (Developing 7)

Shared by Caddie Library · Updated
Game Maker's Toolkit12:53Open on YouTube
Chapters show their main points

The bottom line

Building the dull behind-the-scenes systems and custom tools early makes a game far faster to build. Once they were in place, new puzzles came so easily that Mark nearly finished a new demo by accident.

Key takeaways

  • Copying the same code into every level made the first prototype slow and rigid. 2:58
    • Every level had its own copy of saving, loading, level transitions and the pause menu.
    • That slowed testing, cluttered the hierarchy and made options hard to change or track between levels.
  • Invisible managers that persist between levels keep game-wide logic apart from level design. 1:56
    • An options manager is tagged "Don't Destroy On Load", so each new level can ask it for settings like magnet colour.
    • Separate managers handle transitions, music, the HUD, the UI menus and progression.
  • Driving the level structure from level file names makes the game easy to rebalance. 5:09
    • A progression manager ticks off collected keys and saves them, and a hub level has doors to the puzzles.
    • A name like "01 Lift 02" gives the hub and the key, so renaming a file reorders the levels.
  • Custom tools built for this one game remove the repetitive work of editing levels. 7:17
    • Resizing and recolouring one electromagnet meant about nine separate manual changes. Now a single slider does it.
    • Gizmos show where a moving box travels, a prefab window lets him drag mechanics into scenes, and a pipette asset picks objects for Unity Events.
  • Efficient tools let him build four or five new puzzles and most of a demo without planning to. 10:00
    • He built a puzzle to test the tools, fixed each annoyance, then kept building levels until he had about 90 percent of a demo.
    • He argues a little extra pain at the start saves much more time and effort later in development.

Unity is a tool for making games, but it's not a tool for making my game, because that's on me.

Mark Brown, Game Maker's Toolkit

Chapter summaries

0:00 The dull systems every game needs

Levels ask one persistent manager instead of storing settings
Moving game-wide settings into one object that survives level loads ended the duplicated code that made the MVP slow to test and change.

A finished game rests on unglamorous systems that dev diaries rarely show.

  • Much of game development is dry but necessary work. 0:27
    • Menus, the HUD, saving, controller support and progress tracking all need building.
    • Prototyping mechanics, designing levels and surprise demo drops make better footage.
    • The series aims for a transparent look at making a game, so the boring parts get shown too.
  • Player options only work across a whole game if one system syncs and saves them. 1:10
    • Options include hold or toggle aim, key remapping and magnet colour.
    • This was fine in a throwaway test level, but a full game needs syncing, saving to disk and a settings UI.
  • Levels ask the manager questions instead of holding their own settings. 2:28
    • The character asks about low sensitivity aiming. A panel asks about accessibility symbols.
    • This separates game-wide logic from moment to moment level design.
    • It seems obvious in retrospect, but the MVP didn't have it.

3:25 More managers and a non-linear structure

Renaming one level file reorders the whole game
Players can skip a puzzle they are stuck on instead of hitting a brick wall, and balancing comes down to changing a name or one number.

Each manager does one job, and an open level order suits a puzzle game better than a straight line.

  • Single-purpose managers handle transitions, music, the HUD and menus. 3:32
    • Send the transition manager a level name and it wipes into that level.
    • The music manager fades out and in with each load.
    • HUD button icons change when the controller changes.
    • The UI manager holds the pause and options menus. They are ugly for now, and polish is a "Future Mark problem".
  • An open level order avoids walling off stuck players. 4:27
    • Portal and Inside are linear. Braid, Stephen's Sausage Roll and Baba Is You let players skip and return.
    • He dislikes giving the player a big brick wall because one puzzle stumped them.
  • A final door gated by a key count makes balance a single number. 5:38
    • The count is easy to change as he tweaks the game.
    • Level names carry the data: the first two characters give the hub, the last two give the key.
    • Systems read the name and pull out the strings they need.

6:29 Building tools for your own game

Custom tools turn long editing chores into one click
TaskMVP: by handCustom tool
Shorten electromagnetResize effector and beam, move particles, cut lifetimeOne height slider
Switch red / blueChange colour, layer, tag, collider maskOne button
Moving box pathRead numbers, guess the routeGizmos show start, end, path
Place a mechanicFind prefab, set it upDrag from prefab window
Wire a Unity EventHunt through hierarchyPipette click in scene
The rule: if a change happens often and is a fixed sequence of steps, script it into one button press.

Level design gets fast once repetitive edits are turned into one-click tools made for this specific game.

  • Rote edits to a mechanic should become a single control. 7:17
    • The electromagnet panel now has an inspector slider for height that updates every linked variable.
    • Buttons switch it between red and blue, or on and off.
    • The rule: if a change happens often and is a fixed sequence of steps, script it into one button press.
    • Moving something one tile, or opening a door at the start, used to mean the same long chore.
  • Visual aids and a prefab window make building levels feel like play. 8:06
    • Gizmos show where a moving box starts, ends and the path between.
    • A dedicated window lets him drag mechanics into the scene, like I'm playing Super Magnet Maker.
    • Each older MVP element was updated to be easier to use.
  • A pipette picker removes the hunt through the hierarchy for Unity Events. 9:30
    • A button's event can run any function on any dragged-in scene object, such as turning off the electromagnetic panel.
    • Finding the target in the hierarchy was the annoying part, so he wanted a Photoshop-style pipette.
    • A more skilled developer built it, and he uses it constantly.

9:34 Testing the tools and the surprise demo

Building levels to test the tools produced a near-finished demo, which answers the MVP's feedback and is free to play.

  • Each test level exposed a bottleneck that was then fixed. 9:41
    • He kept building puzzles until he had a hub and four or five new ones.
    • He joked, Did I just accidentally make a video game?
  • The new demo targets the MVP's main complaints. 10:51
    • Players found the character crummy to control and the visual language inconsistent.
    • Platforming mixed with puzzles confused some, and most puzzles lacked an "aha" moment.
    • Levels were messy and buggy, with waits for cycles to reset.
    • The game did not feel built around the magnet mechanic.
  • The demo is open to everyone for feedback. 11:39
    • It runs on PC and Mac, with keyboard and mouse or controllers, on itch.io.
    • Feedback goes in the comments or on itch.io and will guide what comes next.

In the growth library

Mark Brown, creator of Game Maker's Toolkit, making his first game. Shows the unglamorous groundwork behind a puzzle game: persistent manager objects, a non-linear hub, level order driven by file names, and custom tools that speed up level building. The memorable payoff is that good tools made building puzzles so fast he accidentally ended up with most of a new demo.

Lessons that draw on this:

More from Game Maker's Toolkit · The whole library, and ask it anything

Transcript130 lines
0:00

Hi! My name's Mark and I am making a video game about magnets. So, one of my goals with this series is to show you a true, transparent, and unvarnished look at what it takes to make your very own video game. And part of that means I can't just show you the stuff that's fun and exciting and makes for good video footage, like prototyping game mechanics, designing levels, or doing surprise demo drops. And, as it turns out, there's a lot of stuff in game development that just isn't very glamorous.

0:33

Stuff like menus, the heads-up display, saving and loading data, supporting different controller types, syncing options, tracking progress, doing level transitions, and more. This is stuff that doesn't really get shown in dev diaries and documentaries because, in truth, it's very dry. But someone's got to make this stuff. And in this game… that someone is… well it's me, isn't it?

1:10

Okay, so last time on this series I completely overhauled my character controller. And part of that meant giving the player some options about how the character works: like letting you change from holding the button to aim, to toggling it on and off. Or letting the player remap all of the keys and controller buttons. Or letting the player change the colour of the magnet. And this was all well and good for a throwaway test level, but if I want these options to work across an entire game I'm going to need to find some way to sync these options from level to level, let the player save and load these options from their hard drive, and provide some kind of UI to let the player set these… settings.

1:52

And so after a bit of fiddling around, here's what I came up with. When you first load the [game] to the title screen, I spawn in an options manager. This is an invisible game object with a bunch of scripts to track the player's options and save and load those options to the hard drive. And the object is tagged “Don't Destroy On Load”, which means when the player starts the game, the title screen is deleted from memory and replaced with a level but, the options manager hangs around like a bad fart. And because it's still there in memory, the new level can find the options manager and essentially… ask it questions.

2:33

Like the character can say ‘should I have low sensitivity aiming right now?’ and the magnet can say ‘what colour am I supposed to be?’ and this panel can ask ‘should I have accessibility symbols on right now?’ What I've essentially done here is decouple the meta level game logic from the moment to moment level design. Which might seem kind of obvious in retrospect, but I definitely didn't have this during the MVP. There, every level had its own duplicated version of the code for saving and loading progress, transitioning between levels, and there was even a duplicated version of the pause menu in every level in the game. It was wildly inefficient, it made testing levels slow, it added all this extra junk to my hierarchy, it made it difficult to change any of these options, and it was hard to track stuff between levels.

3:25

This new system is much, much smarter. So I decided to create a bunch more of these invisible managers. Now, you can send a level name to the transition manager and it will wipe away the current level and wipe into the new level. That's paired nicely with the music manager which takes the non-existent soundtrack and fades out and in with the level load. There's also the HUD manager which draws stuff on top of the screen, like these tutorial prompts and these context sensitive button icons. Which, yes, do change if you change your controller. And I made a UI manager to hold the pause menu and the options menu. Which, yes, is hideously ugly right now. I'm just focused on the functionality - I’ll make it pretty in the future.

4:16

Just like sound design, UI design is a Future Mark problem. And, yes, I realise that Future Mark problems are starting to stack up a bit. But there was one more manager I wanted to build. So, back in the MVP, the game moves from level one to level two to level three and so on. And I'm not sure if such a linear progression of levels is the best for a puzzle game. Sure, some puzzle games do have this like Portal and Inside. But others, like Braid, Stephen's Sausage Roll, and Baba Is You, have a more open-ended structure. You can skip levels, play puzzles out of order, and come back later to puzzles you skipped in the past. And I kind of like this. I'm not keen on giving the player a big brick wall just because they got stumped on one of the puzzles.

5:09

So I wanted to build a non-linear level structure into my game, and here's how I did it. In each level the goal is to find and collect a key, and I have a new progression manager that has a list of all the keys in the game and it ticks them off when you find one, and it saves that data to the hard drive. I built a really simple hub level with doors that go between the different puzzles and a special door at the end that is only unlocked after the player has a certain number of keys.

5:38

A number that I can very easily change as I tweak the balance of the game. And speaking of tweaking and balancing I wanted to make it really easy on myself to change the order of the levels based on players feedback about the relative difficulty of the puzzles. So the whole system is essentially routed through the level's file name. The levels are named something like 01 Lift 02, with the first two characters denoting which hub the level belongs to, and the last two characters denoting which key is found in that level. And then all of the relevant systems just read the level name and pull out the strings they need, to find out where the level belongs. And this means I can change the order of the levels just by renaming the files, which is super efficient.

6:29

And while we're on this efficiency kick, let's talk about tools. So another thing I found in my MVP was that it was really kind of frustrating to build and especially iterate on level designs. Like let me give you an example: if I want to take this electromagnet and make it a bit shorter and change it to be red, I need to resize the area effector, resize the visual for the beam, move the particle system and reduce its lifetime, change the particle colours, change the beam’s colour, change the sprite’s colour, change the magnet’s layer, change the buffer zone’s tag, and change the area effector's collider mask.

7:07

And now imagine doing this for pretty much every mechanic in the game just because you want to move something one tile up or you want to start the level with a door open rather than closed. And what I came to realise is that Unity is a tool for making games, but it's not a tool for making my game - because that's on me. I have to put in place the tools and systems that will allow me to generate content for my specific game. And so with that in mind, the new version of the electromagnetic panel has a simple slider in the inspector for the height, and as I move this slider up and down it's automatically updating all of those variables I talked about earlier. Same for these buttons to change it from red to blue, or on to off. Basically, if there's something in my game that I want to change a lot and the process of doing it is just a rote sequence of steps, I might as well build a simple script that can do it all in a single button press.

8:06

And so I updated more and more of the stuff from my MVP to be more easy and efficient to use. Like this moving box: I now use Unity's gizmos to show me exactly where the box will move from and to, and the path it will take. I also set up a dedicated window just for my prefab game mechanics so I can drag and drop them into the scene like I'm playing Super Magnet Maker. Oh, and another thing that annoyed me in the MVP was Unity Events. Not the events themselves, they are amazing. They basically work like this: in, say, the code for this green button I can say when the button is pressed just ‘invoke a Unity Event’. And then, back in the editor, in the inspector I have a really simple field where I can just drag in any object from the scene and have it run basically any function on it. So, now, when I press the green button it turns off the electromagnetic panel. Really powerful stuff for a puzzle game. But

9:06

it's a bit frustrating that I have to find the relevant thing in the hierarchy. It would be super amazing if I just had a Photoshop-style pipette to click on the object in the scene. And so I abused my internet fame to get someone much smarter than me to just build that exact thing I described, and it is amazing, and I use it all the time. There's a link to the GitHub page for this Unity asset in the description for this video.

9:34

So now that I've built a bunch of tools that should hopefully make it easier and more efficient to design puzzles, I decided I might as well test it by building a puzzle. And, yeah, it was a lot more efficient. But there were still a few annoyances and bottlenecks to the process, so I fixed them and tested it again by building another level. And then another level. And another level, before realising something… I now have a whole fleet of system level managers working in the background. I have this whole hub structure built. And I've made four or five brand new puzzles. Did I just accidentally make a video game? Whoops!

10:16

It's funny, I genuinely wasn't planning on making a new demo for my game, but I've got like 90 percent of one on my hard drive now. I think it just goes to show how powerful it can be to have efficient tools. They can make building the game so fast and easy that you can build stuff without even realising it. So I think it's worth putting in a little bit of extra effort and a bit of extra pain at the beginning of the process, because it will just save you so much time and effort and heartache for the main part of the game's development.

10:51

But whatever the case, this is awesome because, again, back in the MVP, there was a lot of feedback I needed to address. Stuff that people didn't really like about the game: like the character feels incredibly crummy to control, there's lots of annoying inconsistencies in the visual language, the mix between platforming and puzzles had some players confused about how to play, most of the puzzles fell short of that ‘aha!’ eureka moment, many of the levels were messy and buggy and had you waiting around for cycles to reset, and the game didn't truly feel like it was built around this magnet mechanic.

11:27

So this new demo, Untitled Magnet Game version 2.0, is a chance for me to fix all of those problems and see what people think of the game now. And so I would love it if you could pop over to itch.io and play this brand new… surprise demo drop. Yes, I had to do it. It's available to everyone, not just patrons. It works on PC and Mac, you can play it with keyboard and mouse, or with various different controllers. Please give it a go and drop me some feedback either in the comments on this video or over on Itch.io. And then I will come back discuss the new round of feedback and see where I should take the game next.

12:09

Thank you so much for watching, have fun with the game, and I'll talk to you soon… Oh, before I go the GMTK Game Jam is back for 2022. It starts on July 15th, so while you're over on Itch.io just sign up for the game jam there as well. I'll see you soon.