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.

2D All the way! / How do you make water run through a pipe?

Author
Message
Kelby
20
Years of Service
User Offline
Joined: 20th Sep 2005
Location: Lancashire, UK
Posted: 13th Dec 2005 14:14
I am whating to make a 2d puzzle game using dark basic pro, and I used to love playing supre pipeline on the C64. so I am making a game that you have to join the pipes up before the water comes and then fill a tub while something is trying to block your pipe. My problem is how can I make the water run through the pipe and make it stop if there is a blockage.
phillips 74
20
Years of Service
User Offline
Joined: 22nd Jun 2005
Location: Iowa
Posted: 13th Dec 2005 21:37
I would use sprites or animated tiles.
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 14th Dec 2005 10:31 Edited at: 14th Dec 2005 10:33
It's just 2 animations of the water either filling a blocked pipe, or passing through to the next pipe. You just need to arrange the animation frames in the correct order. The animations would be different depending on a DATA MAP of 0,1 or 2.

Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 14th Dec 2005 10:46
Gah!, I haven't played that in years, I loved that game!

I think that you'd have to use sprite tiles anyway, like pipe sections to make up the maps, so manually drawing the water is probably the easiest option. Like if you had 8 different bits of pipe, maybe make 16 copies and add a little water each time, if your pipe section is 16x16 pixels, then 16 frames would fill the pipe up nice and smooth.

With your map array, you would have another array for the amount of water, and with this you can increase the water amounts, when one get's to the last frame, like full of water - you can check the type of pipe and decide where the water spreads to.


Van-B

Put away, those fiery biscuits!
Kelby
20
Years of Service
User Offline
Joined: 20th Sep 2005
Location: Lancashire, UK
Posted: 14th Dec 2005 13:06
Thanks for your help, I understand how to do it now. The array is no problem , but the drawing is not my strong point , still it will keep me and my kids busy over christmas, has this is our project over the holidays.

Merry Christmas to you all, Darren .
Red Ocktober
22
Years of Service
User Offline
Joined: 6th Dec 2003
Location:
Posted: 14th Dec 2005 15:49
i might suggest making an animated image (or mesh, whichever way you're planning on making it) for each section of pipe... straight, curved, etc... and include the water moviment as part of of the animation...

each section of pipe could be represented by an array of pipe types with a vWater and dirWater property which could be used to determine the animation direction and speed... if you wanna go that far...

hey... this is just a general suggestion as to one way you might approach this... i'm not really a 2D puzzle game type

good luck

--Mike
Snowy The Evil Snowman
20
Years of Service
User Offline
Joined: 13th Nov 2005
Location: Deep Inside The Devils Dark Bunker
Posted: 3rd Jan 2006 20:21
Attach to tap and turn it on.

Play Hard, Code Harder Then Shake Deaths Funky Claw.

Login to post a reply

Server time is: 2026-06-12 23:24:42
Your offset time is: 2026-06-12 23:24:42