
Welcome to the first lecture where I introduce the game we will be making, and the concepts you will be learning throughout the course.
If you would like to play the final game, you can download the source code in the final lecture of the course.
The first time you will need to use the game sprites is in Lecture 4, so I've added the resource file with all the sprites, sounds, etc to that lecture.
Good luck!
Set up a new GameMaker project, enable viewports for a 60 fps camera, configure a 360x180 room view scaled to 1280x720, and create a player sprite and object.
** IMPORTANT **
Gamemaker changes leading to Variable <unknown_object> Errors
As of version 2.3 scripts are now automatically converted into functions, and will have the format:
function scriptname() {
}
Please leave this format intact, and ensure you place the contents of the course scripts inside the brackets.
Also note that when duplicating scripts, Gamemaker does not rename the function as well, so when you duplicate a script, you will have to rename them manually.
Change Script Colour Instructions
If you would like to change your script colour from the default of orange to something else, you can go to File > Preferences > Text Editors > Code Editor, then under Script Names change the colour. I am using hex value 8882C1 if you would like the same.
Capture the attack input via keyboard check, switch to attack state from idle or walk, reset image index, and manage frame progression toward transitioning back to idle or walk.
Ensure you do not add a semi colon to the MACRO definitions, as the macro will not work correctly.
If the Instance Creation Order is not showing for you, try clicking on another tab like Workspace, then click back to the rm_00 room tab, and the Instance Creation Order button should appear in the bottom left.
Gamemaker Version Update : The way collisions are calculated was changed in Gamemaker since the lecture, so to adjust for that change, you will need to go to the options, which is the little gear icon up the top, then enable Collision Compatibility Mode which is down the bottom of the first options screen. This will allow the player to sit on the tile. If you don't do this, the player will need to sit one pixel above the tile instead.
Not working?
If you are having problems getting the vertical collisions to work, you can download the source project file for this lecture and compare my code to your own. Gamemaker allows a 2nd IDE to be opened by going to File > New IDE, so you can have your project and the source project open at once.
We set the jump_spd to -5, which is not quite enough to jump up 2 tiles. If you would like your game to allow that, change jump_spd to -5.25 instead. Up to you though.
The finished project up to this point is available to download. If you are having problems you can download and upzip the file. When you open the file Gamemaker will prompt for a save location, so give it a name. Then you can go to File > New IDE and open a 2nd copy of Gamemaker and load your project, so you can have both projects open and compare the two to find why your one might not be working.
If you are concerned about the inconsistent jump heights, we address that later in lecture 51.
https://www.udemy.com/how-to-make-tile-based-platform-games-with-gamemaker/learn/#questions/6002422
The finished project up to this point is available to download. If you are having problems you can download and upzip the file. When you open the file Gamemaker will prompt for a save location, so give it a name. Then you can go to File > New IDE and open a 2nd copy of Gamemaker and load your project, so you can have both projects open and compare the two to find why your one might not be working.
The finished project up to this point is available to download. If you are having problems you can download and upzip the file. When you open the file Gamemaker will prompt for a save location, so give it a name. Then you can go to File > New IDE and open a 2nd copy of Gamemaker and load your project, so you can have both projects open and compare the two to find why your one might not be working.
Implement a double jump system in Gamemaker by tracking jumps with jump initial, resetting on ground or ledge, and using jump script across walk, idle, and attack states.
Import dust sprites for jump and land, spawn dust that flips with facing and drifts toward player, and use a jump dust script to fade and destroy on animation end.
Add a collision mask for idle and crouch states, switch mosque indices with Maskerade, and draw a semi-transparent bounding box (alpha 0.3) around the mosque.
Create a tile set from the castle graphics, then place left, middle, and right tiles to build the level. Add collisions and platforms, tune water animation, and preview gameplay.
Animate tiles in Gamemaker by selecting full frames, using nine frames to match the torch and full moon. Preview presets to see the torch and water animation.
Learn how to add a parallax background to a tile-based platform game by scrolling a moon image at a smaller amount than the camera to create depth.
Add a frog enemy to a tile-based game, assign sprites and a manual collision mask, set movement variables, an idle state, and breathing animation through a dedicated script.
Transition the frog from the jump start state to the jump state, apply vertical speed for the jump, and enable horizontal movement with speed and facing, plus gravity and collisions.
Detect ground contact in the jump state to switch to the jump land state, stop movement, reset image index and speed, then transition to idle after the landing animation.
Learn to add sword hit effects in Gamemaker, including explosions, knockback, and hit feedback; create sword hit objects with alpha fade and ensure one hit per swing.
Here are a few quotes from the reviews for the course:
"This is by far the BEST GameMaker Studio 2 tutorial I've ever taken! ... this course is SO. MUCH. FUN." - Frank
"Without a doubt, this is the best content I have found on learning GMS2: the instructor is obviously an expert in both GM and programming; the pacing is spot-on, the material is excellent and really teaches best practices. It really stands out as the best of all the paid and free tutorials on Gamemaker." - Craig
"Without a doubt one of the best Game Maker courses I've seen across all online learning websites. - Jason"
"This is a COMPLETE Course and its not just another introduction or beginners guide." - Ashanthra
"I was very impressed with this course. The engine design is elegant and well thought out." - Jonathon
Well have you always wanted to make your own game, but didn't know how?
This course will teach you how to build a very polished and professional looking game, in a short time. You will learn many tricks and techniques that can then be applied to making your own games. The possibilities are endless once you've gained these programming skills and you'll be experienced enough to start the process of turning your own ideas into actual working games.
The game you will learn to build here is very slick and professional and is a great platform from which to grow your skills. This could be the start of your game development career, or just a fun hobby, but either way I look forward to assisting you in your journey.
Within the course you will learn:
Finite State Machines (The absolute best way to structure your code)
Tile Based Collisions (Extremely fast collision method)
Cool looking psuedo particles (That interact with the environment)
Lighting Systems (That service multiple objects)
Scripted enemies and sequences (including enemy spawning)
Room Fade Transitions, highscore saving, custom tooltips and much more!
All the graphics and code is supplied, all you need to do is start learning and you could be making and releasing your own games sooner then you think. Every lecture is also presented in 1080p/60fps for maximum clarity while learning.
Gamemaker is free to download and use.
The course is taught by Peter Morgan. A former Mathematics and Computer High School Teacher who has studied the game making process, and products, for many years. I have previously used Gamemaker to release my first mobile game and currently work on assisting others to do the same.
Note: All code is yours to use as you like. Some graphic assets are public domain (tile sets, enemies) but some are copyright to Peter Morgan 2021 (player character, background, gui elements, game name and title page) and are not authorized for posting on Steam.