![]() ![]() We will draw our water tiles and the reflections onto it. If you’re using views, just replace those camera width/height functions with view_wview and view_hview. Here, I’m creating a surface that is the size of the camera. Var h = camera_get_view_height(view_camera) Add a Create event and put this code: var w = camera_get_view_width(view_camera) Place it inside this newly created “TilesInst” layer.įor this, I’ll use obj_watertiles. This layer will be used to hold the object that will draw the water tile, so it needs to stay below your normal layers so that it appears below other layers in the game. Now create an instance layer, and place it below your normal “Instances” layer. So make sure that the tile layer is invisible: So to start, you need to disable the visibility on your tile layer, because we are going to draw the tiles manually onto a surface. Note: Make sure there is no empty space below the player sprite. I just have a player object and a layer of water tiles. You can have complete top-down reflections with a realistic shader in your game, all for only 2 bucks – pay once, use it in as many projects as you like! This is what it looks like: You can have complete top-down reflections with a realistic shader in your game, all for only 2 bucks pay once, use it in as many projects as you like This is what it looks like: You can buy it here. This tutorial simply covers the mirroring of sprites and drawing them over tiles. This tutorial simply covers the mirroring of sprites and drawing them over tiles. If you are still using Drag and Drop Items, you might not understand this tutorial and want to dive into programming first. Award Favorite Share Prerequesites You need an understanding of GML. It allows us to use advanced features, such as minimaps. Here’s what we’re going to achieve through this tutorial: Final Result Surfaces are key to success in GameMaker. Hey there, I’m back with another tutorial! In this one, you’re going to learn how to make reflections using tiles for water. ![]()
0 Comments
Leave a Reply. |