Water is a renewable resource!

Published July 27, 2006
Advertisement
Well, the spikes work now, so I can get to work on the other special tiles. These include:

- Ladders
- Water
- Checkpoints
- Teleporters
- Item boxes (think mario)

There will probably be more, I just haven't thought of them yet.

I'll probably try to get ladders working tomorrow, and possibly try water. Water is going to be tricky to make.

It's not making the player control differently when they're in water. Actually, that's the easy part. It's making the player drawn differently. The water itself will be drawn with an alpha value, so that it is semi transparent. However, I already realize there will be a problem drawing the player when he jumps into water. When the player will be drawn in water, it won't look like it's in water, because the player sprite is automatically drawn over any tile sprites. The tricky part will be making it appear as if the player is in the water.

-----------------------------------------------------------------------------

On something totally unrelated, playing around with Civilization 4 modding:
Screenshot 1
Screenshot 2
0 likes 4 comments

Comments

Sir Sapo
Perhaps you should give the tiles their own "z" value, this could be as simple as -1 being behind the player, and 1 being on top of the player. Then you could just iterate through your tile's twice, first rendering tiles with negative z's, then render the player, then render tiles with positive z's.

Of course if you are using DX or OGL, you could just use the depth buffer, but IIRC you are using SDL, so disregard that.
July 27, 2006 09:09 PM
HopeDagger
Quote:Original post by Stompy9999
The tricky part will be making it appear as if the player is in the water.


If the player is over a 'water' tile, set a flag to let your rendering code know to render the player BEFORE the maptiles are drawn. Or draw a secondary copy of the player sprite(s) with a premade water-alpha-ish overlay.
July 27, 2006 09:11 PM
Stompy9999
Yep, that sounds like the most logical thing to do.

I probably should have had that in the tile engine to begin with. With that, I could also use it on other tiles to add to the semi-3D effect I've been trying to achieve.
July 27, 2006 11:57 PM
-justin-
like clouds!

good progress... you > me :D
July 28, 2006 02:19 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement