Thanks for the tutorials! I had to rewind a fair bit for this one and your sound effects one because I had trouble keeping up, but I feel that's only because it's my second day working in GameMaker. But rewinding helped me a lot anyway as I started understanding different concepts better hearing them repeated again.
Glad it's working for you :). Have you worked in any other game engines before? We have a blog to help people get started if the are coming from Unity: gamemaker.io/en/tutorials/moving-from-unity-to-gamemaker
@@GameMakerEngine I'm just a QA in a studio that currently uses Unity, so I've never used it before myself, I just wanted to toy around with things and see what I could make. I used GameMaker for a class back in high school (2012ish) and it's a LOT different now than it was back then. Not in a bad way of course, I was pretty pleased seeing all the changes and improvements. Next I'll be trying out the Hero's Trail tutorial and try to customize it a lot more than I did with this one. Keep up the good work!
@@GameMakerEngine please help me when i try to run the game it won't run and in the compile error tab it shows this --> Object: obj_powerup_spread Event: Create at line 12 : invalid token \
This is the final video we have in this tutorial series. If you go on GM's channel page you can see 2 playlists with stand-a-lone tutorials you can adapt them to add onto this game. Then there are also interviews with Game Devs about how they made their game, life coaching sessions and stuff like that :). ua-cam.com/channels/OvndqCF3iN2SksQDwR95wg.html
Want to make power-ups in your video game? Watch this tutorial to turn your frail spaceship into an invincible rock blaster. Downloads: * Assets: coal.gamemaker.io/sites/5d75794b3c84c70006700381/assets/649c22b24f6bf54116bb283e/Space_Rocks_Powerups_Sprites.zip * Starting project (GML Visual): yoyo-www-cms.s3.amazonaws.com/sites/5d75794b3c84c70006700381/assets/649c2af44f6bf54116bb2849/SpaceRocks_GMLVisual.yyz * Starting project (GML Code): yoyo-www-cms.s3.amazonaws.com/sites/5d75794b3c84c70006700381/assets/649c2af44f6bf54116bb2848/SpaceRocks_GMLCode.yyz 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
"Teleport" ship to a random location would be a common and fairly simple powerup to add - but how could one code a "teleport to safe location" to prevent the ship from coming out of hyperspace either in a rock or surrounded by rocks that will destroy it instantly? Another good powerup is a shield - drawing a circle around the player ship and "bouncing" off of rocks instead of passing through them or exploding. Need to take into account a situation where rocks surround player ship so there is nowhere to bounce TO - bounce rocks away from player instead/as well? It'd be interesting to see a shader being used to add "glow" to all the non-text elements in the game room, but that might be a bit beyond the scope of this particular tutorial series, BTW, loving the new "Space Rocks" tutorials - the first one simply blew me away with how little effort is required to produce an actually playable foundation for a game.
Come to think of it I would probably have an obj_teleport with an oversized sprite and collision mask. Never draw the sprite, but this object would be spawned at a random location when the user uses the teleport power up. On creation it would check for collisions and relocate if there is one, until there is no collision - then recreate the ship/player object there and destroy the obj_teleport object
I know this is an old comment but in case anyone is wondering: You can use the place_meeting() function to check if the space is safe before teleporting your spaceship.
i'd like to see a powerup that puts a shield around the ship, protecting it from a hit from an asteroid, if you make another one of these. maybe a lives system as well? i think another neat small touch would be to add a little engine flame sprite and/or sound effect to the ship when you're moving forward. i'm a beginner so i don't really know, but for the shield, i guess you'd create a sprite, and make it so that when the powerup variable is 3, it would create an instance of the shield around the ship, on a 10 second timer. add collision on the rock so that hitting the shield destroys it (or changes its direction of movement), removes the shield, and maybe gives the ship some s so the powerup doesnt feel janky.
Did you ever get the shield to work for this? I'm currently trying to get that made but can't get the shield object to stay with the player. Any help would be appreciated :)
@@DaWaffleH8ter Hi! I did this by adding this in the "Draw GUI" event for my obj_shield. You could probably just draw another sprite on top of the obj_player instead if you don't want the shield to be a separate object (but I don't know how) if (instance_number(obj_player) > 0) // this check is to see if the player is still alive since I both the ship and the shield sometimes colided with the rock, and then I died and then tried to access obj_player, if you make the player invinvible during power_up == 3 this won't be a problem. { x = obj_player.x - sprite_width / 2; y = obj_player.y - sprite_height / 2; }
For anyone else curious. To add a sprite on top of the player, instead of the entire object, add tis code to obj_player.Draw (not Draw GUI). You need to have a spr_shield2 sprite for it to work. if (powerup == 4) { draw_sprite(spr_shield2, -1, x, y); }
@@DaWaffleH8ter I actually just implemented this. I duplicated the obj_bullet collision event that was on the obj_rock. That way it works just like the projectile bullet but now it is a scaling in size ring. I referred. to this new circle object as obj_halo. On the obj_halo I have the following: Create event: image_xscale = 1; image_yscale = 1; Step event: image_xscale += .03; image_yscale += .03; x = obj_ship.x; y = obj_ship.y;
If you are having issues with the asset download, be sure that you right click + unzip the files after downloading. Then go to tools + import local package in Game Maker to select the images. :)
thank you so much. this tutorial helped out so mush. I love how you have both GML visual and code side by side. most other people doing tutorials do not do this.
I can't seem to get the sprites, and when I tried on the official website, the sprite download didn't seem like it was in the right format as it was something called YYMPS.
I had a similar problem, but in my case it looked like sometimes power ups were creating and sometimes weren't. What worked for me was cutting part of the code responsible for destroying rocks (all the if-else statement) and paste it at the end of the collision event.
Asset Download is broken. This XML file does not appear to have any style information associated with it. The document tree is shown below. AccessDenied Access Denied GRZJ7CD8VZAX8J4P gHuEffzOj7zj4gwzMYvvg9zpW2NvxFmiXuKrtXxmcr7zKtxZLOK/gfZptt22HUfJZlkpm62EvKo=
For powerup, I just get idea for spread shooting of 100 bullets or more/less. I test it with 5 and looks cool, but will be kind of same I guess, with 100 just like with 4. Just will have larger range. Maybe some kind of laser just like in Breakout game or maybe to add some lives?
how do you add the second power up as an additional option in GML code? im having the same problem. Edit: did some fiddling around and got it to work. the code should look like this for having both powerups spawning from rocks in the obj_rock collusion with obj_bullet section. hope this helps. if (obj_game.powerup_time < 0) { var _obj =choose(obj_powerup_spread, obj_powerup_ghost); instance_create_layer(x, y, "Instances", _obj); obj_game.powerup_time = 20; }
When I put in the code for the first power up and get into the game and pick it up it just starts shooting really fast for 10 seconds I don’t have to click anything please help
it appears to be a problem with the link of the assets, it says " AccessDenied Access Denied VQ27YXX01YZGPT0G dmaQJhpGDT6BKsM5fc4ubMJyF0CJsyc6ioNsNPS899vVIWSNkc4oFhlnpSucaHY3zL3gL+vAZa0= "
Hey, in the Step event you can add a simple condition: if (obj_game.points >= 1000) { image_blend = c_red; } In GML Visual, you can use an If Variable condition to make the same comparison, and then use Set Instance Colour to change its colour.
Can you please now make it that ou can die with lives and make a new level with enemies? There is a previous tutorial on it but its a very old one and it doesn't work. I like the one you've created with menus and wanna stick to it. Cheers
This no longer works: if (obj_game.powerup_time < 0) { var _obj = choose(obj_powerup_spread); instance_create_layer(x, y "Instances", _obj); obj_game.powerup_time = 20; } I haven't figured out a solution yet.
The asset download for this video does not work
Thanks for the tutorials! I had to rewind a fair bit for this one and your sound effects one because I had trouble keeping up, but I feel that's only because it's my second day working in GameMaker. But rewinding helped me a lot anyway as I started understanding different concepts better hearing them repeated again.
Glad it's working for you :). Have you worked in any other game engines before? We have a blog to help people get started if the are coming from Unity: gamemaker.io/en/tutorials/moving-from-unity-to-gamemaker
@@GameMakerEngine I'm just a QA in a studio that currently uses Unity, so I've never used it before myself, I just wanted to toy around with things and see what I could make. I used GameMaker for a class back in high school (2012ish) and it's a LOT different now than it was back then. Not in a bad way of course, I was pretty pleased seeing all the changes and improvements. Next I'll be trying out the Hero's Trail tutorial and try to customize it a lot more than I did with this one.
Keep up the good work!
@@GameMakerEngine please help me when i try to run the game it won't run and in the compile error tab it shows this --> Object: obj_powerup_spread Event: Create at line 12 : invalid token \
After this tutorial is there one to maybe at a 2nd player or anything else?
This is the final video we have in this tutorial series. If you go on GM's channel page you can see 2 playlists with stand-a-lone tutorials you can adapt them to add onto this game.
Then there are also interviews with Game Devs about how they made their game, life coaching sessions and stuff like that :).
ua-cam.com/channels/OvndqCF3iN2SksQDwR95wg.html
@@GameMakerEngine cheers
Want to make power-ups in your video game? Watch this tutorial to turn your frail spaceship into an invincible rock blaster.
Downloads:
* Assets: coal.gamemaker.io/sites/5d75794b3c84c70006700381/assets/649c22b24f6bf54116bb283e/Space_Rocks_Powerups_Sprites.zip
* Starting project (GML Visual): yoyo-www-cms.s3.amazonaws.com/sites/5d75794b3c84c70006700381/assets/649c2af44f6bf54116bb2849/SpaceRocks_GMLVisual.yyz
* Starting project (GML Code): yoyo-www-cms.s3.amazonaws.com/sites/5d75794b3c84c70006700381/assets/649c2af44f6bf54116bb2848/SpaceRocks_GMLCode.yyz
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
This should be pinned, also the link for assets in description is broken.
Thaks
The download link for the assets seems to be broken. Leads to a page only showing XML.
i too am seeing this @GameMakerEngine
Same happens to me too. 😥
Great tutorial. You can add a powerup that lets the player shoot bullets from behind
"Teleport" ship to a random location would be a common and fairly simple powerup to add - but how could one code a "teleport to safe location" to prevent the ship from coming out of hyperspace either in a rock or surrounded by rocks that will destroy it instantly?
Another good powerup is a shield - drawing a circle around the player ship and "bouncing" off of rocks instead of passing through them or exploding. Need to take into account a situation where rocks surround player ship so there is nowhere to bounce TO - bounce rocks away from player instead/as well?
It'd be interesting to see a shader being used to add "glow" to all the non-text elements in the game room, but that might be a bit beyond the scope of this particular tutorial series,
BTW, loving the new "Space Rocks" tutorials - the first one simply blew me away with how little effort is required to produce an actually playable foundation for a game.
Come to think of it I would probably have an obj_teleport with an oversized sprite and collision mask. Never draw the sprite, but this object would be spawned at a random location when the user uses the teleport power up. On creation it would check for collisions and relocate if there is one, until there is no collision - then recreate the ship/player object there and destroy the obj_teleport object
I know this is an old comment but in case anyone is wondering: You can use the place_meeting() function to check if the space is safe before teleporting your spaceship.
i'd like to see a powerup that puts a shield around the ship, protecting it from a hit from an asteroid, if you make another one of these. maybe a lives system as well?
i think another neat small touch would be to add a little engine flame sprite and/or sound effect to the ship when you're moving forward.
i'm a beginner so i don't really know, but for the shield, i guess you'd create a sprite, and make it so that when the powerup variable is 3, it would create an instance of the shield around the ship, on a 10 second timer. add collision on the rock so that hitting the shield destroys it (or changes its direction of movement), removes the shield, and maybe gives the ship some s so the powerup doesnt feel janky.
Sounds like a cool idea
Did you ever get the shield to work for this? I'm currently trying to get that made but can't get the shield object to stay with the player. Any help would be appreciated :)
@@DaWaffleH8ter
Hi! I did this by adding this in the "Draw GUI" event for my obj_shield. You could probably just draw another sprite on top of the obj_player instead if you don't want the shield to be a separate object (but I don't know how)
if (instance_number(obj_player) > 0) // this check is to see if the player is still alive since I both the ship and the shield sometimes colided with the rock, and then I died and then tried to access obj_player, if you make the player invinvible during power_up == 3 this won't be a problem.
{
x = obj_player.x - sprite_width / 2;
y = obj_player.y - sprite_height / 2;
}
For anyone else curious. To add a sprite on top of the player, instead of the entire object, add tis code to obj_player.Draw (not Draw GUI).
You need to have a spr_shield2 sprite for it to work.
if (powerup == 4)
{
draw_sprite(spr_shield2, -1, x, y);
}
@@DaWaffleH8ter I actually just implemented this.
I duplicated the obj_bullet collision event that was on the obj_rock. That way it works just like the projectile bullet but now it is a scaling in size ring.
I referred. to this new circle object as obj_halo.
On the obj_halo I have the following:
Create event:
image_xscale = 1;
image_yscale = 1;
Step event:
image_xscale += .03;
image_yscale += .03;
x = obj_ship.x;
y = obj_ship.y;
If you are having issues with the asset download, be sure that you right click + unzip the files after downloading. Then go to tools + import local package in Game Maker to select the images. :)
Thanks that saves me. :)
Add a thrust to it for the ship but using rings like it is magnetic. also i don't remember engine sounds but asteroids has one.
Thanks for the tutorials. and the link did not work but it more fun to make one. so it make it fun
thank you so much. this tutorial helped out so mush. I love how you have both GML visual and code side by side. most other people doing tutorials do not do this.
my favorite part of this tutorial was the confirmation of the existance of delta_time.
I had some trouble downloading the sprites.
So I used a picture of jam for spread and me doing a funny face for the invincibility sprite.
Loving these videos!!
I can't seem to get the sprites, and when I tried on the official website, the sprite download didn't seem like it was in the right format as it was something called YYMPS.
Please help me quickly.
yymps is a format that GameMaker Studio accepts. In fact, it's a format that *only* GameMaker Studio accepts.
@@meghnaadvijayakar178 YYMPS is the right format now you need to drag and drop it into gamemaker and then import all
I feel like I followed everything pretty well however after 10 seconds has passed or longer the power up still doesn’t appear!
I had a similar problem, but in my case it looked like sometimes power ups were creating and sometimes weren't. What worked for me was cutting part of the code responsible for destroying rocks (all the if-else statement) and paste it at the end of the collision event.
@@radekaszek1048 Can confirm, this is due to the order - Using the visual code I just Cut+Pasted it at the bottom at then it worked
Next part = How to add Hp to rocks, to ship and implement a pause menu :)))
To add hp make a variable that decreases each time the rock is shot, then once the variable is equal to 0, destroy it.
Asset Download is broken.
This XML file does not appear to have any style information associated with it. The document tree is shown below.
AccessDenied
Access Denied
GRZJ7CD8VZAX8J4P
gHuEffzOj7zj4gwzMYvvg9zpW2NvxFmiXuKrtXxmcr7zKtxZLOK/gfZptt22HUfJZlkpm62EvKo=
the download for actives does not work
For powerup, I just get idea for spread shooting of 100 bullets or more/less. I test it with 5 and looks cool, but will be kind of same I guess, with 100 just like with 4. Just will have larger range. Maybe some kind of laser just like in Breakout game or maybe to add some lives?
assets link down or something , great videos btw
so thanks a lot because u helped me to do what i dreamt for
For some reason even though it seems all the code is exact it wont spawn in the power ups randomly (using gml code)
I am also running into this issue!
how do you add the second power up as an additional option in GML code? im having the same problem.
Edit: did some fiddling around and got it to work. the code should look like this for having both powerups spawning from rocks in the obj_rock collusion with obj_bullet section. hope this helps.
if (obj_game.powerup_time < 0)
{
var _obj =choose(obj_powerup_spread, obj_powerup_ghost);
instance_create_layer(x, y, "Instances", _obj);
obj_game.powerup_time = 20;
}
@@masterrocket31 Thanks for this
How do I make it so it chooses between the spread and the ghost?
Hey, the sprites for this series of Tutorials are not available anymore. The links are broken. Could you check the links?
Sprites are not on available on the site for download.
Love the tutorial though!
Yeah, access denied so I ended up making my own sprits in the engine myself :)
This XML file does not appear to have any style information associated with it. The document tree is shown below.
When I put in the code for the first power up and get into the game and pick it up it just starts shooting really fast for 10 seconds I don’t have to click anything please help
you have the { bracket somewhere in that code that doesn't have a } to match with it, so just delete the { open one and it should work!
it appears to be a problem with the link of the assets, it says "
AccessDenied
Access Denied
VQ27YXX01YZGPT0G
dmaQJhpGDT6BKsM5fc4ubMJyF0CJsyc6ioNsNPS899vVIWSNkc4oFhlnpSucaHY3zL3gL+vAZa0=
"
This was great! I must have made some weird error though because my timer is only on until I collect a powerup, and then it turns off.
excelente tutorial, excelente professor, documentei todo o jogo no meu caderno e agora vou treinar
My power-ups spawn every time a rock is destroyed, and only changed the colour of the ship and add the timer. They don't actually work as expected.
I had to assign variable powerup_time in obj_game step event to powerup_time - delta_time / 1000000 instead of just - delta_time / 1000000
hey i want to change the colour of sprite with the use of points like after 1000 points the ship turns red or purple how to do that
Hey, in the Step event you can add a simple condition:
if (obj_game.points >= 1000)
{
image_blend = c_red;
}
In GML Visual, you can use an If Variable condition to make the same comparison, and then use Set Instance Colour to change its colour.
i have a weird error at dowloading assets
The assets won't import for this and the sound assets form the other tutorial don't even download
They are working for others, maybe try a different browser and clear cookies etc
How i can add new enemies
assets aint working
Hey may i ask what font do you use
Asset link not valid
how i can add a ingameshop?
A step in this direction could be our inventory tutorial: ua-cam.com/video/3FGMKQ_8bIc/v-deo.html
@@GameMakerEngine i work with Visual
asset link brooken
AccessDenied for Assets file :(
Me too
thank you
Can you please now make it that ou can die with lives and make a new level with enemies? There is a previous tutorial on it but its a very old one and it doesn't work. I like the one you've created with menus and wanna stick to it.
Cheers
Thx but i don't know why i feel old game maker feel easier
This GameMaker has more options to add, and kind of easier to import materials in it. The old one could be kind of easier but limited.
Why am I pinned?
First
You said, I testify that there is no God but Allah alone; He has no partners.
This no longer works:
if (obj_game.powerup_time < 0)
{
var _obj = choose(obj_powerup_spread);
instance_create_layer(x, y "Instances", _obj);
obj_game.powerup_time = 20;
}
I haven't figured out a solution yet.
Well, I used the code from the video even today and everything works for me. Maybe check to see if you made any mistakes earlier?
Nice video, I enjoyed the tutorial. May I have your email address please so that I inbox you. Thanks
the asset link is broken