Just working on fine tuning some stuff for mah game. Gotta say man. You just come off as incredibly chill and kind. Not to mention, your videos are so succinct and informative. I really hope the best for you. I'm feeling a big wave of appreciation as I finish watching this and head over to your other video on surfaces. Thanks for all your help!
My surfaces weren't drawing at all but I just used your script to check if they're active and they're working. Thank you so much! Almost makes the last 6 hours beating my head against a wall not so bad...
Important to note that surface will always excist in 0, 0 coordinate (the top left corner of the surface is there). You can draw the surface anywhere, but the surface will always be at 0, 0. So to draw something on to that surface you often have to move it first (or make it draw it's sprite there)
This is fantastic! I would love to see a follow up if you can show how to create sprites and animate them from surfaces. That’s something I’ve been banging my head on a wall trying to figure out for a few weeks now
So I assume you could also draw a complete 3D camera to a surface too, right? If so, that may make the idea I had for 3D portals work a bit easier too... Ooh, I also took place in my first game jam (my username was picked before I knew what a game jam was XD) with a partner recently. There were some pretty bad bugs in the version we released, although we did make a pretty decent game. In my opinion, what we made in a week is better than one of my earlier games that took over 2 months to make.
I forget if I was having this conversation with you or someone else somewhere else, drawing a 3D camera onto a surface is definitely an option - though you might have to draw_clear_alpha first in order for anything to be visible.
I'm not sure why, but using window_ mouse_get would draw the line next to my mouse instead of on it. I switch to simply mouse_x and mouse_y and it draws exactly where my mouse is.
Yo, you deserve alot more subs. Like, you have no dislikes on this entire video. Also, yo-yo games says "It is highly recommended that all surfaces be created with a size that is a power of 2, ie: 16, 128, 512 or 1024 pixels in size". Is it safe to make one 1080 or will it destroy my users device?
It's okay to make surfaces other sizes for normal drawing, it's mostly when you try to use them as a texture that you might run into issues with non-power-of-two surface dimensions, since GameMaker's internal texture pages (currently) are constrained to that size.
What's the point of using window_mouse_get_x instead of mouse_x? I just checked the documentation and mouse_x is the position in the room and window_mouse_get_x is the position in the window. Does it change anything? I think maybe it would be important when using cameras but I'm not really sure. Could you give me good examples when to use one over the other and why? I love your channel. You're making quality content on GameMaker there. Keep it up.
If you're using views, mouse_x and y will still return the position of the mouse in the room - which won't necessarily have 0, 0 be in the upper-left of the window. Outside of 3D, if you want to use the mouse for UI things like clicking buttons or something, you should use the window functions; if you want to use the mouse for gameplay things like clicking on an NPC or a monster, you usually want mouse_x and y.
Unrelated to your video, but I see you have Tiled on your taskbar. Why are you using Tiled when gamemaker has this kind of tilemap painting function already built in?
Does every pixel of a surface comes fully transparent by default? I'm surprised the surface isn't showing as a black(?) rectangle without doing anything.
Yeah, when first created surfaces are essentially just a section in video memory full of zeros. Using draw_clear or draw_clear_alpha is useful for initializing a surface to a color.
@@DragoniteSpam I don't understand. From the documentation: manual.yoyogames.com/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_create.htm "When the surface is first created, it may contain "noise" as basically it is just an area of memory that is put aside for the purpose (and that memory may still contain information)" So how come it is transparent?
@@jaysanprogramming6818 Apparently if the section of memory that was allocated for the surface previously contained data it may not be cleared when you create a new surface, but I've never actually seen it happen. It may be more likely to happen on integrated graphics or on a system that doesn't have a lot of video memory, like a mobile phone. Under most conditions it'll be black and fully transparent. You can check surfaces in the debugger to see what's on them when you create them.
@@DragoniteSpam OK, so for maximum compatibility it would be wise to make it fully transparent manually then? (with draw_clear_alpha(c_black, 0); I guess)
It can be done. Use the Function Call D&D to input the lines of code. Set the first line in the Function box, then the ( ) in the argument box. Example: Function: draw_circle Argument: mouse_x, mouse_y ,8 ,false
Thanks so much for this. I'm finally venturing into surfaces to create shadows, and this tutorial was perfect :)
Just working on fine tuning some stuff for mah game. Gotta say man. You just come off as incredibly chill and kind. Not to mention, your videos are so succinct and informative. I really hope the best for you. I'm feeling a big wave of appreciation as I finish watching this and head over to your other video on surfaces. Thanks for all your help!
My surfaces weren't drawing at all but I just used your script to check if they're active and they're working. Thank you so much! Almost makes the last 6 hours beating my head against a wall not so bad...
Important to note that surface will always excist in 0, 0 coordinate (the top left corner of the surface is there). You can draw the surface anywhere, but the surface will always be at 0, 0. So to draw something on to that surface you often have to move it first (or make it draw it's sprite there)
Unless you draw it in a draw_gui event, in which case the x and y values in draw_surface will be relative to the window!
Thanks for this, it's really interesting
Excellent work with these videos! Surfaces are a great topic
This is fantastic! I would love to see a follow up if you can show how to create sprites and animate them from surfaces. That’s something I’ve been banging my head on a wall trying to figure out for a few weeks now
Wasn't planning on that, but it sounds like it might be interesting. I'll write it down as a future video idea!
So I assume you could also draw a complete 3D camera to a surface too, right? If so, that may make the idea I had for 3D portals work a bit easier too...
Ooh, I also took place in my first game jam (my username was picked before I knew what a game jam was XD) with a partner recently. There were some pretty bad bugs in the version we released, although we did make a pretty decent game. In my opinion, what we made in a week is better than one of my earlier games that took over 2 months to make.
I forget if I was having this conversation with you or someone else somewhere else, drawing a 3D camera onto a surface is definitely an option - though you might have to draw_clear_alpha first in order for anything to be visible.
@@DragoniteSpam We were talking at least a few weeks, if not months ago about non-euclidean space and portals in 3D, yeah.
I'm not sure why, but using window_ mouse_get would draw the line next to my mouse instead of on it. I switch to simply mouse_x and mouse_y and it draws exactly where my mouse is.
Yo, you deserve alot more subs. Like, you have no dislikes on this entire video. Also, yo-yo games says "It is highly recommended that all surfaces be created with a size that is a power of 2, ie: 16, 128, 512 or 1024 pixels in size". Is it safe to make one 1080 or will it destroy my users device?
It's okay to make surfaces other sizes for normal drawing, it's mostly when you try to use them as a texture that you might run into issues with non-power-of-two surface dimensions, since GameMaker's internal texture pages (currently) are constrained to that size.
What's the point of using window_mouse_get_x instead of mouse_x?
I just checked the documentation and mouse_x is the position in the room and window_mouse_get_x is the position in the window. Does it change anything? I think maybe it would be important when using cameras but I'm not really sure. Could you give me good examples when to use one over the other and why?
I love your channel. You're making quality content on GameMaker there. Keep it up.
If you're using views, mouse_x and y will still return the position of the mouse in the room - which won't necessarily have 0, 0 be in the upper-left of the window. Outside of 3D, if you want to use the mouse for UI things like clicking buttons or something, you should use the window functions; if you want to use the mouse for gameplay things like clicking on an NPC or a monster, you usually want mouse_x and y.
Hey Michael. Is it possible to use surface draw copy but exclude a layer?
14:30 would've been a good end lmao
new goal: end every video by crashing my computer
That would've been funny
Unrelated to your video, but I see you have Tiled on your taskbar. Why are you using Tiled when gamemaker has this kind of tilemap painting function already built in?
tiled also does a bunch of stuff that gm doesn't do very well
Does every pixel of a surface comes fully transparent by default? I'm surprised the surface isn't showing as a black(?) rectangle without doing anything.
Yeah, when first created surfaces are essentially just a section in video memory full of zeros. Using draw_clear or draw_clear_alpha is useful for initializing a surface to a color.
@@DragoniteSpam I don't understand. From the documentation:
manual.yoyogames.com/GameMaker_Language/GML_Reference/Drawing/Surfaces/surface_create.htm
"When the surface is first created, it may contain "noise" as basically it is just an area of memory that is put aside for the purpose (and that memory may still contain information)"
So how come it is transparent?
@@jaysanprogramming6818 Apparently if the section of memory that was allocated for the surface previously contained data it may not be cleared when you create a new surface, but I've never actually seen it happen. It may be more likely to happen on integrated graphics or on a system that doesn't have a lot of video memory, like a mobile phone.
Under most conditions it'll be black and fully transparent. You can check surfaces in the debugger to see what's on them when you create them.
@@DragoniteSpam OK, so for maximum compatibility it would be wise to make it fully transparent manually then? (with draw_clear_alpha(c_black, 0); I guess)
@@jaysanprogramming6818 Probably.
TOP!
how to place two surfaces near each other and draw on both ?
At the same time? You can target multiple surfaces to draw onto with HLSL shaders.
Can this be done in D&D?
nope
It can be done. Use the Function Call D&D to input the lines of code. Set the first line in the Function box, then the ( ) in the argument box. Example: Function: draw_circle Argument: mouse_x, mouse_y ,8 ,false