Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Hello!

1 - Just send the camera position to the offset parameters, using .SetEffectParameters()

2 - In this case, instead of using application_surface, use the PPFX surface. You can get the PPFX surface with .GetRenderSurface(), this way you will get the game surface with the effects applied and draw it later when pausing.

Hello, after testing, there are still some issues (likely due to my insufficient understanding of how to use this plugin correctly):

  1. I might not fully understand the correct way to pass OFFSET parameters. I wrote: test_renderer.SetEffectParameters(FF_DISPLACEMAP, [PP_DISPLACEMAP_OFFSET], [obj_camera.x,obj_camera.y]) But this causes an error. I found "Offset X" and "Offset Y" in PP_DISPLACEMAP_OFFSET - could you show me exactly how to use them?

  2. I discovered the black screen issue was actually because my obj_pause disables most objects (including obj_ppfx 😅) when created. Testing shows application_surface still works normally.

The offset parameter needs an array. But since it's just a parameter, you can actually use .SetEffectParamater:

renderer.SetEffectParameter(FF_DISPLACEMAP, PP_DISPLACEMAP_OFFSET, [obj_camera.x, obj_camera.y]);

Unfortunately, despite passing the camera position in real-time via the step event as suggested (tried both obj_camera.x/y and cam_get_view_xy), the water ripple distortion still shifts with camera movement - exactly as shown in the GIF. Clearly I'm missing something critical here. 🤦‍♂️

Hmmm idk but it looks right in my eyes (?), but maybe it was necessary to look at it another way.  See the example of "layers" in the .yyz project, I implemented the camera offset there

After uncommenting the PP_DISPLACEMAP_OFFSET code at the location you specified, I observed that it was also affected by the camera. Upon closer inspection, the PP_SINE_WAVE_OFFSET effect is actually camera-dependent as well. The shaking amplitude intensifies when obj_player moves. Please check if this matches the phenomenon I described? If so, does this meet your expectations?

Yes, the offset is specifically used so that the effect uses the camera as the added position, preventing the effect from also moving when the camera moves.