UPDATE: A change was made in GMS2 that fixes the bug I was apparently relying on. I thought it was weird that I only needed to increase the height of the sensor sprite... now you need to increase both. The GMS2 project file has been updated with a 60x60 sprite, and the included script has been updated as well. Additionally, there is a specific mask type for this now. So instead of using precise, use the rotated rectangle mask type.
Really like your content , been finding your tutorials invaluable: your topics are specific but applicable and in depth but manageable. Wish you all the best in your endeavors!
This is FREAKIN AWESOME. And I'm totally gonna test out having a thousand lasers on screen at once lol. Quick note though! I downloaded the example project and I noticed that in the script it uses argument[0], argument[1], etc., but I actually prefer using argument0, argument1, etc., in this case since the arguments are all mandatory. If you use the brackets and forget to enter any arguments, GMS won't tell you until you try to run your game and get an error. Of course this is a matter of preference, especially if you get annoyed by GMS reminding you about missing script arguments. But just for anyone who may not know. Anyway welcome back to youtube pope :D
oh that movement controls helped a lot i wasnt looking for them when i came here but appreciated man :D i started 2 days ago to gms2 after leaving unity. that was so complicated for my first game :D thanks a lot for tutorials.
Great tutorial see it more than one time , you are so different than the other on RUclips you safe me every time I am struggle with something or cannot figure how It done , I am Bretty sure you are an expert not just in game maker but as computer scientist and programmer Thanks for sharing your knowledge with Us . ^_^
The more point_direction, point_distance, lengthdir_X and lengthdir_Y I use the more I need to understand trigonometry and the return value they... return. I would pay for some classes related to maths (even if I checked some free youtube channels, I do value your expertise) Thanks for the video :D
Shaun Spalding has a great vid on lengthdir_x and lengthdir_y (it's super short, too) so check that out. But, yeah, point direction and point_distance is just pure trig/algebra. Honestly, I just know how to use it. I've forgotten most of high school math. I sorta wish my teacher had said "Okay, class, pay attention. This lesson will be very important in game development" XD
I have a tricky problem - GTA1 or 2 style top-down car that has rectangle collision mask. Everything goes good as long I'm not colliding with solid object AND turning at the same time. I have my own "movement physics" translating car angle, speed, momentum and stuff into hspd and vspd (so no using built in speed and direction and I could use traditional collision check), but rotation freezes while loop since it doesn't have hspd or vspd to reduce but collision mask is colliding. Replaying GTA2 shows how amazing collision it has - car is sliding against the wall and straightens to movement direction.
Hmm... Because rotation is a factor, you can't just ignore it when doing collision checking. You'll need to rotate the object left and right to see if it can escape any walls it may be colliding with. RUclips isn't the greatest platform for code troubleshooting. You should join my Gamemaker Discord Server. Even if I'm not there to help you personally, certainly someone will be able to help you figure this out and get it working the way you need. Here's an invite link: discord.gg/8mHW8t
@PussyDestroyerThis isn't the best forum for asking coding questions. I recommend you join my discord server! Lots of people there who can answer pretty much any programming question you might have (and if I'm available I'll help personally). Join Here: discord.gg/By6u9pC
Can the rectangle collision sensor be set to scale its length based on collisions? Like if a laser collided with a wall and stopped at that precise collision point instead of overlapping?
The sensor itself, probably not... at least not easily. But you could use this collision line to determine how long it could be by using a binary search tree and rechecking the collision until you find the exact length.
Uhh. It's the same thing in GMS1, but only works for Windows. docs.yoyogames.com/source/dadiospice/002_reference/file%20handling/file%20system/get_save_filename.html
I mean, sure? An update in GMS2 added a rotated rectangle collision mask type that you could always use for platforms. The real trick would be in the collision detection side of things.
Thats pretty helpful with my lazers. except,how would you make a lazer that does not have an end point? like in no time to explain, the lazer would stop at a wall or something. In my case, there are several lazer turrets in a room that are shooting at me. also for another tutorial subject, making AI? or pathfinding?
Well, "infinity" is a scary concept, but I'll assume you mean "very long range". Give it a length of 10000 or whatever, something that will guarantee it will be off your screen if unblocked. You can then check for collisions with something, and while you are colliding, reduce the length until you aren't. Doing that with just a while loop could be a little slow... so you'll need to do some optimizations from then, but the concept is pretty basic.
If you make it 1x1 then the origin of that sprite is in the top left corner. That means all scaling and rotating happens around that corner which is not really useful for cases like this.
Not really. That's a bit specific for the type of tutorials I like to do: but the basic concept would be to use a finite state machine that can target an object and "lift it", and while in the "carried" state, you could press another button to throw it. It would be up to the bomb object to know when to explode and deal damage. Or if it was a pot it would need to know it hit the ground and should shatter and spawn a rupee or a heart.
Hello. I was wondering if you understood what an indie developer would do after such a developer had a game or a demo of a game completed to publish the game. I feel like it's more than uploading a file to a digital distribution site like Steam besides spreading the word about the game.
Sorry, that's not really a topic I've got much knowledge on. Never actually "published" a game beyond a simple Android app. It might be a good question for the guys on the GameDev subreddit.
Discord! discord.gg/vwqQxfP Not sure how many more videos I'll be making in the future... planning on doing an update vid of sorts, but just haven't had the time lately.
UPDATE:
A change was made in GMS2 that fixes the bug I was apparently relying on. I thought it was weird that I only needed to increase the height of the sensor sprite... now you need to increase both. The GMS2 project file has been updated with a 60x60 sprite, and the included script has been updated as well.
Additionally, there is a specific mask type for this now. So instead of using precise, use the rotated rectangle mask type.
Now if only there was a way to visualize rotated rect collision masks.
Really like your content , been finding your tutorials invaluable: your topics are specific but applicable and in depth but manageable. Wish you all the best in your endeavors!
Thank you! I always try to keep things generic and applicable to as many different types of projects as possible. Thanks for watching!
You are the best, man.
Please come back soon :'( .
This is FREAKIN AWESOME. And I'm totally gonna test out having a thousand lasers on screen at once lol. Quick note though! I downloaded the example project and I noticed that in the script it uses argument[0], argument[1], etc., but I actually prefer using argument0, argument1, etc., in this case since the arguments are all mandatory. If you use the brackets and forget to enter any arguments, GMS won't tell you until you try to run your game and get an error. Of course this is a matter of preference, especially if you get annoyed by GMS reminding you about missing script arguments. But just for anyone who may not know. Anyway welcome back to youtube pope :D
Thanks, still works great! Had some wider curved conveyor belts I used it on.
oh that movement controls helped a lot i wasnt looking for them when i came here but appreciated man :D i started 2 days ago to gms2 after leaving unity. that was so complicated for my first game :D thanks a lot for tutorials.
Great tutorial see it more than one time , you are so different than the other on RUclips you safe me every time I am struggle with something or cannot figure how It done , I am Bretty sure you are an expert not just in game maker but as computer scientist and programmer Thanks for sharing your knowledge with Us . ^_^
Where have you gone? :(
The more point_direction, point_distance, lengthdir_X and lengthdir_Y I use the more I need to understand trigonometry and the return value they... return.
I would pay for some classes related to maths (even if I checked some free youtube channels, I do value your expertise)
Thanks for the video :D
Shaun Spalding has a great vid on lengthdir_x and lengthdir_y (it's super short, too) so check that out. But, yeah, point direction and point_distance is just pure trig/algebra. Honestly, I just know how to use it. I've forgotten most of high school math. I sorta wish my teacher had said "Okay, class, pay attention. This lesson will be very important in game development" XD
Good tutorial, also gm studio 2 looks so nice.
It's pretty cool. Still getting used to it, but I'm excited for the future of GM!
Wonderful!
*asking for more*
Thanks! Working on it!
like every time you surprise me .
thank you so much !!! eres increible espero ver mas en GM1.4 please , please yes yes ....
I have a tricky problem - GTA1 or 2 style top-down car that has rectangle collision mask. Everything goes good as long I'm not colliding with solid object AND turning at the same time.
I have my own "movement physics" translating car angle, speed, momentum and stuff into hspd and vspd (so no using built in speed and direction and I could use traditional collision check), but rotation freezes while loop since it doesn't have hspd or vspd to reduce but collision mask is colliding.
Replaying GTA2 shows how amazing collision it has - car is sliding against the wall and straightens to movement direction.
Hmm... Because rotation is a factor, you can't just ignore it when doing collision checking. You'll need to rotate the object left and right to see if it can escape any walls it may be colliding with. RUclips isn't the greatest platform for code troubleshooting. You should join my Gamemaker Discord Server. Even if I'm not there to help you personally, certainly someone will be able to help you figure this out and get it working the way you need. Here's an invite link: discord.gg/8mHW8t
@PussyDestroyerThis isn't the best forum for asking coding questions. I recommend you join my discord server! Lots of people there who can answer pretty much any programming question you might have (and if I'm available I'll help personally). Join Here:
discord.gg/By6u9pC
Can the rectangle collision sensor be set to scale its length based on collisions? Like if a laser collided with a wall and stopped at that precise collision point instead of overlapping?
The sensor itself, probably not... at least not easily. But you could use this collision line to determine how long it could be by using a binary search tree and rechecking the collision until you find the exact length.
@@PixelatedPope okay thank you
Super helpful, thank you!
dude... great content! please keep it up!
Is there a DLL for GMS1 for the function get_save_filename and load?
Uhh. It's the same thing in GMS1, but only works for Windows.
docs.yoyogames.com/source/dadiospice/002_reference/file%20handling/file%20system/get_save_filename.html
+PixelatedPope Thanks for replying everything works.
I wonder could this be used for Ramps or moving objects ( like floating angled platforms)
I mean, sure? An update in GMS2 added a rotated rectangle collision mask type that you could always use for platforms. The real trick would be in the collision detection side of things.
Thats pretty helpful with my lazers. except,how would you make a lazer that does not have an end point? like in no time to explain, the lazer would stop at a wall or something.
In my case, there are several lazer turrets in a room that are shooting at me.
also for another tutorial subject, making AI? or pathfinding?
Well, "infinity" is a scary concept, but I'll assume you mean "very long range". Give it a length of 10000 or whatever, something that will guarantee it will be off your screen if unblocked. You can then check for collisions with something, and while you are colliding, reduce the length until you aren't. Doing that with just a while loop could be a little slow... so you'll need to do some optimizations from then, but the concept is pretty basic.
I've been thinking about doing a topic on AI state machines and I may touch on path finding in that. Thanks for watching!
why dont you just make the collision sprite 1x1 pixels, it would get rid of a lot of problems wouldnt it?
If you make it 1x1 then the origin of that sprite is in the top left corner. That means all scaling and rotating happens around that corner which is not really useful for cases like this.
Download the example project and try it :D
Do you have a video/code for lifting up objects(bombs) like in Zelda? To throw items that do damage.
Not really. That's a bit specific for the type of tutorials I like to do: but the basic concept would be to use a finite state machine that can target an object and "lift it", and while in the "carried" state, you could press another button to throw it. It would be up to the bomb object to know when to explode and deal damage. Or if it was a pot it would need to know it hit the ground and should shatter and spawn a rupee or a heart.
PixelatedPope
lol I had to try. Thanks for replying. What if I wanted to pick up items and throw to do damage like a rock?
Same thing. If it's not the same thing, you've done it wrong.
PixelatedPope do you have any videos you recommend I watch on this subject? I appreciate the feedback.
Finite state machines?
ruclips.net/video/-0bckaBj__M/видео.html
ruclips.net/video/c3Yp7ZF4rQ0/видео.html
Hello. I was wondering if you understood what an indie developer would do after such a developer had a game or a demo of a game completed to publish the game. I feel like it's more than uploading a file to a digital distribution site like Steam besides spreading the word about the game.
Sorry, that's not really a topic I've got much knowledge on. Never actually "published" a game beyond a simple Android app. It might be a good question for the guys on the GameDev subreddit.
Oh okay thank you anyways.
Where did he go?
Discord! discord.gg/vwqQxfP
Not sure how many more videos I'll be making in the future... planning on doing an update vid of sorts, but just haven't had the time lately.
okay just wondering, ur one of my favorite game making channels and I was wondering if u were okay
Please pin ball tutorial or at least the flippers or paddles or whatever you want to call them
More like BROtated rectangle collisions