I've been binging many of your visual effects, and surface tutorials today. Really like your presentation, and quick to the point attitude. Keep up the great work!
@1upIndie2 жыл бұрын
Thanks, always glad to hear my stuff has some use for you guys.
@fierorecensione5828 Жыл бұрын
Love that video!!!
@1upIndie Жыл бұрын
Thanks for watching it!
@MRAMNESIA82 жыл бұрын
I may be too late to the party, but I'm wondering if you have a video that showcases how you make those bullet shells fly backwards like that? I am in the process of learning surfaces and similar, and I want to achieve a similar bullet shell effect you have in this video, I.e. they fly backwards :)
@1upIndie2 жыл бұрын
Well, you mean the parabolic flying arch? You can achieve this twofold 1. Use the inbuild speed, gravity and gravity direction variables and set them in the shot. Just play around with those numbers until they fit your game speed = -4; gravity = 0.04; // extra force pulling in the gravity_direction gravity_directon = 270; // downwards kzbin.info/www/bejne/jZXEkpKAbteqn68 2. Or code all the values by your self. I did a video with grenades but the movement is the same: kzbin.info/www/bejne/kKm3aX6poJyGa7c Was that helpful?
@MRAMNESIA82 жыл бұрын
@@1upIndie Very!! thanks buddy
@fierorecensione5828 Жыл бұрын
Hello how are you? If i want to make more performant the surface what i have to put instead of room_width and room_height?
@1upIndie Жыл бұрын
I would only use the surface where the camera is (showing the player). So you could have the surface dimension for example on a sidescroller only on the playable (visible area) or refresh the surface from time to time to the dimensions of the camera values (x,y, width and height) and give it a bif of "buffer" around these values so that if you move with the player too fast that you see odd things. Hope that helps
@fierorecensione5828 Жыл бұрын
Ohh i see, i would like to see something about, maybe a little video or a little know how for making this in the right way@@1upIndie
@magicalforest37412 жыл бұрын
Shouldn't you only create surfaces in the draw event? Because if you create a surface in the Create Event of an instance, you could potentially get the same index as the application_surface.
@1upIndie2 жыл бұрын
Well, most tutorials don't initalize it in the create event and set the variable holding the surface to -1. So technically it is best practise to do all the surface code in the draw event. I am not sure though how you could get the application surface by a chance. You got any resource/link for me to research this claim?
@magicalforest37412 жыл бұрын
@@1upIndie Yes, sure, it's described in the GameMaker Manual. You can find it by \\GameMaker Manual Index\GameMaker Languag\GML Code\GML Code Reference\Drawing\Surfaces (read the third point of it)
@kokorogames613 жыл бұрын
This is helpful. Thank you! Do you think that if the room is really huge it could be a problem?
@1upIndie3 жыл бұрын
Well, hoooow big are we talking about :D ? If you have one 18000x180000 room and you have a surface with the same size.... yeah, that could be an issue. But normally that shouldn't be.
@kokorogames613 жыл бұрын
@@1upIndie well, I m building systems one by one to make some kind of rpg and I m not at the world system yet.. But I had an idea of making a system that would allow for pretty big worlds, and I m thinking of how to do it to be ok with performance, and also put decals on a surface that would stay there
@Corilo914 жыл бұрын
I'm just starting to experiment with surfaces and I'm already stuck. I have disabled the application_surface_draw in order to draw everything manually, I draw the layers with draw_tilemap, alternating between two surfaces, applying shaders, and everything work EXCEPT the instance layers. I know I'm dumb, the solution is probably extremely easy, but I'm completely stuck. :/
@1upIndie4 жыл бұрын
Hm, not sure how to help you here. Disabling the application surface is kinda, ... unorthodox (used for mobile). Why would you do that in the first place. The applicaiton surface is the endresult of everything being drawn (on screen), so you kinda need that.
@Corilo914 жыл бұрын
@@1upIndie I need to apply a shader to background layer. The layer_shader method applies the shaders to each tiles individually, creating an ugly effect. I want the shader to operate on the layer as a whole, so I had to draw the layer on a surface and draw it with the shader. Because the background is, well, in the back, I needed the surface to draw behind other layers and I could think only of disabling application_surface_draw_enable and draw each layer manually. Can you suggest me a better solution?
@1upIndie4 жыл бұрын
@@Corilo91 Hm., in that regard I am not sure how to help you. I assume you are refering to this: forum.yoyogames.com/index.php?threads/shader-on-tile-layer.34732/
@Corilo914 жыл бұрын
@@1upIndie Yeah, that's exactly what I was looking for! It seems that for now I'll really have to go with this extremely tedious method... It's a shame such a basic thing requires so much work! :/
@1upIndie4 жыл бұрын
@@Corilo91Hm, well at least this helped you out. So, I guess win win.
@twomack335 жыл бұрын
Could you just draw to the surface in the Destroy event? Great video by the way, thanks!
@1upIndie5 жыл бұрын
Uff, to beh honest, that actually works aswell. I just tried it now. But that is not advisable, try to do all the draw things in the draw event. Gamemaker allows you to do the draws even in other events, like in the create, step and so on. But from experience, sometimes they didn't show at all. So, if you want to be save, prefer to use the draw event for all drawing related things.
@danb92385 жыл бұрын
It is a pity that the video was not full of bullet code)). now I sit and think how to write the twist in the sleeve randomly arc of flight of shells and the like... :C But still, thanks for the video
@1upIndie5 жыл бұрын
Well, the arch movement of the bullets I have covered in my grenade video: kzbin.info/www/bejne/kKm3aX6poJyGa7c Hope that helps.
@ifeelverydead91805 жыл бұрын
Adding paint maker in game's would be nice
@jaysanprogramming68185 жыл бұрын
Why not use: if (surface_exists(o_surface.surface)) { ... } else { ... } instead of checking two opposite conditions in two if statements?
@1upIndie5 жыл бұрын
Well, this is coding. You can achieve the same stuff in multiple ways. I don't do all the time "clean" coding, because I don't see the need for it in easy tutorials. In a larger projects I handle this issues of course different.
@jaysanprogramming68185 жыл бұрын
@@1upIndie Well, I see your point but would it not be better to teach people good practices from the start?
@ignaciosb87794 жыл бұрын
Nice example with the bullets to teach surfaces. I was just coming from reading about this in the yoyo docs.
@ignaciosb87793 жыл бұрын
@Mamie Deblasio No. I don't care. I also don't have ig. Mamie Deblasio is you. Noel cody is also you. There are multiple reasons how I know that but I won't tell. You are very bad at trying to fool somebody. Greetings.
@embodyingocean1894 жыл бұрын
hey man, my game is now running on way lower fps than it used to. 700 average. could it be because i've set the surface variable to be global? I don't think so, what else could it be?
@1upIndie4 жыл бұрын
Sorry mate, I have no idea how to help you with that.
@embodyingocean1894 жыл бұрын
@@1upIndie I think it's the width of it. and maybe because I'm using 1.4
@embodyingocean1894 жыл бұрын
@@1upIndie thanks for replying
@1upIndie4 жыл бұрын
@@embodyingocean189 Well, 700 fps is still okay. An average "full" game runs about 600-1000 with tons of stuff going on. Hm, maybe your surface is quite big.