• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Legacy GM (HELP) Water Reflections?

P

Pixels_Everywhere

Guest
I've been trying to make some water reflections using surfaces for about 3 - 4 hours now. Nothing I have done seems to work. I want an effect similar to that of the Pokemon games where the reflection moves with the player, and (obviously) is not visible anywhere else but the water.

Here is a screenshot of my game so you have some context of what I am working with:
https://imgur.com/a/BDt1w
 
Last edited by a moderator:

obscene

Member
The simplest way is to use the application_surface. This is the built-in surface that your game is drawn to and then is finally drawn to screen. You can mess around with it using surface_draw() to see it. The actual method you'll probably want to use however is that your water object would make a copy of the application surface (surface_copy) at whatever depth you want the water to draw and then use draw_surface_part() to draw a cropped version of it upside down. Figuring out the values of where to draw it and where to crop it can be tricky if you are using views.
 
P

Pixels_Everywhere

Guest
my water is a tile. Can i do this using an object, that is using this code but not draw self? Thank for the reply. I will look into application_surface.
 
T

teamrocketboyz

Guest
I managed to create something similar in a top down soccer game using objects although j must admit I cheated and its not very accurate. See video below

 
Top