In doing HTML/DOM work, you are working with concrete nodes which you can visibly touch and have a defined shape and boundary.

What I'm wondering though is like with a cloud like structure, or like a viscious fluid that is spraying like a geyser into the air and has big droplets of water, or maybe even like ocean waves.

A cloud doesn't have a clear boundary, it is more like a blend from one state to the next. But in your game you might say "hey there is a cloud right there" or "I just walked into a cloud". I don't see how the game can do that, how it identified something without a concrete, discrete ID! Likewise, an ocean wave doesn't have a clear boundary the same way a machine or a human being has a "boundary". A wave blends into the main water, and splashes away stuff, and is evaporating and all kinds of stuff. But you can still say in your game "there is a wave over there".

The question is, how that wave or that cloud is actually identified in the game. I would've thought initially to just create a "wave object" or a "cloud object", and have it move through the water or move through the sky. And maybe add some sort of sensor like stuff to it so it seemed like it was more amorphous than it's discrete representation under the hood.

But the thing is, a cloud or more generally a blob can subdivide/split/merge with others/etc. So it's so-called discrete identity is very... fluid. There's not really a centralized identity, there's just these blobs that come and go and change shape and stuff.

So I'm wondering how these sorts of things are treated in games that handle more advanced use cases. I'm new to quad-/octrees but maybe they are used somehow here. It seems like object motion tracking might have some insight but I'm not sure and most stuff I've seen is on clearly distinct objects like moving cars or people rather than clouds or waves or "blobs".

I am wondering because it's so far unclear to me how one might "iterate" through "a list of blobs". What counts as an "identity". (Not talking about things like FPS caring about individual pieces of glass or droplets of water, but maybe a puzzle game about blobs or something, or some scientific game). The blobs can merge and split and divide and such, then I wonder how often we are tracking their changes in shape. Or maybe there's ways to be notified when a "major event" occurs. I don't know.

Basically I'm wondering where I could look to learn more about how to handle amorphous "structures" in 2D or 3D worlds that are changing regularly like described. I am not sure if (so to speak) these blobs are given "unique IDs" and treated like database records, or if they are less structured (or if they can be this structured in some way).

  • \$\begingroup\$ I''m not sure if I understand the question. In games waves are often planes transformed by shaders- unless you're looking are fluid and smoke simulations- these often are particles, like this google.github.io/liquidfun ? \$\endgroup\$ – Felsir Jan 11 '19 at 20:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.