FriendlyCosmonaut
Farming RPG Tutorial: GMS2 [Intro for Beginners]
updated
Video outro, intro & music by the wonderful Vossel.
Documentation page for instance variables: manual.gamemaker.io/monthly/en/GameMaker_Language/GML_Reference/Asset_Management/Instances/Instance_Variables/Instance_Variables.htm
Credits:
Sarah Bernhardt as Hamlet, with Yorick's skull (James Lafayette): en.wikipedia.org/wiki/Hamlet#/media/File:Bernhardt_Hamlet2.jpg
SNES Controller in Hand (Evan Amos): en.wikipedia.org/wiki/File:SNES-Controller-in-Hand.jpg
Video chapters:
00:00 Intro
00:14 Description
01:41 What is an object
02:22 Create an object
02:44 Naming conventions
04:36 Objects vs sprites
05:34 If this, then that
06:00 Events
06:55 Code vs visual scripting
09:05 GML basics
11:00 Destroy function
14:26 Classic bug: forgot to add my object
15:50 Individual object instances
18:04 Mouse click vs global click
19:16 Instance variables
20:00 Speed and direction
22:11 Wrap up
22:30 Outro
Outro and Intro video sequences and music were created by the wonderful Vossel.
00:00 Intro
00:14 Download and setup
01:10 New project
01:58 Interface basics
03:30 Rooms
05:16 Layout and restore
05:51 Sprites
08:01 Image editor
11:45 Room layers
13:13 Backgrounds
17:12 A wild bug appears!
17:56 Debugging
19:26 Fixing the bug
20:19 Asset Layers
22:17 Sprite Origins
23:35 Wrap Up & Outro
CREDITS
- The Array Ballot method was first introduced to me by @sanbox_irl
- Vossel created the amazing intro and outro video, and the intro song
FIND FRIENDLY COSMONAUT ON
- Twitter: twitter.com/friendly_cosmo
- Ko-fi: ko-fi.com/friendlycosmonaut
CREDITS
- Vossel created the amazing intro and outro video, and the intro song
FIND FRIENDLY COSMONAUT ON
- Twitter: twitter.com/friendly_cosmo
- Ko-fi: ko-fi.com/friendlycosmonaut
TIMESTAMPS
0:00 Intro
0:50 Exploring objects
3:42 Object events
7:39 Resource tree structure and order
9:20 Caution areas - git woes!
12:48 Exploring "the master file", our project .yyp
13:17 Sprite woes tangent
13:53 Back to the .yyp
17:12 Exploring sprites
20:01 Breaking stuff on purpose! (missing sprite reference)
22:54 Rooms and making ghosts (missing object reference)
26:12 Wrap up
CREDITS
- Vossel created the amazing intro and outro video, and the intro song
FIND FRIENDLY COSMONAUT ON
- Twitter: twitter.com/friendly_cosmo
- Ko-fi: ko-fi.com/friendlycosmonaut
TIMESTAMPS
0:00 Intro
0:40 Committing a sprite
2:03 Remember to hit SAVE!!
3:14 Discarding change
4:45 Selective discards
5:22 More complicated discards
6:45 Wrap up
Blog post by Mark Alexander on 'Setting Up and Using Source Control in GameMaker':
help.yoyogames.com/hc/en-us/articles/360008803978-Setting-Up-And-Using-Source-Control
CREDITS
- Vossel created the amazing intro and outro video, and the intro song
FIND FRIENDLY COSMONAUT ON:
- Twitter: twitter.com/friendly_cosmo
- Ko-fi: ko-fi.com/friendlycosmonaut
TIMESTAMPS
0:00 Intro
0:59 GameMaker's integrated source control tools
6:00 On staging vs commits
9:00 Alternative Github/Desktop GUIs and hosts
11:59 Wrap up
DOWNLOADS
Git: git-scm.com/downloads
GitHub Desktop: desktop.github.com
Sign up to GitHub github.com/join
Visual Studio Code (code editor) code.visualstudio.com
CREDITS
- Vossel created the amazing intro and outro video, and the intro song
FIND FRIENDLY COSMONAUT ON
- Twitter: twitter.com/friendly_cosmo
- Ko-fi: ko-fi.com/friendlycosmonaut
TIMESTAMPS
0:00 Intro
0:50 Downloading and Installing Git
3:22 Downloading GitHub Desktop
3:57 Making a GitHub Account
5:31 Linking GitHub Desktop with GitHub
6:54 Making a repository
12:36 Publishing the repository to GitHub
13:33 Moving GM project into the local repository & making our first commit
18:26 Local vs Remote copy refresher
20:28 Clean up & Fixing up GameMaker project
21:15 Wrap up
DOWNLOADS
Git: git-scm.com/downloads
GitHub Desktop: desktop.github.com
Sign up to GitHub github.com/join
Visual Studio Code (code editor) code.visualstudio.com
CREDITS
- Vossel created the amazing intro and outro video, and the intro song
FIND FRIENDLY COSMONAUT ON:
- Twitter: twitter.com/friendly_cosmo
- Ko-fi: ko-fi.com/friendlycosmonaut
TIMESTAMPS
0:00 Intro
0:41 What does source control do?
2:19 Outline
4:52 Setup demo
8:48 Setup review
9:40 Workflow & commit demo
11:41 Brief interlude on branches
12:35 Making a commit
15:40 Pushing commits, local vs remote copy
17:26 - Git is a distributed system
20:28 - Pulling in changes, & fetch
23:09 - Wrapping up - further discussion?
Check out YoYo's blog about the release and how to get access: yoyogames.com/blog/565/gamemaker-studio-2-version-2-3-beta-release
Catch up - 0:00
Converting a project - 4:14
Resource tree changes - 5:05
Sprite editor - 18:00
Scripts & functions - 24:30
Chained accessors - 45:10
Functions again (Scope) - 48:20
Optional arguments kerfuffle - 58:15
Object functions use case example - 1:04:48
Drink break - 1:10:10
Data structures refresher - 1:11:48
Structs - 1:19:15
Method interlude - 1:22:00
Structs - 1:26:30
Garbage collection interlude - 1:33:09
Structs - 1:41:08
Break/sequences interlude - 1:45:35
Constructors - 1:48:37
What constructors actually do - 1:53:48
Aha! Scary's moment of realisation - 1:59:40
Back to structs - 2:01:30
It was a constructor all along! - 2:07:00
Let's debate literals vs constructors - 2:08:50
Back to our function example - 2:19:10
Method interlude - 2:24:00
Back to our function example - 2:27:55
Making it a constructor - 2:30:20
Inheritance example - 2:34:27
Static variables - 2:39:25
More tutorials? - 2:41:30
These Dang Twins - 2:44:07
Wrapping up - 2:44:40
Here I am in other places:
FriendlyCosmonautDev channel: youtube.com/channel/UC0EFcTuvDFQyOrPjCvIf_sA
Twitter: twitter.com/friendly_cosmo
Patreon: patreon.com/friendlycosmonaut
Find Scary here:
twitter.com/ScaryMoonchild
Here I am in other places:
FriendlyCosmonautDev channel: youtube.com/channel/UC0EFcTuvDFQyOrPjCvIf_sA
Twitter: twitter.com/friendly_cosmo
Patreon: patreon.com/friendlycosmonaut
Find Scary here:
twitter.com/ScaryMoonchild
Here I am in other places:
FriendlyCosmonautDev channel: youtube.com/channel/UC0EFcTuvDFQyOrPjCvIf_sA
Twitter: twitter.com/friendly_cosmo
Patreon: patreon.com/friendlycosmonaut
Find Scary here:
twitter.com/ScaryMoonchild
Here I am in other places:
FriendlyCosmonautDev channel: youtube.com/channel/UC0EFcTuvDFQyOrPjCvIf_sA
Twitter: twitter.com/friendly_cosmo
Patreon: patreon.com/friendlycosmonaut
Here I am in other places:
FriendlyCosmonautDev channel: youtube.com/channel/UC0EFcTuvDFQyOrPjCvIf_sA
Twitter: twitter.com/friendly_cosmo
Patreon: patreon.com/friendlycosmonaut
Here I am in other places:
Twitter: twitter.com/friendly_cosmo
Patreon: patreon.com/friendlycosmonaut
Credit:
Sprites - Buch (opengameart)
Editing - Nosey
Intro & Outro - Vossel
Here I am in other places:
Twitter: twitter.com/friendly_cosmo
Patreon: patreon.com/friendlycosmonaut
Credit:
Sprites - Buch (opengameart)
Editing - Nosey
Intro & Outro - Vossel
Here I am in other places:
FriendlyCosmonautDev channel: youtube.com/channel/UC0EFcTuvDFQyOrPjCvIf_sA
Twitter: twitter.com/FCosmonaut
Patreon: patreon.com/friendlycosmonaut
script_execute_alt: pastebin.com/c6KkMgCp
Here I am in other places:
Twitter: twitter.com/friendly_cosmo
Patreon: patreon.com/friendlycosmonaut
*CREDITS
https://1drv.ms/f/s!Amc0xkhdlKo2gUzkRZ95p6ZgvT1r
Link to Farming RPG series playlist: youtube.com/playlist?list=PLSFMekK0JFgzbFfj1vAsyluKTymnBiriY
Here I am in other places:
FriendlyCosmonautDev channel: youtube.com/channel/UC0EFcTuvDFQyOrPjCvIf_sA
Twitter: twitter.com/FCosmonaut
Patreon: patreon.com/friendlycosmonaut
Here I am in other places:
FriendlyCosmonautDev channel: youtube.com/channel/UC0EFcTuvDFQyOrPjCvIf_sA
Twitter: twitter.com/FCosmonaut
Patreon: patreon.com/friendlycosmonaut
Here I am in other places:
FriendlyCosmonautDev channel: youtube.com/channel/UC0EFcTuvDFQyOrPjCvIf_sA
Twitter: twitter.com/FCosmonaut
Patreon: patreon.com/friendlycosmonaut
Here I am in other places:
FriendlyCosmonautDev channel: youtube.com/channel/UC0EFcTuvDFQyOrPjCvIf_sA
Twitter: twitter.com/FCosmonaut
Patreon: patreon.com/friendlycosmonaut
Sprites download:
https://1drv.ms/f/s!Amc0xkhdlKo2hToKw1756LYgatf_
Sprites credit:
Adapted from TheNess "RPG sprite - 8 direction human male 16x16": opengameart.org/content/rpg-sprite-8-direction-human-male-16x16
Here I am in other places:
FriendlyCosmonautDev channel: youtube.com/channel/UC0EFcTuvDFQyOrPjCvIf_sA
Twitter: twitter.com/friendly_cosmo
Patreon: patreon.com/friendlycosmonaut
Here I am in other places:
Twitter: twitter.com/FCosmonaut
Patreon: patreon.com/friendly_cosmo
*CREDITS
https://1drv.ms/f/s!Amc0xkhdlKo2gUzkRZ95p6ZgvT1r
Link to Farming RPG series playlist: youtube.com/playlist?list=PLSFMekK0JFgzbFfj1vAsyluKTymnBiriY
Sprites download:
https://1drv.ms/f/s!Amc0xkhdlKo2hToKw1756LYgatf_
Sprites credit:
Adapted from TheNess "RPG sprite - 8 direction human male 16x16": opengameart.org/content/rpg-sprite-8-direction-human-male-16x16
Here I am in other places:
FriendlyCosmonautDev channel: youtube.com/channel/UC0EFcTuvDFQyOrPjCvIf_sA
Twitter: twitter.com/friendly_cosmo
Patreon: patreon.com/friendlycosmonaut
Sprites download:
https://1drv.ms/f/s!Amc0xkhdlKo2hToKw1756LYgatf_
Sprites credit:
Adapted from TheNess "RPG sprite - 8 direction human male 16x16": opengameart.org/content/rpg-sprite-8-direction-human-male-16x16
Here I am in other places:
FriendlyCosmonautDev channel: youtube.com/channel/UC0EFcTuvDFQyOrPjCvIf_sA
Twitter: twitter.com/friendly_cosmo
Patreon: patreon.com/friendlycosmonaut
script_execute_alt code: pastebin.com/NY0CE125
Thumbnail by ScaryMoonchild: twitter.com/scarymoonchild
Here I am in other places:
FriendlyCosmonautDev channel: youtube.com/channel/UC0EFcTuvDFQyOrPjCvIf_sA
Twitter: twitter.com/friendly_cosmo
Patreon: patreon.com/friendlycosmonaut
Art by ScaryMoonchild: twitter.com/scarymoonchild
Here I am in other places:
FriendlyCosmonautDev channel: youtube.com/channel/UC0EFcTuvDFQyOrPjCvIf_sA
Twitter: twitter.com/friendly_cosmo
Patreon: patreon.com/friendlycosmonaut
Here I am in other places:
Twitter: twitter.com/friendly_cosmo
Patreon: patreon.com/friendlycosmonaut
Artwork by "Buch" on opengameart: opengameart.org/users/buch
-King & Hooded Dude from "A Platformer in the Forest"
-Tiles & Trees from "The Field of Floating Islands"
Here I am in other places:
Twitter: twitter.com/friendly_cosmo
Patreon: patreon.com/friendlycosmonaut
Artwork by "Buch" on opengameart: opengameart.org/users/buch
-King & Hooded Dude from "A Platformer in the Forest"
-Tiles & Trees from "The Field of Floating Islands"
Assets download (sounds):
https://1drv.ms/f/s!Amc0xkhdlKo2gV0lHlvao-331GUl
Here I am in other places:
Twitter: twitter.com/friendly_cosmo
Patreon: patreon.com/friendlycosmonaut
*CREDITS
https://1drv.ms/f/s!Amc0xkhdlKo2gUzkRZ95p6ZgvT1r
Link to Farming RPG series playlist: youtube.com/playlist?list=PLSFMekK0JFgzbFfj1vAsyluKTymnBiriY
Here I am in other places:
Twitter: twitter.com/friendly_cosmo
Patreon: https://www.patreon.com/friendlycosmo...
Artwork by "Buch" on opengameart: opengameart.org/users/buch
-King & Hooded Dude from "A Platformer in the Forest"
-Tiles & Trees from "The Field of Floating Islands"
Code for script_execute_alt:
pastebin.com/AMNEEAga
Here I am in other places:
Twitter: twitter.com/friendly_cosmo
Patreon: patreon.com/friendlycosmonaut
Artwork by "Buch" on opengameart: opengameart.org/users/buch
-King & Hooded Dude from "A Platformer in the Forest"
-Tiles & Trees from "The Field of Floating Islands"
Here I am in other places:
Twitter: twitter.com/friendly_cosmo
Patreon: patreon.com/friendlycosmonaut
Artwork by "Buch" on opengameart: opengameart.org/users/buch
-King & Hooded Dude from "A Platformer in the Forest"
-Tiles & Trees from "The Field of Floating Islands"
Assets download (sounds):
https://1drv.ms/f/s!Amc0xkhdlKo2gV0lHlvao-331GUl
Here I am in other places:
Twitter: twitter.com/friendly_cosmo
Patreon: patreon.com/friendlycosmonaut
*CREDITS
https://1drv.ms/f/s!Amc0xkhdlKo2gUzkRZ95p6ZgvT1r
Link to Farming RPG series playlist: youtube.com/playlist?list=PLSFMekK0JFgzbFfj1vAsyluKTymnBiriY
Note: although this system is made as a part of the Farming RPG series, you can jump into this video without having done any of the previous ones if you're just interested in implementing a dialogue system.
Assets download (sprites):
https://1drv.ms/f/s!Amc0xkhdlKo2gVchPdJjk-5MvsnE
Here I am in other places:
Twitter: twitter.com/friendly_cosmo
Patreon: patreon.com/friendlycosmonaut
*CREDITS
https://1drv.ms/f/s!Amc0xkhdlKo2gUzkRZ95p6ZgvT1r
Link to Farming RPG series playlist: youtube.com/playlist?list=PLSFMekK0JFgzbFfj1vAsyluKTymnBiriY
Here I am in other places:
Twitter: twitter.com/friendly_cosmo
Patreon: patreon.com/friendlycosmonaut
Artwork by "Buch" on opengameart: opengameart.org/users/buch
-King & Hooded Dude from "A Platformer in the Forest"
-Tiles & Trees from "The Field of Floating Islands"
Here I am in other places:
Twitter: twitter.com/friendly_cosmo
Patreon: patreon.com/friendlycosmonaut
Here I am in other places:
Twitter: twitter.com/friendly_cosmo
Patreon: patreon.com/friendlycosmonaut
*CREDITS
https://1drv.ms/f/s!Amc0xkhdlKo2gUzkRZ95p6ZgvT1r
Link to Farming RPG series playlist: youtube.com/playlist?list=PLSFMekK0JFgzbFfj1vAsyluKTymnBiriY
Here I am in other places:
Twitter: twitter.com/friendly_cosmo
Patreon: https://www.patreon.com/friendlycosmo...
*CREDITS
Assets (ship and bullet) are from Kenny's Space Shooter Redux pack: opengameart.org/content/space-shooter-redux
Here I am in other places:
Twitter: twitter.com/friendly_cosmo
Patreon: patreon.com/friendlycosmonaut
*CREDITS
https://1drv.ms/f/s!Amc0xkhdlKo2gUzkRZ95p6ZgvT1r
Link to Farming RPG series playlist: youtube.com/playlist?list=PLSFMekK0JFgzbFfj1vAsyluKTymnBiriY
Project download:
https://1drv.ms/u/s!Amc0xkhdlKo2gVYKZXjh4J-XfMpJ
Here I am in other places:
Twitter: twitter.com/friendly_cosmo
Patreon: patreon.com/friendlycosmonaut
Here I am in other places:
Twitter: twitter.com/friendly_cosmo
Patreon: patreon.com/friendlycosmonaut
Some systems require managing huge amounts of data such as quest, NPC, and dialogue systems - and as a result, trying to imagine how to even structure this data can seem overwhelming at first. We can take menus as an example and illustrate some ways to go about structuring data more generally.
Here I am in other places:
Twitter: twitter.com/friendly_cosmo
Patreon: patreon.com/friendlycosmonaut
Here I am in other places:
Twitter: twitter.com/friendly_cosmo
Patreon: patreon.com/friendlycosmonaut
*CREDITS
https://1drv.ms/f/s!Amc0xkhdlKo2gUzkRZ95p6ZgvT1r
Link to Farming RPG series playlist: youtube.com/playlist?list=PLSFMekK0JFgzbFfj1vAsyluKTymnBiriY
Here I am in other places:
Twitter: twitter.com/friendly_cosmo
Patreon: patreon.com/friendlycosmonaut
*CREDITS
https://1drv.ms/f/s!Amc0xkhdlKo2gUzkRZ95p6ZgvT1r
Link to Farming RPG series playlist: youtube.com/playlist?list=PLSFMekK0JFgzbFfj1vAsyluKTymnBiriY
Here I am in other places:
Twitter: twitter.com/friendly_cosmo
Patreon: patreon.com/friendlycosmonaut
Helpful blog posts:
yoyogames.com/blog/60/alpha-and-surfaces
yoyogames.com/blog/430/dynamic-rendering-masks
Artwork by "Buch" on opengameart: opengameart.org/users/buch
-King & Hooded Dude from "A Platformer in the Forest"
-Tiles & Trees from "The Field of Floating Islands"
The inventory is constructed to be as flexible as possible: any number of slots across any number of rows and columns may be set up using our system.
Link to inventory assets:
https://1drv.ms/f/s!Amc0xkhdlKo2gUZORtcs_W7kge8h
Font:
http://www.fixedsysexcelsior.com
*CREDITS
https://1drv.ms/f/s!Amc0xkhdlKo2gUzkRZ95p6ZgvT1r
Here I am in other places:
Twitter: twitter.com/friendly_cosmo
Patreon: patreon.com/friendlycosmonaut
Link to Farming RPG series playlist: youtube.com/playlist?list=PLSFMekK0JFgzbFfj1vAsyluKTymnBiriY
Finished Project file:
https://1drv.ms/u/s!Amc0xkhdlKo2gUsskQbfDrwUn9Ab
Here I am in other places:
Twitter: twitter.com/friendly_cosmo
Patreon: patreon.com/friendlycosmonaut
*CREDITS
https://1drv.ms/f/s!Amc0xkhdlKo2gUzkRZ95p6ZgvT1r
Link to Farming RPG series playlist: youtube.com/playlist?list=PLSFMekK0JFgzbFfj1vAsyluKTymnBiriY
Here I am in other places:
Twitter: twitter.com/friendly_cosmo
Patreon: patreon.com/friendlycosmonaut
Artwork by "Buch" on opengameart: opengameart.org/users/buch
-King & Hooded Dude from "A Platformer in the Forest"
-Tiles & Trees from "The Field of Floating Islands"


