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) HTML5 loading screen for GameMaker A highly configurable loading screen extension for GMS web games JS click event handler for GameMaker Open new tabs and perform other actions that require JS-level events in GM web games. Place it inside this newly created “TilesInst” layer.įor this, I’ll use obj_watertiles. GameMaker & Construct 2 plugins to let user pick where to save screenshot (s). 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. (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. Note: Make sure there is no empty space below the player sprite. Though I can't imagine there would be a need to set the surface resolution to be bigger than the view resolution. ![]() I just have a player object and a layer of water tiles. Gamemaker Studio 2 Camera and visual editor: Follow objects, screen shake, view scaling, screen effects, etc. 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. ![]() Here’s what we’re going to achieve through this tutorial: Final Result 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. |