Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Dx8 water reflection system


Slasheree
 Share

Recommended Posts

I'll correct myself, when you walk away from the water going up, it looks like the image disappears rather than walks out, might just be my eyes, and when you walk to the left from those corners, it looks a lot like the reflection just disappears. Again, might just be my eyes, but that's what I'm seeing so I thought I'd share lol, still a lot better then I'll ever do :)
Link to comment
Share on other sites

Would you really need an algorithm for this? Mirroring the sprite and reducing its alpha masking would get you a very similar result. The only thing you'd need to calculate is which parts of your upside-down sprite touch the water tile. (It also saves a ton of hassle with animations as you just mimic the existing sprite, which already has the right animation frame)
Link to comment
Share on other sites

taken from wikipedia

> In mathematics and computer science, an algorithm is a self-contained step-by-step set of operations to be performed. Algorithms exist that perform calculation, data processing, and automated reasoning.

in this case

> calculate which parts of your upside-down sprite touch the water tile

answering your question "Would you really need an algorithm for this?" yes xP
Link to comment
Share on other sites

Fair enough, but I do not consider a basic "If Pixel X touches Pixel Y display Pixel X" much of an algorithm. Makes it sound far more complex than it really is. (You could simplify it further by just having a box where it displays negating the need for pixel based logic)
Link to comment
Share on other sites

Somewhere here in eclipse…

> Mount System
> $45 USD

System is only based in cropping the player sprite and rendering it above a mount sprite, if people would pay for that why wouldn't they pay for a more complex system ?

Anyways, if you're not interested in aquiring it, please refrain from posting.

As for the "that algorithm is too simple" talk, this is WYSIWYG, if you can make this system or better, good for you, but I'm selling the code I made for people who want to have this system in their engine.
Link to comment
Share on other sites

Whoa, that looks real nice. Good job man. I'm guessing, you get the sprite, laterally invert it, reduce the alpha, and render it. But where would you squeeze the rendering in so that it becomes a part of the actual map, without interrupting the flow of the rendering of the map? :O

p.s I don't think you'd actual tell me because this system is paid and stuff, but it's worth a try :P
Link to comment
Share on other sites

I'm not sure about this but you can probably invert a Dx8 texture by putting the width and height of the destination to be a negative. I'm guessing that DX8 will invert it. The other way would be to reload the png spritesheet in GDP, flip it, save the image, load it up in Dx8 and then render it. Though this may result in a drop in fps.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...