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) (Depending on how it works, you might want to subtract the X/Y positions of the view from the 'drawsprite' thing when rendering it for the surface. This function will save a surface to disc using the given filename. Add a Create event and put this code: var w = camera_get_view_width(view_camera) Though I can't imagine there would be a need to set the surface resolution to be bigger than the view resolution. 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: This tutorial simply covers the mirroring of sprites and drawing them over tiles. This video tutorial shows you how you can make a light system in gamemaker studio 2. Here’s what we’re going to achieve through this tutorial: Final Result 15K views 3 years ago Game maker studio - Advanced. 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. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |