Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

How to make a ripple effect underwater?

I'm going to have the ability to dive underwater hevily used in my newest game, but I need some help. I've got the tinting perfect, but how can i make the screen ripple as if the camera is underwater? Sorry for the short post, but my laptop is about to die.
 

poccil

Sponsor

In the default battle system, that effect is achieved by taking a static background and applying a wave effect to it.  This is an excerpt from Spriteset_Battle:
Code:
    @battleback_sprite = Sprite.new(@viewport1)
 #....
    # Setting parameters for wave
    @battleback_sprite.wave_amp = 8
    @battleback_sprite.wave_length = 240
    @battleback_sprite.wave_speed = 120
However, you want to apply a ripple effect to the entire screen, while it is active.  Normally that's practically impossible because the screen is composed of many sprites, and also because tilemaps don't support wave effects like sprites do.

Perhaps you could create a water-scenery parallax (see the "create_parallax" method of Spriteset_Map) and apply a wave effect to it.  However, the parallax is a plane, not a sprite, and planes don't support wave effects.
 
You could, atleast I think, create a series of pictures used with very little wait to appear on the screen with a low opacity, mimicking the effect of a ripple. Like, say, you created 5 pictures, each one slightly difference, and strung them together, and then used these as a common event whenever he dives? It's annoying, but it may be the only thing you could do.
 
Are you looking for a dynamic ripple (constantly moving), or a static ripple like the battle system?

For dynamic, build on Kain's idea & use an autotile with the priority set to 5 so it is on top of everything else, including the player.
(unless that's no longer possible in VX. I don't have it anymore, it expired & I didn't buy it.)

For static, you could come close by editing the tileset & applying a wave-blur effect to each individual tile.

Be Well
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top