Tutorial series: 1. Base game: ua-cam.com/video/nwlvT-L9vFg/v-deo.html 2. Main Menu: ua-cam.com/video/Us5GSddVedY/v-deo.html 3. Music and SFX: ua-cam.com/video/NGNJWpiVS1M/v-deo.html 4. Power Ups: ua-cam.com/video/xeXsRRYSQ78/v-deo.html
Tip: If you want to add WASD movement add the code: or keyboard_check(ord("W")) to the end of each if statement in the movement, replacing W with either W, A, S or D
This took me back straight into elementary school when I was building this on my own in GameMaker 6.1 free version, without an internet connection and only the built-in documentation in the help file. With zero coding knowledge, of course. I've built so many small games back then. Now, as a developer, I can finally come back to this and try building something more palpable.
This was so simple and straightforward, I can’t thank you enough for making this! I’ve officially made my very first game, and now I’m gonna customize it and add my own sprites and a menu, this was so helpful and educational, thanks again!
Wow! this is the best totorial I have ever seen, it explains how to do stuff step by step and tells us why he did what he did. I hope Gamemaker make more tutorials in the futrue.
The way you use creative editing and effects in your video to draw attention to and accentuate the points you make, are so sensitively done! Masterful work, thank you!
Thanks for the tutorial! This helped me get started with this new engine :) Here are the changes I made to the game... - Movement: you now aim and shoot with the mouse, the W and S key moves you forwards and backwards. In addition to that I added player friction so you slow down naturally. Player accelerates 60% faster and decelerates at 35% acceleration speed. - Shooting: You now shoot towards the mouse. Projectiles move 50% faster. - Asteroids: Big Asteroids take 3 shots to break and when broken become small Asteroids that move and spin 80% faster! Big Asteroids award 50 points and small Asteroids award 25! - Score: Text is larger and green now... Tried adding a power up and got it halfway working but decided to remove it when something messed up causing compiling errors... (May try readding it in the future!)
This was nice. At first I was a bit meh because it wasn't as detailed as the original space rocks tutorial. But it wasn't meant to be. As someone's first exposure to gamemaker and something to build confidence, this is the perfect lesson to get something together and working in under a half hour. Great job man.
for the score system 15:40: make sure you pay attention to lower case or upper case, my files had a "Obj_game" instead of all-lower-case " obj_game" which was enough to cause a problem. a little hint :)
I messed around with different software and made game with each of them but I think this is the one I'm going with, you guys have really done something incredible with visual code.
7:14 Little tip for anyone that wants to create a missile or arrow and have it rotate properly when fired: On Create tab under obj_bullet add a third variable with name: image_angle value: obj_player.image_angle. This rotates the sprite itself to match the player when fired otherwise your missiles will fly out sideways. If your player sprite is drawn facing right and missile is drawn facing up, you'll have to offset the angle with rotate instance. Alternatively edit all your sprites to have a consistent facing so you don't need add the extra step.
If anyone else was following this guide and gets an error message after destroying a small rock, I found a fix! At 11:30 in his If Variable, he sets the variable to "instance_number(obj_rock)" which doesn't exist. Changing it to "instance_number(obj_rock_big)" fixed it for me.
This happened due to anxiety, because if we pay attention, when he names the created objects, there is no "obj_rock_big" , as he got confused with the names of the Sprites - Calmly rewinding the video, I realized the reasons why the variables were not accepted. .
Hi, I'm sorry, I just did exactly as you on 9:10 but the rocks are not rotating. I don't understand why we put the "assign variable" value of 1 to rotate the big rock in "outside room" ? Can you explain to me please ?
Thank you for this, first gamemaker tutorial I have ever completed! Very nice. Even realized I needed to copy paste that one line of code before you said I needed to.
Thank you so much for making this video, this must have been made after an update of some kind because back then motion add wasn't a thing, it didn't exist, the new way of coding all this is so much easier than a 5 part series like I had to watch before all these updates, this video is great.
I thought this was a really great intro tutorial for GM. I personally found the web article easier to follow at my own pace, but I'm sure other people prefer the video!
today i downloaded the GameMaker. And this was the first tutorial i've found. And made a game the day i just downloaded it! thanks for this amazing video!!
The score system makes my rock code send an error, so I had to remove it, but other than that, everything works. your tutorial was very clear and straightforward, and I like that you explained *why* we were adding certain parts instead of just telling us to do it. That way, I know what I'm adding and why I'm adding it. You're an amazing teacher. Thank you.
Pretty good tutorial. The double sided visuals for both of the coding styles is impressive. I coded something and actually understand some of what I've done! The only thing I don't understand is why my points won't go up. I've checked the code many times and just can't figure it out.
Excellent introduction to GM, one idea for new makers is to add a Hyper Space button to randomly move the ship to a diffrent location. So adda new key press event and random change the ships X and y value based on the rooms max x and y.
Quick tip guys, set move_wrap under the player to move_wrap(true, true, 60); instead of move_wrap(true, true, 0); for seamless transitioning between the two sides of the screen!
Awesome video, thank you very much! If someone is interested, you can get random rocks rotation by adding a new variable in the obj_rock "create" event : _speed_rotation = random(3) Then, modify the "image_angle" in the step event to "image_angle += _speed_rotation;" You will have rocks rotating with a variable speed, up to 3/frame :)
@@iamaguy87 Check the "Step" event for obj_rock; did you assign the variable "image_angle" or did you accidentally assign it to "image_alpha"? Autocomplete error that's easy to make. Edit: Another possibility is that you didn't check "Relative" in the "image_angle" assign variable within the obj_rock "Step" event.
would like to know how to create more levels, showing completing level 1 then going to level 2 and making the rocks and enemies harder. But it is a good start to giving basics
At first, my the score system didn't work for me. This was because I had named the variable 'score' and not 'points' like you did in the video. So I renamed the variable to 'points', and it worked. I'm just confused as to why this was - surely the name of the variable doesn't matter?
I think its weird that you play with the arrows and shoot with mouse, maybe change that cause it is more comfortable/nice to play with. so here is the code for WAD. if keyboard_check(ord("W")) { motion_add(image_angle, 0.1); } if keyboard_check(ord("A")) { image_angle += 4; } if keyboard_check(ord("D")) { image_angle -= 4; } here I changed the arrows for WAD for people that want to change it!
Good idea, the only down-side I noticed with this is that you can't perform multiple strings at a single time. Meaning, as you turn left while moving forward, you cannot let go of "A" and press "D" to turn right without letting go of the forward movement key "W" (and vice-versa). Basically, using string movement code like this makes the movement feel a little less polished and refined. But it can definitely work if anyone would much rather use WAD movement instead of the arrow keys.
Thanks bro. I am looking for a game engine that is easy to learn but has many features. Some that I'm exploring are Gamemaker, Construct 3, Gdevelop and Unity
For some reason I don't have the template for Space Rocks on my version of GameMaker, is there a place to download it from? I recently installed the newest version of GM, don't know if that removed it and the other templates?
Hi, you should be able to get it from the start screen, after you hit "New". The template screen may show "User Templates" in a drop down menu, so make sure you change that to "All Templates" or "Official Templates". Make sure you are connected to the internet as well.
I followed this with the most recent version of gamemaker, and it doesn't work when I try to run it. it just shows a blank screen, not sure why or what i could have done wrong
Man this was so helpful. You can be sure I will review this video if I get stuck somewhere. I am really bad with names I do understand variables tho as I am not a coder but I can read code. Edit: I actually took it a little further and gave sound effects to my bullets. Well It's a shotgun sound but hell I am from South Africa, Shotguns is our answer for everything 😀
hello! thanks for the great tutorial, but i have a problem. When i shoot at the small rocks my game crashes, how do i fix it (i did the same way as you imo)
I had the same problem! Here's the fix - In the obj_rock_big collision event with obj_bullet, under the first Else, Set Sprite needs to be "spr_rock_big" In this video, he labelled it "spr_rock" which was a mistake, so if you copied him word for word, it crashes.
In the tutorial when we want to limit the amount of rocks that can appear on the screen when the bullet collides with the large rock, in the "if" you write obj_rock, but we never created the obj_rock in the tutorial, maybe I didn't see it correctly but I wanted to know how to do it
Great Tutorial. But guys just a tip make sure you have everything spelled correctly. sat there for 15 minutes wondering why i was getting an error. come to find out i spelled game wrong when naming my obj_game object.
I wanna make it so that the ship has autofire. I know you start with "if key down" so that bullets constantly shoot when the key is down, but it shoots at lightspeed. How do I set the speed to how often this code runs?
on the 11:12 part, my instance_copy(true) is not working, it says "GM2022 - Return value of a pure function is not being used", and i'm following the steps of the tutorial
I fix it by assigning the instance_copy to a variable: ``` instance_destroy(other); effect_create_above(ef_firework, x, y, 1, c_white); direction = random(360); instance_multiply = sprite_index if sprite_index == spr_rock_big { sprite_index = spr_rock_small; instance_multiply = instance_copy(true); } else if instance_number(obj_rock) < 12 { sprite_index = spr_rock_big; x = -100; } else { instance_destroy(); } ```
The best place to go is the GM community forum or Discord. Try posting a picture of your code to make it easy for people to help you Forum: forum.gamemaker.io/index.php Discord: discord.com/invite/gamemaker
for some reason when I did the instance_destroy from the player it was giving me an error. so instead, I made it so that the rock would do the destroying of the player using instance_destroy(other) and made the game object call the alarm from the rock object instance instead. Otherwise worked great! Thank you for this-- very helpful!
This is cool, thanks for this. How do I create an "or" for the movement, so I can use "up" or "W" to move? I wanted to add WASD controls, and the only way I could was by adding all the same commands but for the WASD, I then ran into the issue that if you pressed both W and UP at the same time or w/e other key, it would double the move speed. I only wanted to be able to use either key without adding more speed. Also, how to I add a hard stop so that I can stop the player movement? I added S and Down at -.1 so that it would slow and you could kind of stop, but it was not like a break and stand in place like I wanted.
when i run the game after adding the first several events, my player isnt moving. ive proof read the visual code to make sure there are no errors. please help (:
excellent tutorial, very easy to follow and extremely helpful. one question, are we able to 'refine' the hitbox of the player and/or the rocks? i noticed there is a small 'gap' that triggers the collision event even though the two objects arent necessarily 'touching' yet. a small nitpick but i feel like itd help player immersion. thanks!
Hey! You can modify the mask of your ship and rocks within their sprite editors. So e.g. double click on the player sprite and its sprite editor will open. Then expand the "Collision Mask" menu and change the Mode to Manual. Now you can just its mask in the canvas :)
It keeps giving me a error message when I try to shoot a big rock the error is telling me that there is a problem with the instance copy part anf i don't know how to fix it
Turns out there is no max speed for the player so before I added the player collidigg by with the block I helped than the forward key and it was moving so fast there where several on the screen
at 11:13 sentence 9 instance_copy(true); is coming up as an error and causes the game to crash any ideas to as why that is? has the game language changed since this video was posted?
Tutorial series:
1. Base game: ua-cam.com/video/nwlvT-L9vFg/v-deo.html
2. Main Menu: ua-cam.com/video/Us5GSddVedY/v-deo.html
3. Music and SFX: ua-cam.com/video/NGNJWpiVS1M/v-deo.html
4. Power Ups: ua-cam.com/video/xeXsRRYSQ78/v-deo.html
Tip: If you want to add WASD movement add the code: or keyboard_check(ord("W")) to the end of each if statement in the movement, replacing W with either W, A, S or D
what is a relative@@Boiabba
@@your_hyeong what do you mean?
i love you bro ive been looking for how to do this@@Boiabba
Add a game over screen with the points and Restart button.
This took me back straight into elementary school when I was building this on my own in GameMaker 6.1 free version, without an internet connection and only the built-in documentation in the help file. With zero coding knowledge, of course. I've built so many small games back then. Now, as a developer, I can finally come back to this and try building something more palpable.
This was so simple and straightforward, I can’t thank you enough for making this! I’ve officially made my very first game, and now I’m gonna customize it and add my own sprites and a menu, this was so helpful and educational, thanks again!
true
Wow! this is the best totorial I have ever seen, it explains how to do stuff step by step and tells us why he did what he did. I hope Gamemaker make more tutorials in the futrue.
The way you use creative editing and effects in your video to draw attention to and accentuate the points you make, are so sensitively done! Masterful work, thank you!
Thanks for the tutorial! This helped me get started with this new engine :)
Here are the changes I made to the game...
- Movement: you now aim and shoot with the mouse, the W and S key moves you forwards and backwards. In addition to that I added player friction so you slow down naturally. Player accelerates 60% faster and decelerates at 35% acceleration speed.
- Shooting: You now shoot towards the mouse. Projectiles move 50% faster.
- Asteroids: Big Asteroids take 3 shots to break and when broken become small Asteroids that move and spin 80% faster! Big Asteroids award 50 points and small Asteroids award 25!
- Score: Text is larger and green now...
Tried adding a power up and got it halfway working but decided to remove it when something messed up causing compiling errors... (May try readding it in the future!)
what code is used to make the arrow move with W and S, and the player friction thingy? i’m just starting out so i m still learning😅
@pixiechic2209 same nodes he used before but type ord("W") the friction block is just a block with two blue arrows
@@Slimerror tysm!!
@@Slimerror bruh, meanwhile im trying to figure out how to SLOWLY set the speed value to 0 (and for it not to loop)
@aosphere Is your character zooming across the screen mach 2 at the slightest touch of a button
This was nice. At first I was a bit meh because it wasn't as detailed as the original space rocks tutorial. But it wasn't meant to be. As someone's first exposure to gamemaker and something to build confidence, this is the perfect lesson to get something together and working in under a half hour. Great job man.
for the score system 15:40:
make sure you pay attention to lower case or upper case, my files had a "Obj_game" instead of all-lower-case " obj_game" which was enough to cause a problem.
a little hint :)
I messed around with different software and made game with each of them but I think this is the one I'm going with, you guys have really done something incredible with visual code.
7:14 Little tip for anyone that wants to create a missile or arrow and have it rotate properly when fired: On Create tab under obj_bullet add a third variable with name: image_angle value: obj_player.image_angle. This rotates the sprite itself to match the player when fired otherwise your missiles will fly out sideways. If your player sprite is drawn facing right and missile is drawn facing up, you'll have to offset the angle with rotate instance. Alternatively edit all your sprites to have a consistent facing so you don't need add the extra step.
"Ship goes brr" is an amazing game name
If anyone else was following this guide and gets an error message after destroying a small rock, I found a fix! At 11:30 in his If Variable, he sets the variable to "instance_number(obj_rock)" which doesn't exist. Changing it to "instance_number(obj_rock_big)" fixed it for me.
Thank you, it worked for me as well!!!!
This happened due to anxiety, because if we pay attention, when he names the created objects, there is no "obj_rock_big" , as he got confused with the names of the Sprites - Calmly rewinding the video, I realized the reasons why the variables were not accepted. .
thats true becasue i noticed that is well@@ByAnakin
thank you so much i was going insane bruh
I knew I should have checked comments, I was pulling my freaking hair out over this!
This instructor is great! Very understandable for a complete beginner!
He is!
Thanks for a fast yet very clear explanation. Good to see both sets of code. Much appreciated 2 years after you made it!
Hi, I'm sorry, I just did exactly as you on 9:10 but the rocks are not rotating.
I don't understand why we put the "assign variable" value of 1 to rotate the big rock in "outside room" ? Can you explain to me please ?
yooo pixl i watch ur vids
@@radi4nt_ Hi ^^
@@PixlPixl Did you manage to fix the problem?
make it relative that was it's always increasing by 1 relative to it's current angle
oh wow. gml visual AND gml code at the same time 😀
and very good explanations that go with it. thanks!🙏
i just want to say you are a great teacher , ive been looking for a good tutorial to learn this engine and you give both coding options helps a lot
Watching the visual scripting in the left and the GML code in the right at the same time is a brilliant idea! Make more like these!!
:))
The latest Bounce or Break Make a Game series is the same :). You can find it on our channel home page or through a search :)
this video rules and the tutorial and teaching style is incredibly straightforward, but not hand holdy, and encouraging. thank you!!
Thanks for sharing.... these are the projects I enjoy learning with my kids.
Thank you for this, first gamemaker tutorial I have ever completed! Very nice. Even realized I needed to copy paste that one line of code before you said I needed to.
Thank you so much for making this video, this must have been made after an update of some kind because back then motion add wasn't a thing, it didn't exist, the new way of coding all this is so much easier than a 5 part series like I had to watch before all these updates, this video is great.
Glad you enjoyed it! Indeed the Add Motion action is new and was added to make it easier to make movement like this.
Happy GameMaking!
Hi :)
I thought this was a really great intro tutorial for GM. I personally found the web article easier to follow at my own pace, but I'm sure other people prefer the video!
today i downloaded the GameMaker. And this was the first tutorial i've found. And made a game the day i just downloaded it! thanks for this amazing video!!
Amazing :)! Congrats getting your first project under your belt
The score system makes my rock code send an error, so I had to remove it, but other than that, everything works. your tutorial was very clear and straightforward, and I like that you explained *why* we were adding certain parts instead of just telling us to do it. That way, I know what I'm adding and why I'm adding it. You're an amazing teacher. Thank you.
So glad you found it useful! Thanks Travelervat. Also, feedback about why is noted :)
No problem! Couldn’t agree more!! :D
I found that in my version of GameMaker the function is not called Point, but Score. Hope this helps
\
Oh, thank you sm!! Next time I open GameMaker, I'll look for that!!
That had INSANLY good directions! Thank you soo much for making this video, as it'll help me make other games in GameMaker Studio!
Try keep pressing W till you go faster than The Flash, took me some time to fix that
I know that bug.@@IamTooLateForThis
Pretty good tutorial. The double sided visuals for both of the coding styles is impressive. I coded something and actually understand some of what I've done! The only thing I don't understand is why my points won't go up. I've checked the code many times and just can't figure it out.
i have the same problem have you figured it out please tell me then
in obj_rock have you checked the "relative" box for the assign variable?
@@helloimxxile969 No, I’ll have to try that!
this helped me to use the template and put a GameBoy style, Very simple tutorial.
very concise and understandable! I followed along and everything made perfect sense. Thanks! See you in the next video
jfdlkfjdklajfdlkajfldjfdjljfdlajfdljalkfjdlsajflk;djlkf;jldksjaf;lkdjaf;lda
jfdl;asjfldkajf jdlafjdls fjldajfkldja;lfa
this was amazing, I think I missed a bit bc I saw no way to go back, but this tutorial made it easy to figure out how to do backwards movement
Glad it helped!
Exactly what a beginner needs to get started, Thank you x
Excellent introduction to GM, one idea for new makers is to add a Hyper Space button to randomly move the ship to a diffrent location. So adda new key press event and random change the ships X and y value based on the rooms max x and y.
wow, great tutorial, perfect for beginners. Explained well.
this has been my first ever game!
i love when there is a text that says wait rock, pls come back don't leave
That was a really enjoyable simple tutorial --- Super stoked to start working on these more!
Let's goo!
love Seattle spent most of 2024 there, looking to go back
Just by this tutorial alone, I definitely am looking forward to getting started with this! Thank you!
♥
Thanks for finally posting bite sized tutorials. I am saving this for later to treat myself into on watching later. :D
awesome that alarm function for sending signals to game restart is awesome!!!
Thank you. I haven't program since high school. Started playing games lately decided to learn game making.
Quick tip guys, set move_wrap under the player to move_wrap(true, true, 60); instead of move_wrap(true, true, 0); for seamless transitioning between the two sides of the screen!
Awesome video, thank you very much! If someone is interested, you can get random rocks rotation by adding a new variable in the obj_rock "create" event : _speed_rotation = random(3)
Then, modify the "image_angle" in the step event to "image_angle += _speed_rotation;"
You will have rocks rotating with a variable speed, up to 3/frame :)
I'm new to this. How are you doing this, step by step? I followed all the video instructions and my rocks don't spin.
@@iamaguy87 Check the "Step" event for obj_rock; did you assign the variable "image_angle" or did you accidentally assign it to "image_alpha"? Autocomplete error that's easy to make. Edit: Another possibility is that you didn't check "Relative" in the "image_angle" assign variable within the obj_rock "Step" event.
Matharoo, you make good tutorials, your editing and style makes it easy to follow.
would like to know how to create more levels, showing completing level 1 then going to level 2 and making the rocks and enemies harder. But it is a good start to giving basics
Thank for that bud, got my first jump in the Gamemaker.
This tutorial was great! Thank you for helping me make my first video game!
Love this!
bro your videos are really really useful😉😉
At first, my the score system didn't work for me. This was because I had named the variable 'score' and not 'points' like you did in the video. So I renamed the variable to 'points', and it worked. I'm just confused as to why this was - surely the name of the variable doesn't matter?
Thanks for this great tutorial! GML looks like a really cool language!
6:20 shooting
8:12 moving rocks
9:28 destroying rocks
14:19 score system
I think its weird that you play with the arrows and shoot with mouse, maybe change that cause it is more comfortable/nice to play with. so here is the code for WAD.
if keyboard_check(ord("W"))
{
motion_add(image_angle, 0.1);
}
if keyboard_check(ord("A"))
{
image_angle += 4;
}
if keyboard_check(ord("D"))
{
image_angle -= 4;
}
here I changed the arrows for WAD for people that want to change it!
Good idea, the only down-side I noticed with this is that you can't perform multiple strings at a single time. Meaning, as you turn left while moving forward, you cannot let go of "A" and press "D" to turn right without letting go of the forward movement key "W" (and vice-versa).
Basically, using string movement code like this makes the movement feel a little less polished and refined. But it can definitely work if anyone would much rather use WAD movement instead of the arrow keys.
W
Thanks bro. I am looking for a game engine that is easy to learn but has many features. Some that I'm exploring are Gamemaker, Construct 3, Gdevelop and Unity
sorry for being agressive the first time this tutoriel is actualy pretty good and helped a lot
I have an issue at 7:40. I keep getting an error message after running the game
Me too, looking for a solution, will report back if I find it.
what error ?
great breakdown into small steps.
Nice tutorial, would definitely recommend including shortcuts alongside gui as it speeds up your life 350% more
Simple and effective. Many thanks (:
Who is this guy? I need to subscribe on his channel because he's a good teacher.
This is Gurpreet, he's GameMaker's tech writer and he makes a lot of our video inhouse tutorials!
For some reason I don't have the template for Space Rocks on my version of GameMaker, is there a place to download it from? I recently installed the newest version of GM, don't know if that removed it and the other templates?
Hi, you should be able to get it from the start screen, after you hit "New". The template screen may show "User Templates" in a drop down menu, so make sure you change that to "All Templates" or "Official Templates". Make sure you are connected to the internet as well.
@@GameMakerEngine thanks, don't know what happened (I did cycle through the different options), but they're showing now.
I followed this with the most recent version of gamemaker, and it doesn't work when I try to run it. it just shows a blank screen, not sure why or what i could have done wrong
yeah i got through the first 14 lines of code and the game wont even open for me lol
@@uga31333 k so now it works i don't remember what i did but maybe you haven't put your object into the room.
@@asphodellie yeah no its definetly there. the game doesnt even open
the explosion effects are something built into gameMaker ? can you view the effects to see how they look without coding them in ?
Man this was so helpful. You can be sure I will review this video if I get stuck somewhere. I am really bad with names I do understand variables tho as I am not a coder but I can read code.
Edit: I actually took it a little further and gave sound effects to my bullets. Well It's a shotgun sound but hell I am from South Africa, Shotguns is our answer for everything 😀
Yo thank you so much man... appreciate it
hello! thanks for the great tutorial, but i have a problem. When i shoot at the small rocks my game crashes, how do i fix it (i did the same way as you imo)
I had the same problem! Here's the fix - In the obj_rock_big collision event with obj_bullet, under the first Else, Set Sprite needs to be "spr_rock_big" In this video, he labelled it "spr_rock" which was a mistake, so if you copied him word for word, it crashes.
In the tutorial when we want to limit the amount of rocks that can appear on the screen when the bullet collides with the large rock, in the "if" you write obj_rock, but we never created the obj_rock in the tutorial, maybe I didn't see it correctly but I wanted to know how to do it
That was surprisingly easy 👍
Great Tutorial. But guys just a tip make sure you have everything spelled correctly. sat there for 15 minutes wondering why i was getting an error. come to find out i spelled game wrong when naming my obj_game object.
what an epic video. super entertaining and educative. Thank you!
Great! So happy you enjoyed it
I wanna make it so that the ship has autofire. I know you start with "if key down" so that bullets constantly shoot when the key is down, but it shoots at lightspeed. How do I set the speed to how often this code runs?
on the 11:12 part, my instance_copy(true) is not working, it says "GM2022 - Return value of a pure function is not being used", and i'm following the steps of the tutorial
same
I fix it by assigning the instance_copy to a variable:
```
instance_destroy(other);
effect_create_above(ef_firework, x, y, 1, c_white);
direction = random(360);
instance_multiply = sprite_index
if sprite_index == spr_rock_big
{
sprite_index = spr_rock_small;
instance_multiply = instance_copy(true);
}
else if instance_number(obj_rock) < 12
{
sprite_index = spr_rock_big;
x = -100;
}
else
{
instance_destroy();
}
```
Thanks ! It's a great tutorial !
You're welcome!
i have a problem, why when i type in else it shows me unexpected else expression i dont know how to fix it 11:15
"ship go brr" ahh yes, a perfect name
Thank you so much I'm new in gms2
Amazing tutorial
Really cool!
my movement is not smooth for some reason, i have to press the key over and over, instead of just holding it down
The best place to go is the GM community forum or Discord. Try posting a picture of your code to make it easy for people to help you
Forum: forum.gamemaker.io/index.php
Discord: discord.com/invite/gamemaker
for some reason when I did the instance_destroy from the player it was giving me an error. so instead, I made it so that the rock would do the destroying of the player using instance_destroy(other) and made the game object call the alarm from the rock object instance instead. Otherwise worked great! Thank you for this-- very helpful!
This is cool, thanks for this.
How do I create an "or" for the movement, so I can use "up" or "W" to move? I wanted to add WASD controls, and the only way I could was by adding all the same commands but for the WASD, I then ran into the issue that if you pressed both W and UP at the same time or w/e other key, it would double the move speed. I only wanted to be able to use either key without adding more speed.
Also, how to I add a hard stop so that I can stop the player movement? I added S and Down at -.1 so that it would slow and you could kind of stop, but it was not like a break and stand in place like I wanted.
I'm able to watch this entire video while my computer is loading.
11:31 I had to put instance_number(Obj_rock_big). when i put instance_number(obj_rock) game would crash.
So much fun! Thank you!
When you change the sprite rocks into images of your friends faces, it can get even better.
when i run the game after adding the first several events, my player isnt moving. ive proof read the visual code to make sure there are no errors. please help (:
hey you made wordle in an hour so cool!
i replaced the rocks with THE ROCK and when they are hit they turn into kevin hart
when I coded the ships movement and to make move around the screen. all it does is small adjustments, every time I tap the key
if your using visual code you might be using the "key PRESSED" instead of "key DOWN" function, I had the same error
verry helpful to learn how to use this program
every time i click to shoot , it says code error
even tho i did it the same as you
same here
Please do this for the Heroes Trial tutorial too.
excellent tutorial, very easy to follow and extremely helpful. one question, are we able to 'refine' the hitbox of the player and/or the rocks? i noticed there is a small 'gap' that triggers the collision event even though the two objects arent necessarily 'touching' yet. a small nitpick but i feel like itd help player immersion. thanks!
Hey! You can modify the mask of your ship and rocks within their sprite editors.
So e.g. double click on the player sprite and its sprite editor will open. Then expand the "Collision Mask" menu and change the Mode to Manual. Now you can just its mask in the canvas :)
7:30 why is this not good? does this hurt the game performance ?
How would i make it so when you kill a certain amount of enemies you go to another level, like a different room thats slightly harder?
The best place to go for help is the GM Community Forum or Discord
Forum: forum.gamemaker.io/index.php
Discord: discord.com/invite/gamemaker
Instead of making it shoot with the left click, what do you need to write to make it shoot with the tab key?
ship goes brrr
brrrrr
It keeps giving me a error message when I try to shoot a big rock the error is telling me that there is a problem with the instance copy part anf i don't know how to fix it
I have a problem, I don't know how to enter there, could you give me your opinion?
Question, if you still answer them.
My ship glides even if I release the key. Is there any way I can fix that?
Turns out there is no max speed for the player so before I added the player collidigg by with the block I helped than the forward key and it was moving so fast there where several on the screen
at 11:13 sentence 9 instance_copy(true); is coming up as an error and causes the game to crash any ideas to as why that is? has the game language changed since this video was posted?
forgot to mention the error says the return value of a pure function is not being used?
wow nice tutorial to start!!!