Pipe Mania (ish!)

BlitzMax Forums/BlitzMax Beginners Area/Pipe Mania (ish!)

Matt Vinyl(Posted 2010) [#1]
I've been working hard on a game based on this classic ( http://en.wikipedia.org/wiki/Pipe_Mania ).

However, I'm not sure how best to get the 'flowing' liquid to work / look OK.

I've got a tile-set that I've put together that I'm also pleased with. Would I need to tediously make a separate tile for each part of the flow, such as:

----

----


----
H
----


----
HH
----


----
HHH
----

...(where the 'H's' are the liquid.)

...and so on? Or is there a better way to go about it? The pipes within my tileset are 'glass', so I'd obviously want it to look like the liquid was inside the pipe - so dynamically doing it within Blitz would be difficult, I guess?

Surprisingly, there doesn't seem to be too many remakes of this, and little advice kicking around about the programming of such a game.

PS: Just thought that the corners are going to probably particularly painful. :(

Cheers!


GfK(Posted 2010) [#2]
I used particles and some convoluted code to get the particles to follow the pipes for mine.


JazzieB(Posted 2010) [#3]
Providing that the fluid would be fairly flat or have a uniform pattern, another way would be to have separate tiles for the straight part of the pipe and another set for one of the corners. You would then animate in one direction, and rotate by 90 degrees for the other three directions. These would then be drawn behind your main pipe graphics, making use of the alpha channel for the glass so that it shows through. Any lighting/shading used on the glass would un-flatten the look of the fluid.