Terraria-style Fluid Dynamics

0 favourites
  • 8 posts
From the Asset Store
Slot Machine Games. suitable for workers who work from home because it has player names that must be played alternately
  • For those who haven't played Terraria,

    It doesn't show things like air pockets, but still.

    Long story short, I can imagine doing something like this could be somewhat complex, especially without "Offset Collision" conditions that Classic has. And I personally am not sure where to start with something like this, though I would really like to be able to create proper fluid dynamics, even if they're blocky fluids.

    So, yeah. Any ideas? I imagine some of you smart fellows might take this request as a challenge, heh.

    Edit: Hell, if any of you guys somehow take it one step further and do proper fluid dynamics like in that "Where's my water?" game on the iOS, that would be awesome as well. I'm really curious as to how those developers managed to pull it off. Probably asking a bit much, but, one can hope. <img src="smileys/smiley36.gif" border="0" align="middle">

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • did something like that on cc some month ago

    waterSim.exe

    Basically it's an algorithm called "cellular automata".

    It's Array based:

    Foreach cell that have water, check the surrounding bottom cell and transfer water if empty.

    My example handle communicating vessels (which makes it a bit more complicated, you don't transfert water anymore but mass, and you put exces on top), terraria doesn't.

    But anyway it's pretty heavy in a large scale, event in cc.Yann2012-02-07 16:17:12

  • There's an article about CAs for water & fire in the book "Game Programming Gems 3". Get the book or ask the author Tom Forsyth (tomf_at_muckfoot.com) for a PDF.

    Found it:

    home.comcast.net/~tom_forsyth/papers/cellular_automata_for_physical_modelling.html

  • Well, that's fascinating. That being said, I imagine it would require two main things: Arrays/XML files, and being able to save arrays/XMLs. And C2 can only do arrays, but not save them. So... Yeah. A bit of a problem.

  • The main issue really is CPU if you plan to work on big worlds like Terraria.

    I don't know why you would need xml though.

  • Well, to actually save stuff, like changes to tiles, and whatnot. Probably the only file format to hold data like that would work with HTML5, it's not like we're gonna be using ini files. :p

    Arrays for storing tile data during runtime, XMLs for saving them. That works.

  • CSV ? :D

  • can you do that in game maker studio?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)