
Shaun's Action RPG Tutorial
A downloadable tutorial project
How to go from nothing, to a feature-complete, zelda-like, action RPG using GameMaker Studio 2! This page allows you to access the source code for each individual episode of my free YouTube tutorial series.
A Free Demo of the final game we build in this series is available for download below!
Patrons of my work can access these files by linking their account here.
Features:
- Player character that moves in 8 directions and animates in 4
- State machine & Entity based system
- 3 Unique item scripts: Hookshot, Bow, Bombs.
- Scalable and versatile systems for:
- Enemies
- Combat
- Entities (liftable, throwable, destroyable, lootable, talkable, useable)
- Item drops & collectables
- Unique items
- Dialogue & responses
- Shops and item unlocks
- Quest flags
- Saving & Loading with multiple slots
This series is aimed at beginner to intermediate level developers familiar with the basics of GMS2 and involves some tricky concepts. Total beginners might prefer to work on a simpler project, and may find more value in my Complete Platformer series.
Purchase
In order to download this tutorial project you must purchase it at or above the minimum price of $10 USD. You will get access to the following files:
Download demo
Development log
- Code for episodes 35-38Mar 15, 2021
- Source code ep34 addedFeb 11, 2021
- Episode 29 addedDec 08, 2020
- Source code added (2.3 update!)Sep 11, 2020
- Latest Source Code addedJul 31, 2020
- Episode 21 + 22 source codeJul 14, 2020
- Ep 19 source code addedMay 22, 2020
Comments
Log in with itch.io to leave a comment.
Hey dude! Awesome content! I just purchased the series and noticed that the version of the game from the Final Episode source isn't the same as the Final Game Demo. I wondered if this was intentional (it doesn't matter if it is as I will happily fix the kinks). If this is addressed in the videos then feel free to ignore me as I still need to watch them. Looking forward to joining Patreon too (it's playing up at the time of writing this).
Hi, so in ep 2 ive done all the things the character moves and and the sprites also work, but when i stop moving the sprite/character turns to the left, what do i do to fix this problem? can anyone help me?
Hi Shaun, I'm your follower here in Brazil, and I was wondering if you could help me resolve an error.
ERROR: when walking diagonally the player is slower (this is very visible when it is done in a straight collision).
Thank you very much for your attention!!!
When I enter the game, the main tiles do not show it's shape and colour. Why it happens?
Why does my npc activate right after i close the dialouge?
How about a Linux demo?
hello shaun, im on ep2 but I keep getting a error message and i followed instructions but it says
___________________________________________
############################################################################################
ERROR in
action number 1
of Create Event
for object <undefined>:
Variable <unknown_object>.direction(8, -2147483648) not set before reading it.
at gml_GlobalScript_PlayerAnimationScript (line 2) - var _cardinalDirection = round(direction/45);
############################################################################################
gml_GlobalScript_PlayerAnimationScript (line 2)....
plz help
i need the same hel
Hey Shaun! First of all, you just earned a new subscriber because your tutorials are really amazing and helpful. I am currently following your Action RPG tutorial videos and I have one question - is it fine with you that I will use the code which I will learn from your videos and use it for my own game? Even if in the future I would decide to publish such game? Do you not mind if someone is using your code? Thank you for a reply!
Yes that's fine! =) Have fun!
i need help, im on video 28 and when the slime jumps to attack it stays in the air and floats north west forever until i hit it again, thanks for whoever helps
goodmorning shaun,
i really need ur help because i'm stuck video 2 (animation) because of this error:
___________________________________________
############################################################################################
ERROR in
action number 1
of Create Event
for object <undefined>:
Variable <unknown_object>.direction(8, -2147483648) not set before reading it.
at gml_GlobalScript_Script2 (line 2) - var _cardinalDirection = round(direction/90);
############################################################################################
gml_GlobalScript_Script2 (line 2)
can you maybe help me?
This is because GameMaker changed the way how scripts work.
You have to put everything inside the "playerAnimateSprite" script into the curly brackets of a function:
function playerAnimateSprite()
{
// put code here
}
EDIT:
now I see Shaun already adressed this problem in a sticky comment under the yt video, have a look there for more information.
does not work for me
Do you know why after I press the activation key next to the pot, the character just freezes?
shaun, im on episode 2 and when i run the game it says '
ERROR in
action number 1
of Create Event
for object <undefined>:
Variable <unknown_object>.direction(8, -2147483648) not set before reading it.
at gml_GlobalScript_PlayerAnimateSprite (line 2) - var _cardinalDirection = round(direction/90);
############################################################################################
gml_GlobalScript_PlayerAnimateSprite (line 2)'
and i dont know what to do.
i did everything right.
If you didn't find the problem in the meantime, see my comment above^^
Hey Shaun, i'm on the final episode but i'm having a little problem, the sTextBoxBG sprites that are supposed to be used for save slots won't appear for some reason, here's the code for oTitleScreen:
create-
titleVisible = 0.0;
keyPressed = false;
slotsVisible = 0.0;
slotSelected = 0;
loadingStarted = false;
for (var _slot = 0; _slot <= 2; _slot++)
{
var _fileName = "save" + string(_slot) + ".sav";
if (file_exists(_fileName))
{
slotData[_slot] = LoadJSONFromFile(_fileName);
}
else slotData[_slot] = -1;
}
step-
if (!keyPressed)
{
titleVisible = min(1, titleVisible + 0.01);
}
else
{
titleVisible = max(0, titleVisible - 0.01);
slotsVisible = min(1, slotsVisible + 0.01);
}
if (keyboard_check_pressed(vk_anykey)) keyPressed = true;
drawGUI-
if (titleVisible > 0)
{
draw_sprite(sTitle,0,0,-RESOLUTION_H + titleVisible * RESOLUTION_H);
draw_set_alpha(titleVisible * abs(sin(get_timer() * 0.000001 * pi)));
draw_sprite(sTitle,1,0,0);
draw_set_alpha(1.0);
}
if (slotsVisible > 0)
{
draw_set_alpha(slotsVisible)
for (var _slot = 0; _slot <= 2; _slot++)
{
var _y = 16+_slot*48
var _x = 160;
var _img = 2;
if (slotSelected == _slot)
{
_img = 3;
draw_sprite(sMenuPlayer,0,_x-32,_y+24);
}
NineSliceBoxStretched(sTextBoxBg,_x,_y,312,_y+48,_img);
}
draw_set_alpha(1.0);
}
I wanna thank you for this, I just started this finally but this rules. <3
hi @ShaunJS I have been experiencing some issues with the "
Variable oPlayer.keyRight(100012, -2147483648) not set before reading it.
at gml_Object_oPlayer_Step_0 (line 11) - InputMagnitude = (keyRight - keyLeft != 0) || (keyDown - keyUp!= 1);" error please help me out I am on episode 1
keyRight was not set before reading it. Meaning you haven't created that variable.
Hello Shaun! First I’d like to say that these tutorials have been amazing, really enjoyable and entertaining. I’m just having an issue after following you're part 14 episode, although I’m not sure if that’s what made the error occur. All my movements are fine, rolling, attacking, and walking, but my player character is unable to move up or left. It moves down and right one, as well as diagonally with those, but it seems like it’s running into a wall at that point. It’s like my character is stuck in a 2x2 box. Any idea of what could cause this? Thanks!
Nevermind, Shaun... I legit forgot to write a line.. lol I didn't write the "x -= x mod TILE_SIZE;" line... >.< That was such an embarrassing move! lol
Hey Shaun, I am a little stuck on the collision side of everything. I've been working with GameMaker since Gm6, but I have decided to look at your tutorial in regards to using GMS2. Since the systems and language has been changed drastically and also allows for more new features, I wanted to learn how to utilize them as much as possible. My problem is after following Episodes 15-18, I have been experiencing a strange bug. My player seems to dash through the tilemap collision in a particular corner, thrusting him out of bounds. I assumed I made a mistake on either the collision script or the entity collision... but they have appear to be no errors with how I typed it up. I don't usually like to copy exact code and I tend to look and study it, but this is one of those instances where I had to backtrack and delete the whole collision code and copy it exact how you wrote, yet the bug persists... not sure on what to do here, I am very confused on what I did wrong. :pAny help would be much appreciated!CheersHey Shaun, first of all thanks for the great tutorials you make. I started using GML last December and this series have been the best intro to GMS2 ever. So much that, based on this code, I created my first game and submitted to a GameJam, here's a link if you wanna check: https://ak1r4.itch.io/the-legend-of-prisma
It's very rough on the edges, and I coded some other functions, but the base code comes from here.
Lastly, it's not like I want to promote my game, but maybe the last episode of the series could be a showcase of what viewers and patreons have made with the ARPG tutorials, I think it would extremely motivating for viewers that started watching the series recently. Cheers!
Hey Shaun, so far loving the tutorials. I would love to see some kind of swimming state. I'm sure it wouldn't be too hard and will probably try it myself. I'm just horrible at making sprites, I'm going to have to pay someone to design mine when I switch them out. So if you get bored or if anyone gets bored I would love a sprite of the character swimming.
I second this ! A swimming state lesson would be nice .
Swimming state would be awesome!
So I actually did make a swimming state. All I did was take the run carry image and cut the legs off it. I then detected the land from the water with tile collision. When the player hits the water it changes the sprite and the player also slows down. I then added a stamina bar to keep the player from swimming too far. Works pretty good so far.
i am on episode 3 the tiles but my character can go through some walls and there are certain walls that work and some they dont. pls help!!!
HoW dO wE uPlOaD a GaMe!
TuToRiAl!
PlS
How do we just download assets
In the description of any of the videos, but for ease of use I have added a link here as well just beneath the demo download.
Thank you
Hi Shaun. I am experimenting a bug on my version of my game that i made with your tutorial and it also happens on your version of the game that I download from this site. The hurt sprite does not work properly. there are 2 frames that wont appear when you get hurt and when you bonk on a wall. But there is 2 directions that works just fine.
I think it might be due to an update on game maker studio platform. Does anybody else have the same issue ?
If I download episode 42, it does the same thing and I did not change anything. Help ?
Thanks!
Hi sorry I'm late. Weird version bug. Change the line in the bonk state from
"image_index = CARDINAL_DIR-2"
to
"image_index = CARDINAL_DIR+2;"
instead. For some reason they've stopped image_index wrapping properly when negative.
Hey bro i realy want a tutorial of how to upload a game.
THX
hello! If I make the purchase for the code, do I get access to all the code as it releases or just the code up to the point that i bought it? thanks!
Yes you can use the code that's the idea, I'd rather you didn't use the art assets (for your own benefit largely)
hola,no se porque pero cuando estoy en el juego esta en una pantalla pequeña y no lo puedo jugar
Same here :-(
I can download the yyz files, but the environment sprites you show you in your first tutorial isn't there.
@ShaunJs could you help us out?
The link should work and works on my end. It is a direct link to the file so it will start downloading automatically. (Hence the open and close tab effect you're describing.) Check your downloads!
Hello I think I wrote well the commands but in my game at the end of moving it returns to left (chapter 2)
I would like someone to help me pls
double check ur code, i did all episodes and everything works fine
Will this cover swimming? I haven't seen an action rpg tutorial series that covers transitioning from walking/jumping to swimming.
Sadly not, the demo showcases everything we're going to cover!
you can make a transition when you step close to the water just like you do to enter rooms and change the sprite to swiming
Sorry if you've already answered this, But how many episodes do you plan to do in total?
my current estimate is somewhere around 50, give or take an episode or two.
ok cool, only asking because I’m really good with gm8.1 but was never able to make the transition to gms 2. Your series is really helping me a lot.
cant download the sprites :(
Chrome was automatically closing the tab when I tried to download the assets from the youtube description in the tutorials. Instead I copied the link and pasted it into Edge, youtube came up with a page 'Are you sure you want to leave YouTube?'. I clicked on 'GO TO SITE' and it downloaded the zip file.
tks