Shaun's Action RPG Tutorial
A downloadable tutorial project
How to go from nothing, to a feature-complete, zelda-like, action RPG using GameMaker! 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 GM 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.
can I use this in a commercial game? Basicly use the sprites to make a game.
Also I am not and would not take credit for you work. I'll have this io page link
I have the same question.
Figured out that my oSignpost had been overriding the pEntity Draw event. Had to inherit the event, then paste in the shadow code.
This fixed the draw error.
Thanks again Shaun! You are the man.
Thank you Shaun for being an educator.
I have encountered an issue in (Part 15: Entity "On Hit" Response).
I have entered everything correctly, as far as i can tell, having checked multiple times the few lines of code that make this function work. However, when i hit the sign post, nothing happens. I have seen a few comments on the youtube channel within the last year which state they don't know what's happening, but are in the same predicament. I wonder if something has changed in recent past to cause this?
For the life of me, I cannot figure out how to fix this issue. I have spent a considerable amount of time going over the video, and cannot find any discrepancy between the code in the video, and my code in game maker. Any help on this would be so wonderfully appreciated.
<3 thanks.
Just downloaded this project and loaded it into GM. All I get is a black screen. I used some debug messages and the game is in rVillage and is polling input--the player x position changes when I hit the keys but I still get a black screen. Has anyone else had this issue?
I have since figured out that episode 25 is the latest one that will work. Any of the files that were created with the newer version of GameMaker do not work. I am also running this on Mac.
Just downloaded and tried to run and it's working fine for me. Are you running GMS2? This project is for GMS2.
hey Shaun! i was wondering if there was any template/guide we should be following to do all of player sprite animations?
Other than the 4 directional sprites that just need to have their "directions" in the right order (use any existing sprite as a guide for this) you can pretty much do any of this stuff however you like.
hey Shaun! I was just wondering that how to make a second quest. I can't seem to find the solution for it. Also thank you for making what you do best! you help me a lot with gamemaker :)
Hey Shaun! I might be being dumb but when I activate attack slash I attack everything around me. Do you know the reason for this and how I can fix it?
I figured it out! I forgot to set the sprite to precise. So it was just me being silly anyways I'm loving your tutorials!
hey shaun, i already bought the tutorial and i just wondering that can i add path finding in your enemy chase state? if you can please help me out
nevermind i already figured it out lol
hi shaun ! apparently im still new with this game maker software and its language. i type the code exactly the same in your part one rpg action video, but the first problem is when i type the image_speed = 0; the player still spinning. and the second problem is the player dont move even i copied your code. i tried to use only the ord() but nothing change. hope you are willing to help me T-T. Thankyou!
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).
I know this is an old comment, but wanted to clarify that yes there will be some mild differences based on changes here or there as we went through the series (as the game demo was made before the tutorials were.) There might also just be small elements I've forgotten.
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
/90 not /45. 90 is 4 dirs, 45 is 8. If you had 8 sprites, you'd do 45 I believe.
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.
mid posting the assets somewhere?
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!