Making a new game in GameMaker Studio 2
I’ve had a few cracks at learning GameMaker over the years. My most recent effort was in about 2015 when I put together a a Blackjack game and a word finder game of my own design (but which was heavily inspired by Boggle and Bookworm Adventure, at least in terms of the basic game rules).
Despite being primarily a tool to make programming simple, GameMaker can be a powerful tool. Ostensibly, you can drag and drop rules into place to create your dream game, but most of the tutorials rightly point out that the only way to get full functionality is by learning to code in GameMaker’s house language, GML.
GML is relatively easy to pick up. It’s very forgiving on syntax and a lot of common game functionality is built in. In short, it’s perfect for luddites like me who haven’t programmed since 1996.
This year, I’ve decided to give GameMaker—specifically, GameMaker Studio 2—another shot. It’s not that I hold any ambitions to be a developer, but I find the process of deciding what to build and then figuring out how to do it relaxing.
I’ve been putting together a simple space game where the player launches a missile at a target. The trajectory of the missile can be affected by the gravity of planets, so the player must aim away from the target and curve the missile home.
First, though, is making sure the game works properly. To do this, I started with a simple level: a player ship and a couple of planets. Initially, I had it so that the player used the arrow keys to aim the missile, but then I trialled the possibility of having the player aim with the mouse. It felt pretty good, but there were 2 problems: firstly, it might be tough to aim if I ever build a mobile version, and secondly that introducing planet gravity adds a lot in terms of required accuracy.
For the moment, I’ve settled with using either the arrow keys or the mouse wheel or two hastily programmed buttons to aim, while the game displays the angle at which the player will launch the ship. I’ll have to change this in the long run, as it only makes sense if the starting position for the player is on the left of the screen.
I’ve now built a very simple level with only the ship and a single planet. This is my balancing room where I can be a digital Slartibartfast. I’ve added buttons in to adjust the launch speed and acceleration of the ship, and to tweak the various parameters of the planet’s gravity. The aim, really, is to see how easily I can set up tricks like spinning round a complete orbit. It’s all a bit buggy and changing certain values to negative has a tendency to crash the game, but it generally works!
For the gravity equation, given that I haven’t done anything with mechanical maths or physics since my A Levels, I found inspiration on the excellent GameMaker forums. I’ve got another version of gravity to try out, which looks a bit simpler than the version I’m using now (although potentially just as customisable).
Once I’ve got a few planets I’m happy with, I intend to add targets to hit and then various pick-ups and options to make the whole thing more interesting. It’s all very tech demo-ish right now (and it looks very basic because I don’t really have any artistic skills to boast about) but I reckon there’s a pretty fun game buried in there.
In the meantime, click the link below to download the game installer and have a play on the balancing room level I’ve built. Feedback is welcome!
Download Gravity .exe file – Windows only – 15 MB