Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Water flow in pipe mania

Author
Message
TimCantCode
21
Years of Service
User Offline
Joined: 27th Jul 2003
Location: United Kingdom
Posted: 27th Jul 2003 14:09
Hello, this is my first post, so please dont tear me limb from limb unless it is totally necessary.So, i'm trying to make a pipe mania style game, and I want the water to flow smoothly through the pipes.
Ive thought of three options to implement this.
1. Animate each section, which i do not want to do
2. Have a series of frames for each section, effectively animating it, but do the actual processing in dbp
3. Have a moving line that proceedes through the pipes, leaving previous versions of itself pasted to the screen.

I'm concentrating on the third way at the moment, as it seems to be the best way of achieving it. This method is no problem for straight sections, but moving it round a curve is proving to be more of a headache.

I'm thinking about a system where the line is moved fowards in proportion to the circumfrence of the curve, and is rotated in proportion to 90 degrees(the angle over the curve) divided by the circumfrence. This would happen each cycle.

Anyways, if you have any opinions on each of these methods(especially the last one), and if there's a better method staring me in the face, then i would be grateful for any assistance you could offer me. Thanks, Tim.
This post was written by me, possibly, depending on whether I am, in fact dead, or not. Possibly.
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 27th Jul 2003 14:21
use a sprite set to overwrite the background and then rotate the sprite and then move it by the correct ammounts, if your blocks are 20 wide for eg (in pixels), then rotate by 90/20 and move 1 forward each time should get it to turn inside the block, while the unblitted sprite will leave a trail behind it in blue (if your sprite is blue), also you could drop the occasional animated sprite behind that looks like the water but has small bubbles in it that rise to the top of the pipe to make it look more watery, cheers.

Mentor.

TimCantCode
21
Years of Service
User Offline
Joined: 27th Jul 2003
Location: United Kingdom
Posted: 27th Jul 2003 15:36
Ok, that sounds good, thanks for that. Also, ive just thought of another possible way of doing it.
I could offset the front of the water sprite so it rotates around the corner of the tile, obviously the corner that would be the centre of the circle. This would mean i wouldnt have to work out the moving forward bit, as I'm thinking that is gonna be quite tricky changing from x co-ords to y co-ords and vice versa. However it does mean i'm gonan have to offset and un offset the sprite for each curve. What do you think?

This post was written by me, possibly, depending on whether I am, in fact dead, or not. Possibly.
Shock
AGK Developer
22
Years of Service
User Offline
Joined: 24th Oct 2002
Location: United Kingdom
Posted: 27th Jul 2003 15:38
personally, i'd find it easier to make in 3D.

Quote: "please dont tear me limb from limb unless it is totally necessary"


Lol, are we really that bad?

...::::ShockForge::::...
Dark Editor
21
Years of Service
User Offline
Joined: 22nd Jul 2003
Location:
Posted: 27th Jul 2003 15:54
Or you could do it the easy, somewhat more appealing way even though you lose the bubble effect. Make an object plain, add a water texture, ghost the object, and scroll the plain texture. That will make a smooth water running effect. enjoy
Mason

When you get stuck with dark basic, look at the poster of Brittany Spears on your wall, it helps, trust me...
TimCantCode
21
Years of Service
User Offline
Joined: 27th Jul 2003
Location: United Kingdom
Posted: 27th Jul 2003 15:55
Lol, well you know, on any forum there are idiots, hopefully this one has less than others. Yeah, bout doin it in 3D, i dunno, ive just spent a lot more time doin 2d in dbc, but maybe its time to have a look in depth at 3D. Ultimately i'm trying to work this into a two player game, with network play, so i need it to be as fast as possible really. But thanks for your informative and helpfull post

This post was written by me, possibly, depending on whether I am, in fact dead, or not. Possibly.
ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 27th Jul 2003 17:49
3d is faster in dbc than 2d, just somehting to think about

You know whats weird???
Donald duck never wore pants, yet everything time he got out of the shower he put a towel around his waist...
Whats with that???
TimCantCode
21
Years of Service
User Offline
Joined: 27th Jul 2003
Location: United Kingdom
Posted: 27th Jul 2003 18:22
Yeah, i guess so. I may be totally wrong, but i was thinking that if i was going to make a game that worked over a network, 2d would probably be quicker. Theoretically 3D should be half as slow as 2d due to transmitting the extra D Well thanks for the post, and i'll have a little think to myself

This post was written by me, possibly, depending on whether I am, in fact dead, or not. Possibly.

Login to post a reply

Server time is: 2024-11-10 14:48:09
Your offset time is: 2024-11-10 14:48:09