How To Make A Classic Arcade Game in GameMaker
Вставка
- Опубліковано 19 чер 2024
- Learn how to make a classic arcade game in GameMaker in this 15 minute tutorial. Then check out the other videos in the series to expand and improve your game.
Download GameMaker: opr.as/DownloadGM-YT
Article: gamemaker.io/en/tutorials/mak...
Tutorial series:
1. Base game: • How To Make A Classic ...
2. Main Menu: • How To Create A Main M...
3. Music and SFX: • How To Play Music And ...
4. Power Ups: • How to Create 2 Awesom... - Ігри
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
@@user-mz4ry9ml9h 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 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
"Ship goes brr" is an amazing game name
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!
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.
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 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.
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 video rules and the tutorial and teaching style is incredibly straightforward, but not hand holdy, and encouraging. thank you!!
oh wow. gml visual AND gml code at the same time 😀
and very good explanations that go with it. thanks!🙏
Exactly what a beginner needs to get started, Thank you x
Thanks for sharing.... these are the projects I enjoy learning with my kids.
Thank you. I haven't program since high school. Started playing games lately decided to learn game making.
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!
Thanks for finally posting bite sized tutorials. I am saving this for later to treat myself into on watching later. :D
Matharoo, you make good tutorials, your editing and style makes it easy to follow.
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 😀
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 :)
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
Yo thank you so much man... appreciate it
very concise and understandable! I followed along and everything made perfect sense. Thanks! See you in the next video
So much fun! Thank you!
When you change the sprite rocks into images of your friends faces, it can get even better.
Really cool!
Simple and effective. Many thanks (:
Just by this tutorial alone, I definitely am looking forward to getting started with this! Thank you!
♥
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
Thanks for this great tutorial! GML looks like a really cool language!
Thank for that bud, got my first jump in the Gamemaker.
Thank you so much I'm new in gms2
great breakdown into small steps.
this has been my first ever game!
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)
very helpful!
wow nice tutorial to start!!!
This tutorial was great! Thank you for helping me make my first video game!
Love this!
Nice tutorial, would definitely recommend including shortcuts alongside gui as it speeds up your life 350% more
Thanks ! It's a great tutorial !
You're welcome!
what an epic video. super entertaining and educative. Thank you!
Great! So happy you enjoyed it
Had an issue while setting the alpha for the ghost powerup where it wouldn't reset back to its original sprite, staying transparent. Is there a way to reset it before the instance is destroyed?
verry helpful to learn how to use this program
Hello ! Thanks a lot !
But when i shooting, my arrow restar at the same postion and i can just shoot right forward ! Do you know from where the problem is going ?
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!
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 :)
To shoot I put the command in the GML obj_player.image_angle it only shoots forwards not where I aim, what should I do?
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.
is there a way to give the big rock and the small rock different point values? probably not right because they are the same event?
cool a classic! 🕹
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 :)
thank you nice video
hey you made wordle in an hour so cool!
bro your videos are really really useful😉😉
13:35 Is there another visual way to ask another object to initiate this action? because this way there is no visual indication of which object was previously selected and it is quite easy to lose that data if you need to fix a bug. And yes, I know there is an option to put comments but I think it could improve that usability.
i love when there is a text that says wait rock, pls come back don't leave
thanks!
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?
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 :)
Hey please help me!
So I am making the space rocks game and for some reason, even though I made no mistakes, it does not run when I click F5. It tells me to check compile errors however the compile errors window says there are no errors. Please help.
Hello,
Your tutorial is really amazing, I have managed to make the game using both GML visual and GML code.
I have hit a small problem though with the GML code version of the game. If you target all the big rocks and avoid the small ones, the small rocks float off my screen and they do not respawn. Do I have to add anything to wrap the small rocks around the room and to get infinite rocks? (please see code for Rock below)
1 Obj_Time. Points += 50
2
3 instance_destroy(other)
4
5 effect_create_above(ef_explosion, x, y, 1, c_white)
6
7 direction = random(360)
8
9 if sprite_index == spr_rock_big
10 {
11 sprite_index = spr_rock_small
12 instance_copy(true);
13 }
14 else if instance_number(Obj_Rock) < 12
15 {
16 sprite_index = spr_rock_big
17 x = -100
18 }
19 else
20 {
21 instance_destroy()
22 }
Please do this for the Heroes Trial tutorial too.
hey!, is there any possible way to add a destruction sound?
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 dont have any of the templates. Do I need to download them somewhere first?
I have a problem, I don't know how to enter there, could you give me your opinion?
Hi I have a question how could I fix the bug when you shoot well the bullet is on screen it follows the direction of the keys you press
Instead of making it shoot with the left click, what do you need to write to make it shoot with the tab key?
muito bom, me ajudou bastante
i have 0 experience but thanks for the tutorial as i have never coded before
excellent merci
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 have one question though... how do you increase. speed like every 10 seconds
IRENE NYAADIE
10 seconds ago
when I run it, it says "Exception thrown, see javascript console" so what do I do?
So I followed the tutorial through and through and whenever I destroy a big rock, all of the rocks are destroyed. The one that gets shot is split into two but the other rocks just turn a copy of the small rock.
I'm using gml visual. Any help?
um when i put instance_copy(true); its says return value of pure function is not being used. what does this mean?
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 (:
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.
how to know what all green color properties available to use in an object script ?
Why does my Project keep saying ;ErrorCode; when I press left click? Can you give me a way to solve it?
For some reason 18 is always wrong even when I'm following instructions, and I cannot run the game. Any suggestions?
I can't drag and drop the sprite into the object box because as soon as I click on the asset to drag it the window changes to that
awesome tutorial! very easy to follow.
But some practices in this tutorial don't feel right for much larger projects with hundreds/thousands of sprites.
Does gamemaker have a tutorial for managing that kind of projects?
There are older tutorials, like the series Little Town.
We have stopped promoting them because some parts of the tutorial series don't work or aren't completely clear with all the more recent GM updates.
They are still available to try out though if you're keen to: gamemaker.io/en/tutorials/little-town-gamemaker-tutorial
Another option would be to check out some of Shaun Spalding's tutorials :)
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
After setting the movement, the object player moves on its own and wont stop. Did i do something wrong?? Or is it meant to be that way until it collides
In this game it's meant to keep moving like that because you're in space. This tutorial on How to Move and Collide in GameMaker might be what your after for making your character only move when the key is pressed: ua-cam.com/video/wmPOjMBo_N8/v-deo.htmlfeature=shared&t=116
When you click the left mouse button, a lot of bullets spawn, and I can't seem to figure out how to make them only spawn one at a time. This is a small game problem that I can't figure out.
Nevermind I figured out the problem.
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
wth this is way better then unreal visual code!!
i do not get an option to add motion can someone please help with this? i am using visual and it doesnt come up if i search either
Update your gamemaker version
I appreciate the "ship go brr" title
why when my player shoot 1 time then it dont shoot anymore for a few seconds the game restarts?
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?
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
thank you I tried to follow the website tutorial but it skips a few steps
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?
you are good👌👌👌👌
Im having a problem where when i press the up arrow it continues moving
Where is the add motion block I can’t find it
why isnt it not letting me see my game for some reason when i test it pls reply
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
Hello, whats the difference between create and step? and whats the begin step and end step for as well, can someone explain please?
Not sure if you still need this but create is when it spawns and step is every frame.
@@jasmijn-1419 thanks!
ship goes brrr
brrrrr