So, like I had mentioned earlier, I am gonna exploit Game Maker Studio for the next 2 weeks (That’s around 6 posts with one bonus post I guess? ) Since I am running outta time (a month and a half to my first interview) I have after this Cinema4D, Superpowers and Quants for aptitude to exploit!!!
Since it looks like I might run outta time, I am gonna make a post on random days (every alternate day for sure and a few inbetween days to boost up the process… maybe when I have holidays or something)…
Download Game Maker : Studio from here and well install it, make sure you opt for the license when you download. Sign in and open up the studio an there you go the unusually daunting scene of a new IDE!!!
There’s a lot of stuff and a lot of buttons as usual and it can be hard to really grasp what’s going on at first. Well, Games are complex things! And any powerful tool you can use to make one demands at least a certain level of complexity. GMS is however, a bit more user friendly (and not to mention money friendly) once you get over the first few hurdles. In my eyes it remains one of the best tools out there for a beginner game developer. Well I don’t know much of game making software (I kinda live under a rock)… Okay moving on… Let me try and make sense of how a game in Game Maker works, and how the different parts fit together so that I can move on to case study a few games that I am planning to develop for the coming 2 weeks.
That list of categories on the left is your Resource Tree. It contains every element of your game. All of your artwork, objects, levels and so on are kept in this list. When you make a new project,which I have made, it’s totally empty with a bunch of default folders that is available for you to add in the elements of your game. Right clicking on any of these categories provides a context menu that allows you to add a new element to that category.
So, that being said let me quickly jot down a few things I picked up on the kinda main directories meaning I’m gonna cover the four most important resources (that was mentioned somewhere I read from) and how they happen to work together. I still don’t understand most of this cause, but then again I am more of a practical person so it might take me a game or two to actually grasp the underlying essence, but I have read that understanding this should give you a clearer idea of how GMS works at a basic level, before diving into actually trying to make stuff that moves on logic.
Sprites, like I had mentioned in a JS Post (I don’t remember the number) is a picture which has a pix-elated all possible orientations and actions of a game object. Right at the top of the resource tree are “sprites”. Sprites contain the images and animations of your game objects. A sprite might be a single image or it might have a number of animation frames. They also have collision shapes (the jargon for the ka-boom of your game) that can be precise, rectangular, circular, etc. You can connect sprites to objects to have them show up in your room. Typically a sprite would be used for objects such as players, enemies, items and other interactive or animated elements of your game.
Backgrounds are similar to sprites, in that they are also an image resource. Unlike sprites however, a background image cannot contain any animation frames and does not have any collision settings. This generally makes them faster and less performance heavy than sprites, making them perfect for non-interactive… well… background elements of your game world.
This is the fun part. Objects are where we create all of the logic and interactivity of your game. An object might be an obvious, visual element of your game like the player character, enemies, items and walls. But invisible objects might also be used for something more subtle like tracking the number of lives the player has, controlling the music or volume of the game.
Objects can be assigned a sprite and contain an initially blank list of Events. You can then create events and associate those events with certain Actions. An event is something that happens in your game. The player pushing a key, the object colliding with another object, the object being created or destroyed, the game starting or ending, or even simply a step or frame of your game passing by.
When these events occur in your game, an object will carry out any actions it has associated with that event. Actions can be things like moving the object, destroying the object, having the object create other objects, changing variables and just generally making things happen inside of your game. This is the key to understanding how a game inside of GM functions. As your game runs, events are triggered, and actions are carried out. The player pushes left, and an object responds by moving left. Games that use the ‘drag and drop’ logic of game maker will use many different actions.
More experienced users will typically make primary use of the “Execute a piece of code” (which I will be using) action to effectively create “custom” actions using GML – Game Maker Language script (press F1 for the manual). As every drag and drop action has a script equivalent there is never an inherent need to use anything but code. This is the most powerful way to use Game Maker and it is highly recommended to learn! Since I am comfortable with coding I am gonna do this “Execute piece of code” for all of them except one, which will be an drag and drop equivalent of a game done using code.
So, Rooms can be used for many things, they act as containers for all of your game’s objects and background elements. It’s easy to think of rooms as simply the “levels” of your game, but more accurately they could be viewed as simply “screens”. A level of your game might be contained within a room, but so might your menu screen, intro screen, cutscenes, option screens, etc.
Your game needs at least one room to run, and Game Maker will always load the room at the top of the list (which you can re arrange) when you start your game. By default a new room has a grey background color and a set size. When you open a room a new window appears with a number of tabs: “Backgrounds, views, settings, objects” etc. On the settings tab you can adjust the size of your room.
You can also set the room speed on this tab. This ‘speed’ is the target frame rate (in frames per second) of your room and determines how fast the game operates. This can be an important value to remember when coding logic. If you create an object that moves 2 pixels per frame, at a room speed of 60, your object will move a total of 120 pixels per second. A kinda something that I realized after I made one…
The objects tab of the room editor allows you to add objects to your room just by selecting an object and clicking in your room. You can use this to construct your levels and game. No object you create will do anything unless added to a room in your game. (unless you add a new object during your game with an action or through code) You can also set up fixed or scrolling background elements using the background tab, or place background images in specific locations using the tiles tab.
There are many other kinds of resources you can use in GMS, but now that I know enough of the basics I can move on to making a basic (a randomly chosen retro game) game from next post onward!