Tutorial series: 1. Base game: th-cam.com/video/nwlvT-L9vFg/w-d-xo.html 2. Main Menu: th-cam.com/video/Us5GSddVedY/w-d-xo.html 3. Music and SFX: th-cam.com/video/NGNJWpiVS1M/w-d-xo.html 4. Power Ups: th-cam.com/video/xeXsRRYSQ78/w-d-xo.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
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 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 for this tutorial but I met a problem. the score remains at zero. and after destroying several asteroids, the game bugs and an error page asks me to clean or abort. I have reread and checked your instructions several times and have not made any incorrect entries. Game Maker Video 2 told my error came from this line "event - points = 0; For the software we should use a variable (var or move) can you help me?
Hey armia it's hard to help without more information. Are you stuck at @10.25? Double check you have written the code correctly? Is it set to 'above'? In general the best thing to do would be to post on GameMaker's forum or Discord, you can find them with a quick google, then post your problem with a screenshot.
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. .
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!
Where's the old videos. The old ones where much better, they showed you each detail and didn't provide cheap shortcuts (pre made sprites etc). I want to really get into the guts of the software once again, but these videos do not explain enough.
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?
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.
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.
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!
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.
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.
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
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
Assalam o Alikum game make i am making a game space rock object player is very fast speed please tell me how to control a object player speed and rockes not working and object player not shoot a rock
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.
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 (:
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.
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
For a beginners tutorial - and this is the first of the beginners tutorials mentioned on the website - you're WAY too fast. Beginners will definitely make all sorts of mistakes and become demotivated, because you really rush through literally everything. Yes, you learn from mistakes, but getting started should also generate a sense of success. If we had no pause button, this would be for the bin.
I personally love fast tutorials. You can always pause and slow them down if needed. For someone who just wants to digest information fast this is really helpful. I do see the argument you’re making but imo I like faster tutorials rather than the generic slow ones.
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
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.
(fixed)I have a problem at the very last step when it comes to scoreboard. I checked 5 times and remade the entire points variable 3 times. And I still get the same error: Error in action number 1 of Step EventObject_bullet for Object OBJ_Rock: Push :: Execution error - Variable Get 100005.obj_variable(100003,-2147483648) at gml_object_OBJ_rock_Collision_obj_bullet GML_Object_OBJ_rock_Collision_obj_bullet (line-1) my o in object was small o. Nevertheless, leaving it up here for others. BIg and small letters matter a lot.
The best place to go for help is the GM community forum or Discord, people there can talk you though what you're missing. It's likely something small in the code Forum: forum.gamemaker.io/index.php Discord: discord.com/invite/gamemaker
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
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.
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 ?
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 😀
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
i copied the code word for word and when I go to run it for the first time it leaves a trail behind the player I am trying to do this for a game design class for college and its due soon please replay asap
Hey! The best place to go is the GM community forum or Discord for some quick tips: Forum: forum.gamemaker.io/index.php Discord: discord.com/invite/gamemaker
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.
this was genuenly one of the worst tutorials i have ever witnessed.(im salty bcause i have no clew what hes talking about, and my computer is more dog shit thatn dogshit)
i did all and everything was working... untill. ok so at the end of the video i tried launching the game and everything was working, then i shot a big rock and it crashed, pls help
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!
what do I do when the program tries sending me this every time I tried running it " ___________________________________________ ############################################################################################ ERROR in action number 1 of Step Event0 for object Obj_player: Variable .if_mouse_check_button_pressed(100005, -2147483648) not set before reading it. at gml_Object_Obj_player_Step_0 (line 16) - if_mouse_check_button_pressed(mb_left) ############################################################################################ gml_Object_Obj_player_Step_0 (line 16) " ?
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.
it didnt work for me it kept saying: ___________________________________________ ############################################################################################ ERROR in action number 1 of Create Event for object obj_bullet: Variable .image(100009, -2147483648) not set before reading it. at gml_Object_obj_bullet_Create_0 (line 10) - direction = obj_player.image.angle; ############################################################################################ gml_Object_obj_bullet_Create_0 (line 10) gml_Object_obj_player_Step_0 (line 73)
En el tutorial cuando queremos limitar la cantidad de rocas que pueden aparecer en pantalla cuando la bala colisiona con la roca grande, en el if escribes obj_rock, pero jamás creamos el obj_rock en el tutorial, tal vez no lo vi bien pero quería saber cómo hacerlo.
Thanks to this i made a very simple firing game where u move the pistol up and down and robbers come robbers have health and if u shoot them 2 times u get points but there is cops and if u shoot them you lose points and i have a second mode when you reach i think 100 points where its automatic also the gun can reload the more points the more the capacity its very cool but sadly my pc is broken.....😢and i hate my life
I got a question, how do i put a mechanic (idk how else to call it) where if the ship was moving on a direction (i pressed the up key button then i let it go), instead of just infinitely moving forward, how do i make it so that the ship stops moving until it completely stops? like if it was affected by a friction on the opposite side. i know i can just add an instance where if i press the down button i can move to the other side which will allow me to stop moving forward and just move the opposite direction. But i would like to know how to make the environment of the game stop my ship from moving the direction it is moving on.
I'm asking myself the same question actually. Even more, I'd like to add collisions between two rocks so they don't go through each other, but it seems when two rocks meet now they get stuck together. I'm still trying to figure things out, I'll update you if I find a solution !
@@AGKyran thanks man! I put the down key button and it worked. But couldn’t find the « friction ». Hey are u new to GameMaker? I’m new and I’m trying to learn by myself.
@@felipeavila1763 I also added the down key button, but it's still the same, as long as the key is pressed the acceleration never stops. I found friction in the blocks but it seems it doesn't work no matter the value I put. Yes I'm new to gamemaker too! I watched a video about before (in my native language, french) and the person said it's a good thing to go over what's in tutorials, to add your own things. It's easier said than done though! I tried to duplicate the bullet instance when reaching a certain score (to shot more bullets), the game just crashed at the start.
The movement is not working at all. I put exactly as you did in the visual code and the player will not move. No idea why and there's nothing in the output
i have a question, how can I set a limit to the player speed, cause when the player object reenters the room form the opposite place it left the speed seems to multiply by 2 each time, how can I fix that?
Going step by step on the web read tutorial or the video, the logic shown for visual code just doesn't want to work at all. It's pretty damn irritating.
please help this keeps happening when i try to shoot the gun i follow the artical and the tutorial but i keep getting this error message ___________________________________________ ############################################################################################ ERROR in action number 1 of Step Event0 for object Obj_player: Variable Obj_player.obj_bullet(100004, -2147483648) not set before reading it. at gml_Object_Obj_player_Step_0 (line 16) - instance_create_layer(x, y, "Instances", obj_bullet) ############################################################################################ gml_Object_Obj_player_Step_0 (line 16)
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?
Great Tutorial, but I'm running into one problem in the "Destroying Rocks" section. I hit the rock and it explodes. But the explosion animation doesn't play on the FIRST HIT, it does play perfectly on all subsequent hits. I've checked my code thoroughly and tried it in GML Visual and GML Script with the same results (I'm on MAC OS if that matters). Am I doing something wrong or is this a bug in the actual program? EDIT: Just downloaded a completed version of the game code (created by someone else) and it also does not do the explosion animation on the first hit (but it works on all the hits after that). Very strange.
@@morimoko No. Unfortunately, I grew frustrated with the lack of up to date tutorials for GameMaker and I've switched to another engine. But I wish you the best of luck with it.
@@morimoko I am definitely a beginner and the game I want to build is a fairly simple 2d game. After testing many engines, I found that Construct 3 was the best fit for my purpose and the included tutorials were excellent.
Templates are great for showing you best coding practices and also helping you to create a game without doing ALL the porgramming. You can also see what the programming looks like and reverse engineer it into your own project. To open a template you just open GM > click on 'new' > choose a template. * Best coding practices: gamemaker.io/en/blog/best-practices-when-coding-in-gamemaker-studio-2
I did everything according to the lesson and I succeeded. But if I would like the ship to be able to fly backwards when the "down" button is pressed, how can I do that?
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 :)
Tutorial series:
1. Base game: th-cam.com/video/nwlvT-L9vFg/w-d-xo.html
2. Main Menu: th-cam.com/video/Us5GSddVedY/w-d-xo.html
3. Music and SFX: th-cam.com/video/NGNJWpiVS1M/w-d-xo.html
4. Power Ups: th-cam.com/video/xeXsRRYSQ78/w-d-xo.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.
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 :)
"Ship goes brr" is an amazing game name
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
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
verry helpful to learn how to use this program
I have one question though... how do you increase. speed like every 10 seconds
Why does my Project keep saying ;ErrorCode; when I press left click? Can you give me a way to solve it?
Thanks for this tutorial but I met a problem.
the score remains at zero. and after destroying several asteroids, the game bugs and an error page asks me to clean or abort. I have reread and checked your instructions several times and have not made any incorrect entries. Game Maker Video 2 told my error came from this line "event - points = 0; For the software we should use a variable (var or move)
can you help me?
I also got the problem but i already found the solution, Try to type "instance_number(obj_Big_rock)" Instead of "Instance_number (obj_rock)"
when i add effect its not working what have i do?
Hey armia it's hard to help without more information. Are you stuck at @10.25? Double check you have written the code correctly? Is it set to 'above'?
In general the best thing to do would be to post on GameMaker's forum or Discord, you can find them with a quick google, then post your problem with a screenshot.
my game wont run right it just stays black
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 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
oh wow. gml visual AND gml code at the same time 😀
and very good explanations that go with it. thanks!🙏
Where's the old videos. The old ones where much better, they showed you each detail and didn't provide cheap shortcuts (pre made sprites etc). I want to really get into the guts of the software once again, but these videos do not explain enough.
Just create a new template and use your own sprites
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?
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.
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.
i replaced the rocks with THE ROCK and when they are hit they turn into kevin hart
why is this shit so fucking hard for me no matter how much i follow the video all that comes up is errors
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!
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.
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.
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
so i copied your code.. and the first time i shoot a rock there's no effects, The first time i run into a rock no effects either.
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
Assalam o Alikum game make i am making a game space rock object player is very fast speed please tell me how to control a object player speed and rockes not working and object player not shoot a rock
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!
Thanks for sharing.... these are the projects I enjoy learning with my kids.
??? doesnt work, the bullets move with me
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 (:
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.
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.
@@mynameisnotcool8426 yeah no its definetly there. the game doesnt even open
For a beginners tutorial - and this is the first of the beginners tutorials mentioned on the website - you're WAY too fast. Beginners will definitely make all sorts of mistakes and become demotivated, because you really rush through literally everything. Yes, you learn from mistakes, but getting started should also generate a sense of success. If we had no pause button, this would be for the bin.
I personally love fast tutorials. You can always pause and slow them down if needed. For someone who just wants to digest information fast this is really helpful. I do see the argument you’re making but imo I like faster tutorials rather than the generic slow ones.
i think it doesnt work anymore? there is no ''obj_game''
You create it obj_game when you're making your objects. Look @1.42 😊
6:20 shooting
8:12 moving rocks
9:28 destroying rocks
14:19 score system
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
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.
(fixed)I have a problem at the very last step when it comes to scoreboard. I checked 5 times and remade the entire points variable 3 times. And I still get the same error:
Error in action number 1 of Step EventObject_bullet for Object OBJ_Rock:
Push :: Execution error - Variable Get 100005.obj_variable(100003,-2147483648)
at gml_object_OBJ_rock_Collision_obj_bullet
GML_Object_OBJ_rock_Collision_obj_bullet (line-1)
my o in object was small o. Nevertheless, leaving it up here for others. BIg and small letters matter a lot.
This just helped me out, thank you so much
Thank you, I was stuck for a bit!
why its just not moving, when i have done exactly what guy in the vidio says?
The best place to go for help is the GM community forum or Discord, people there can talk you though what you're missing. It's likely something small in the code
Forum: forum.gamemaker.io/index.php
Discord: discord.com/invite/gamemaker
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
ship goes brrr
brrrrr
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 love when there is a text that says wait rock, pls come back don't leave
so
It says that Object: Obj_player Event: Step at line 3 : wrong number of arguments for function motion_add. What does that mean!
yea i found out that by rewriteing the code it works
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
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 😀
como puedo ponerle el HighScore?
I have a problem, I don't know how to enter there, could you give me your opinion?
WHY ROCK GO NO MOVE
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
i copied the code word for word and when I go to run it for the first time it leaves a trail behind the player I am trying to do this for a game design class for college and its due soon please replay asap
Hey! The best place to go is the GM community forum or Discord for some quick tips:
Forum: forum.gamemaker.io/index.php
Discord: discord.com/invite/gamemaker
@@GameMakerEngine i figured out my issue I didn't have a back ground turned on thank you for your reply
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.
this was genuenly one of the worst tutorials i have ever witnessed.(im salty bcause i have no clew what hes talking about, and my computer is more dog shit thatn dogshit)
i did all and everything was working... untill.
ok so at the end of the video i tried launching the game and everything was working, then i shot a big rock and it crashed, pls help
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!
i don"t now how
to run it
what do I do when the program tries sending me this every time I tried running it "
___________________________________________
############################################################################################
ERROR in
action number 1
of Step Event0
for object Obj_player:
Variable .if_mouse_check_button_pressed(100005, -2147483648) not set before reading it.
at gml_Object_Obj_player_Step_0 (line 16) - if_mouse_check_button_pressed(mb_left)
############################################################################################
gml_Object_Obj_player_Step_0 (line 16)
" ?
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.
it didnt work for me it kept saying:
___________________________________________
############################################################################################
ERROR in
action number 1
of Create Event
for object obj_bullet:
Variable .image(100009, -2147483648) not set before reading it.
at gml_Object_obj_bullet_Create_0 (line 10) - direction = obj_player.image.angle;
############################################################################################
gml_Object_obj_bullet_Create_0 (line 10)
gml_Object_obj_player_Step_0 (line 73)
teach us how to make a FNAF Fan Game in game maker
Question, if you still answer them.
My ship glides even if I release the key. Is there any way I can fix that?
En el tutorial cuando queremos limitar la cantidad de rocas que pueden aparecer en pantalla cuando la bala colisiona con la roca grande, en el if escribes obj_rock, pero jamás creamos el obj_rock en el tutorial, tal vez no lo vi bien pero quería saber cómo hacerlo.
my "Wrap Around room" duplicates the object obj_player for me
Thanks to this i made a very simple firing game where u move the pistol up and down and robbers come robbers have health and if u shoot them 2 times u get points but there is cops and if u shoot them you lose points and i have a second mode when you reach i think 100 points where its automatic also the gun can reload the more points the more the capacity its very cool but sadly my pc is broken.....😢and i hate my life
This was an excellent game!
but how do move ship with "WASD"
When you select up, down, left and right on the if key down you just choose WASD instead
for me, it never makes a small rock, and only ever destroys the large rock forever. The code is all the same, so I don't know why it happens
I don't know why but my rocks are just spinning at one place and not moving at all. Can somebody help?
I’m still having trouble making the ship move
I got a question, how do i put a mechanic (idk how else to call it) where if the ship was moving on a direction (i pressed the up key button then i let it go), instead of just infinitely moving forward, how do i make it so that the ship stops moving until it completely stops? like if it was affected by a friction on the opposite side. i know i can just add an instance where if i press the down button i can move to the other side which will allow me to stop moving forward and just move the opposite direction. But i would like to know how to make the environment of the game stop my ship from moving the direction it is moving on.
I'm asking myself the same question actually. Even more, I'd like to add collisions between two rocks so they don't go through each other, but it seems when two rocks meet now they get stuck together.
I'm still trying to figure things out, I'll update you if I find a solution !
@@AGKyran thanks man! I put the down key button and it worked. But couldn’t find the « friction ». Hey are u new to GameMaker? I’m new and I’m trying to learn by myself.
Uhhh….. u got discord…? You know…… so we can learn together…? I can give you my code.
@@felipeavila1763 I also added the down key button, but it's still the same, as long as the key is pressed the acceleration never stops.
I found friction in the blocks but it seems it doesn't work no matter the value I put.
Yes I'm new to gamemaker too!
I watched a video about before (in my native language, french) and the person said it's a good thing to go over what's in tutorials, to add your own things.
It's easier said than done though! I tried to duplicate the bullet instance when reaching a certain score (to shot more bullets), the game just crashed at the start.
@@AGKyran oh Damn, hey I speak French too! The code is #5206
For some reason my score goes up once and doesnt go up anymore. Could someone tell me what i did wrong?
Once you created a game, is there a way to export it in HTML5 code so it can be embed on a website page?
Thank you so much I'm new in gms2
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
The movement is not working at all. I put exactly as you did in the visual code and the player will not move. No idea why and there's nothing in the output
Really cool!
i have a question, how can I set a limit to the player speed, cause when the player object reenters the room form the opposite place it left the speed seems to multiply by 2 each time, how can I fix that?
when i tested big rocks break into small rocks i got extra player ships but no small rocks, idk imma sleep for now
Going step by step on the web read tutorial or the video, the logic shown for visual code just doesn't want to work at all. It's pretty damn irritating.
Why i can't make it move
I do exactly what they did
having the issue idk why
Yeah same
how is it even possible to make a very complex tutorial with only 16 mins duration?
please help this keeps happening when i try to shoot the gun i follow the artical and the tutorial but i keep getting this error message
___________________________________________
############################################################################################
ERROR in
action number 1
of Step Event0
for object Obj_player:
Variable Obj_player.obj_bullet(100004, -2147483648) not set before reading it.
at gml_Object_Obj_player_Step_0 (line 16) - instance_create_layer(x, y, "Instances", obj_bullet)
############################################################################################
gml_Object_Obj_player_Step_0 (line 16)
please help me
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?
for some reason my spaceship isn't moving when I hit the arrow key could you help me with that
acctuly my first game ingeine was in scratch jr and my second was in scratch and the last one was in game maker
Great Tutorial, but I'm running into one problem in the "Destroying Rocks" section. I hit the rock and it explodes. But the explosion animation doesn't play on the FIRST HIT, it does play perfectly on all subsequent hits. I've checked my code thoroughly and tried it in GML Visual and GML Script with the same results (I'm on MAC OS if that matters). Am I doing something wrong or is this a bug in the actual program? EDIT: Just downloaded a completed version of the game code (created by someone else) and it also does not do the explosion animation on the first hit (but it works on all the hits after that). Very strange.
Same! do we have an answer yet?
@@morimoko No. Unfortunately, I grew frustrated with the lack of up to date tutorials for GameMaker and I've switched to another engine. But I wish you the best of luck with it.
which engine? and would you say you are a beginner? just wondering as I am also just getting into the space.@@CMessineo
@@morimoko I am definitely a beginner and the game I want to build is a fairly simple 2d game. After testing many engines, I found that Construct 3 was the best fit for my purpose and the included tutorials were excellent.
effect_create_above is depreciated. Use this instead:
effect_create_layer("Instances",ef_explosion,x,y,1,c_white);
can anyone help me out how to make Obi_player will immediately stop when i stop pressing up key meaning it do not stop and go on
muito bom, me ajudou bastante
Why my ship shoots many bullets at same time even I put If Mouse/Key Pressed??
This guy has great tutorials on Udemy iirc
this video rules and the tutorial and teaching style is incredibly straightforward, but not hand holdy, and encouraging. thank you!!
When I pick GML visual nothing happens
why mine project when I start and the player can't move
Please gamemaker tell me how to use templates
Templates are great for showing you best coding practices and also helping you to create a game without doing ALL the porgramming. You can also see what the programming looks like and reverse engineer it into your own project.
To open a template you just open GM > click on 'new' > choose a template.
* Best coding practices: gamemaker.io/en/blog/best-practices-when-coding-in-gamemaker-studio-2
I did everything according to the lesson and I succeeded. But if I would like the ship to be able to fly backwards when the "down" button is pressed, how can I do that?
if keyboard_check (vk_down)
{
motion_add(image_angle, -0.1);
}
no need to thank me
My ship won't move to the left, it just goes right, it spins, but doesn't turn
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 :)
ship go brrr....
nice name but concept stolen from dani
i get an error message and a game crash after the ship hits the rock i don’t get why i created the alarm and everything