3D Effect (Parallax) in GameMaker | Top-Down Parallax with Shaders

  Рет қаралды 17,344

GameMakerStation - Matharoo

GameMakerStation - Matharoo

Күн бұрын

Пікірлер: 68
@GameMakerStation
@GameMakerStation 4 жыл бұрын
Thanks for watching! If you use this effect in a project, you can tweet at me, *@itsmatharoo* -- looking forward to seeing your games!
@ORTmusic
@ORTmusic 4 жыл бұрын
You've become my fav GMS channel
@GameMakerStation
@GameMakerStation 4 жыл бұрын
Thank you Connor 😄
@alexferri9973
@alexferri9973 4 жыл бұрын
Shaders always scare me a little bit, but that is super clear and well explained. Good job Mataharoo 💪🏼
@fishouttawatermemes7065
@fishouttawatermemes7065 4 жыл бұрын
I was honestly surprised u don't have more subs, dude ur gonna be big!
@macehilmatecilof4140
@macehilmatecilof4140 4 жыл бұрын
This is so cool, I'm going to have to play around with this. I think it would be cool to layer images of leaves to create a more 3d looking tree. Have the tree object create 3 or 4 more objects on top of it but a few pixels lower to each other with nothing but leaves with the same shader. Bang-bang-boom, you got a 3d tree.
@jamayetuddinahmed3713
@jamayetuddinahmed3713 4 жыл бұрын
Really great tutorial and you other tutorials are also great. So far you are one of the best tutorial creator for GMS.
@posseslayer280
@posseslayer280 4 жыл бұрын
Besides being very smart and charismatic, you are awesome at teaching
@chooby4405
@chooby4405 4 жыл бұрын
I love the intro
@leonardocolares5810
@leonardocolares5810 4 ай бұрын
Dude, you are the best!!
@willm127
@willm127 4 жыл бұрын
That intro 😂
@spiritblue5139
@spiritblue5139 4 жыл бұрын
FINALLY. I saw your post on reddit and was waiting for it :D
@prowokator
@prowokator 4 жыл бұрын
I'm so glad I found your channels! Superb quality content!
@JustFredrik
@JustFredrik 4 жыл бұрын
This video is REALLY solid Matharoo! Really good job! Very structured and detailed! :D
@scottrim7216
@scottrim7216 Ай бұрын
love your videos
@Waliente
@Waliente 4 жыл бұрын
Great video! Nice job Matharoo :)
@samcook6250
@samcook6250 4 жыл бұрын
Love the funny intro and the shader
@nuclearbeeberman
@nuclearbeeberman 4 жыл бұрын
awesome! is this technique used for the pseudo 3d effect in diablo 2 too ? I think your channel is criminally undersubscribed
@GameMakerStation
@GameMakerStation 4 жыл бұрын
Thanks :) I've never played Diablo 2 before. I did look at some gameplay but didn't see a similar effect...
@SnakeEngine
@SnakeEngine 11 ай бұрын
Fantastic. Why don't I see top down games made like this? Anyone know some examples?
@professionalquestion5415
@professionalquestion5415 4 жыл бұрын
Lmfao , that intro was hilarious
@habarvaz
@habarvaz 4 жыл бұрын
Thank you for another great video. Loved the intro!
@KungFuMaintenance
@KungFuMaintenance 27 күн бұрын
Very nice!
@Nyveon
@Nyveon 4 жыл бұрын
Great content Matharoo, keep it up :)
@GameMakerStation
@GameMakerStation 4 жыл бұрын
Thank you 🙌
@mfedorov
@mfedorov Жыл бұрын
Awesome! But what happens if I don't turn off auto cropping?
@RyzenShine69
@RyzenShine69 4 жыл бұрын
This is such a fantastic idea and to share it with the gamedev community is so daring, what a great heart you have. The 3d effect was good enough and then you showed that lighting trick and I was blown away. It always amazes how shaders can make a simple piece of art look that much greater. Thank you for caring to share this! Subbed.
@daneemark4266
@daneemark4266 4 жыл бұрын
Great content ! Keep up the great work bro !
@GameMakerStation
@GameMakerStation 4 жыл бұрын
Thanks :)
@krah3219
@krah3219 4 жыл бұрын
Hey very good video matharoo, hey a question how could I do a melee attack in a top down game?
@GameMakerStation
@GameMakerStation 4 жыл бұрын
Use a hitbox object and check collisions with it -- of course the hitbox should store the ID of whatever instance created it, so it can attack instances other than that one.
@krah3219
@krah3219 4 жыл бұрын
@@GameMakerStation some way to do this but detecting when the key is pressed and with states? I dont know if i explained well
@krah3219
@krah3219 4 жыл бұрын
@@GameMakerStation you can make a tutorial for this? I'm really new with gamemaker
@jfurmann
@jfurmann 4 жыл бұрын
I love your videos!
@mishi6693
@mishi6693 3 жыл бұрын
thx for the awesome video!! one question: how did you decide on 1000 for dividing the height in L23 of your shader? Should that number change if your game as a different room size or screen resolution?
@scrub_jay
@scrub_jay 4 жыл бұрын
This video is amazing, extremely helpful and I'm glad you made it. I have been planning a top-down game but I could not figure out how to make it work the way I wanted in 2D, and this sort of parallax only just occured to me. I am eager to try it out. It still looks a bit uncanny, but I'm pretty sure it's due to the tree sprite being drawn from a straight-on perspective initially. Do you think it could look even better if the sprites were initially drawn from a higher perspective?
@GameMakerStation
@GameMakerStation 4 жыл бұрын
Honestly, not sure. I know it looks a bit uncanny, but this was only an example for this video, and in the actual game -- that this example is based off of -- I use a slightly different technique, where the offset applied to each top-vertex is not unique to that vertex's position but the same offset is applied to all vertices in that image. So the distance to the camera is based on like the bottom-center point of the tree rather than the vertex's unique position, and I believe that works out somewhat better for our game. You can see that effect here: twitter.com/itsmatharoo/status/1263092823517257728
@scrub_jay
@scrub_jay 4 жыл бұрын
@@GameMakerStation Thanks for the reply! I see -- it does look a bit better there. I'm trying to figure out what could be done about the way the pyramid stretches oddly. I think it has to do with the fact that the "back" of the pyramid is very high on the sprite so it is stretched like it is something tall, while it should look attached to the ground. Do you suppose it would it be effective to perhaps have 2 sprites stacked on top of each other, a "ground floor" and "upper floor" that have different parallax amounts? Or would that require a whole separate shader? I am a beginner so I'm just thinking of ideas, I'm not sure what is practical. I appreciate the channel, keep it up!
@GameMakerStation
@GameMakerStation 4 жыл бұрын
@@scrub_jay Yes, the pyramid sprite in the GIF was temporary. We are planning on making it using separate objects, so that it looks more realistic and less like a sheet of paper.
@Pan-Musician
@Pan-Musician 4 жыл бұрын
Hey Matharoo, could you do something like this with draw_sprite_pos? I just recently implemented Friendly Cosmonauts Shadow tutorial, where she uses a similar effect to set the shadow skew. would this be less performant? I am new to Gamemaker and coding and wanted to check to see if a shader was the right way to go for this effect.
@GameMakerStation
@GameMakerStation 4 жыл бұрын
Yeah, you can do this with draw_sprite_pos() -- that's actually what we do in our game when the Graphics setting is set to Low and we have to turn all shaders off. I just prefer doing it with a shader because it feels more natural, and with draw_sprite_pos() you're just doing some extra math to get the same effect. That said, you can achieve the exact same effect with draw_sprite_pos(), because as I mentioned earlier, we do use it in our game for the Low setting.
@alexzh6612
@alexzh6612 4 жыл бұрын
Hi! Looks cool! And could you help me explain how to do this on GMS 1.4? and then I try , but I don't get it
@AceDroo
@AceDroo 4 жыл бұрын
Wow! This is awesome! I only have one question though: are there any advantages/disadvantages to using this method of drawing 3D parallax compared to other methods? Just curious in case I want to use this technique in future projects.
@GameMakerStation
@GameMakerStation 4 жыл бұрын
I'm not aware of any other methods for doing parallax in top-down games. You can do the same effect with draw_sprite_pos(), though it's much easier and natural done with shaders. Let me know what other methods you are talking about, in case I'm missing something or have forgotten. :) I'll be happy to let you know the differences. (Maybe you're talking about the 2.5D platformer tutorial I made, which is only for platformers, not for top-down games)
@AceDroo
@AceDroo 4 жыл бұрын
I think you might be right, I may have confused it with the platformer-based one, cause the closest I could find was this: www.yoyogames.com/blog/458/z-tilting-shader-based-2-5d-depth-sorting As you said, this one seems alot easier and more natural to use, so I might give this a go in the future. Thanks again!
@GameMakerStation
@GameMakerStation 4 жыл бұрын
@@AceDroo That's just a different solution to depth ordering, but I'm not sure if this parallax effect can be done with that method since it doesn't use the depth (z) variable.
@AceDroo
@AceDroo 4 жыл бұрын
Yeah, I think I got my terminology a bit confused then haha. Thanks again though, I'll definitely try to give this method a go sometime in the future
@oifridgy
@oifridgy 4 жыл бұрын
Hi! I tested your project and knew it was exactly what I wanted for my game, but when I went to port the shaders and objects for my game, instead of just the trees being 3d the whole game was 3D, I would like to know if you can help me with this bug and maybe fix
@GameMakerStation
@GameMakerStation 4 жыл бұрын
If you just want the trees to be 3D, instead of applying the shader to all instances (using the Shader Setter objects), just apply it in the Draw event of your tree object (or a parent object, if you have multiple tree objects).
@eversonmay
@eversonmay 21 күн бұрын
Who made this assets, thi is s real game?
@TheCivildecay
@TheCivildecay 4 жыл бұрын
While it's a awesome effect, I have the feeling that it works best for a 3/4th angle game... my current project is pure top-down. and using a 3D perspective camera will look more natural for the same effect.
@GameMakerStation
@GameMakerStation 4 жыл бұрын
I agree, this effect is most fitting for 3/4 perspective games.
@JaguarPanda
@JaguarPanda 2 жыл бұрын
I can't seem to make it work in my game
@triplelindy5273
@triplelindy5273 4 жыл бұрын
In some of your older videos, people have committed on your voice. I'd have to agree with some of that criticism, it was a bit distracting. Just want to say that your more recent videos you sound FAR more natural and relaxed! Your knowledge and expertise was never in question, but now your content is much more pleasant to listen to. Thanks for sharing your knowledge and I look forward to more videos explaining the newest features to GMS 2.3.
@GameMakerStation
@GameMakerStation 4 жыл бұрын
Thanks Lindy. I do agree that my voice sucked, and even back then, I did not disagree. I always knew that I was doing my best to improve, and that's something I'm still doing, because I'm not there yet. Your feedback means a lot to me. :)
@triplelindy5273
@triplelindy5273 4 жыл бұрын
@@GameMakerStation You're welcome, sir. I find your humble attitude inspiring. Allow me to heap more praise upon you - I appreciate how much work you put into the editing of your videos. The slick camera movements and other graphical effects (like the animated boxes and arrows) make your content more engaging than a lot of the other GMS tutorials out there. Again, thanks for sharing your knowledge.
@GameMakerStation
@GameMakerStation 4 жыл бұрын
@@triplelindy5273 And thank you, that means a lot :)
@andrew_stamps
@andrew_stamps 4 жыл бұрын
Off hand do you know is it possible to apply this to a tile layer using the layershader functions?
@GameMakerStation
@GameMakerStation 4 жыл бұрын
I'm not sure. Even if you did apply the shader, the result would probably look very weird, so the same shader couldn't be used (you'd have to write something different).
@schnikschnak4191
@schnikschnak4191 4 жыл бұрын
Hello. is it possible to create automatically generated subtitles in German for your videos?
@GameMakerStation
@GameMakerStation 4 жыл бұрын
Hallo, ich weiss das eigentlich nicht, tut mir leid.
@schnikschnak4191
@schnikschnak4191 4 жыл бұрын
@@GameMakerStation ok auf englisch gehts. Naja ok trotzdem dankeschön. Thank you
@nicknormandy
@nicknormandy 4 жыл бұрын
Good stuff
@samcook6250
@samcook6250 4 жыл бұрын
Does this stretch out pixel art?
@GameMakerStation
@GameMakerStation 4 жыл бұрын
I mean, there is some stretching going on, in the top parts of the sprites. If you keep the effect subtle enough, it shouldn't look bad.
@TheCivildecay
@TheCivildecay 4 жыл бұрын
Indian Hipster ;)
@ignaciosb8779
@ignaciosb8779 4 жыл бұрын
You are really really good and graphic to explain. So much I'd give you a medal bro.
Animation in GameMaker (Sequences & Curves) | Pt. 1
11:06
GameMakerStation - Matharoo
Рет қаралды 12 М.
Dear Game Developers, Stop Messing This Up!
22:19
Jonas Tyroller
Рет қаралды 722 М.
VAMPIRE DESTROYED GIRL???? 😱
00:56
INO
Рет қаралды 9 МЛН
Why you Draw Bad Assets || 2D Game Art
13:00
Nonsensical 2D
Рет қаралды 80 М.
Every Game Engine Explained In 9 Minutes (Part 1)
9:10
Stopshut
Рет қаралды 410 М.
Why Is It Bad That My Game Looks Good?
16:40
Deynum Studio
Рет қаралды 105 М.
Fastest 2D Dynamic Lighting System in GMS2
6:25
GrizzliusMaximus Games
Рет қаралды 35 М.
gpu_set_depth() - 3D Sprite Depth in GameMaker
10:34
DragoniteSpam
Рет қаралды 900
How Games Make VFX (Demonstrated in Godot 4)
5:46
PlayWithFurcifer
Рет қаралды 353 М.
choosing a game engine is easy, actually
15:08
samyam
Рет қаралды 544 М.
I Made the Same Game in 8 Engines
12:34
Emeral
Рет қаралды 4,2 МЛН
Optimisation Tips | GameMaker Studio 2
19:10
FriendlyCosmonaut
Рет қаралды 50 М.