A simple demo of a reflection.
Press X to enable/disable the reflection effect.
Press Z to enable/disable the ripple effect.
Use up/down to move the view up and down i.e. change the amount of reflection on the screen.
Uses the extra palette to dim the portion of the screen where the reflection will be.
Draws everything else like normal above the reflection surface.
'memcopy's to the lines below the reflection surface, starting with the line immediately above it.
Adding an offset with some sin() calls moves each line a bit to allow the ripple effect. Downside is a little bit of mess at the edges.
[edit] Minor bug fix to make ripple effect constant with distance from the shore.
[Please log in to post a comment]