Underwater effect

Hectate

  • *
  • Posts: 4643
Yea, both are essentially displacing the pixels horizontally using a displacement map that scrolls vertically. The amount of displacement varies - and the degree to which it's noticeable is different for each game but mainly because one's just an indicator of being underwater while the other is intended to effect gameplay.
:
:
Patience is a Virtue,
But Haste is my Life.
Proud member of the League of Idiotic Stencylers; doing things in Stencyl that probably shouldn't be done.

Alexin

  • *
  • Posts: 3127
Demo updated. Does it look better, BB?
"Find the fun"
alexin@stencyl.com

Rhys

  • Posts: 1046
Impressive! It's a shame it runs quite slowly though.

Alexin

  • *
  • Posts: 3127
Indeed, it's an expensive effect. I tried it on my girlfriend's laptop, using Opera, and it brought the machine to its knees.
"Find the fun"
alexin@stencyl.com

Alexin

  • *
  • Posts: 3127
I'm going to implement some sort of caching to improve the performance (hopefully).
"Find the fun"
alexin@stencyl.com

Epic428

  • Posts: 1118
I averaged at around 50FPS - I did have occasional (very brief) dips down to about 20 FPS.

So far this is coming out very nicely, hopefully the caching will help improve the performance. Perhaps in some instances where images are static and not changing, could the effect be pre-rendered to improve performance?
James Moore - Official Support & Documentation.
We cannot and will not respond to PM's asking questions. Please make a new thread in the forums if you have any questions, Thank you.
For better support and faster response times, please post your logs regarding any Stencyl related issues. Debug > Logs > Generate Logs

Alexin

  • *
  • Posts: 3127
Perhaps in some instances where images are static and not changing, could the effect be pre-rendered to improve performance?
This is exactly what caching does. As it is, the effect is applied every frame. With caching, I'll apply the effect only when either the map changes or a property is changed. Obviously, this applies not only to static maps but animated ones too (like the one in the demo).

I'll share this as a pack once it's ready.
"Find the fun"
alexin@stencyl.com

Epic428

  • Posts: 1118
Ahh.. I had thought that's what you were going to do with the caching but I wasn't entirely sure. I imagine that should definitely improve the performance, at least in many cases.
James Moore - Official Support & Documentation.
We cannot and will not respond to PM's asking questions. Please make a new thread in the forums if you have any questions, Thank you.
For better support and faster response times, please post your logs regarding any Stencyl related issues. Debug > Logs > Generate Logs

Alexin

  • *
  • Posts: 3127
Demo updated.

The performance improved by ~50%.
"Find the fun"
alexin@stencyl.com

Epic428

  • Posts: 1118
The performance has definitely improved. Rather than getting dips down to ~20fps, I am seeing it hold a steady fluctuation between 50 and 60 fps with frequent bursts beyond 60 to max of about 70. I'd say this actually quite a large performance jump.
James Moore - Official Support & Documentation.
We cannot and will not respond to PM's asking questions. Please make a new thread in the forums if you have any questions, Thank you.
For better support and faster response times, please post your logs regarding any Stencyl related issues. Debug > Logs > Generate Logs

Blob

  • *
  • Posts: 721
I went from getting 50-55 to 60 with frequent small dips. I'd say it's still a little tongue-in-cheek as it'd probably do a number on an already busy scene.

~ Blob

Winzenheimer

  • Posts: 97
Much better, I'm holding at around 60fps on a laptop.

Alexin

  • *
  • Posts: 3127
I'll also try to make maps at runtime, so you don't need to "import" maps as actors.

Demo updated. (Something went wrong and I had to upload it again)

« Last Edit: May 04, 2011, 04:07:58 pm by Alexin »
"Find the fun"
alexin@stencyl.com

Epic428

  • Posts: 1118
Amazing! I'm seeing 20fps burps again, but consistent between 40 and 62 fps.
James Moore - Official Support & Documentation.
We cannot and will not respond to PM's asking questions. Please make a new thread in the forums if you have any questions, Thank you.
For better support and faster response times, please post your logs regarding any Stencyl related issues. Debug > Logs > Generate Logs

Murad

  • Posts: 151
That demo doesn't work for me for some reason ):