Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3

Author Topic: Evil Fog  (Read 2869 times)

Sting_Auer

  • Bay Watcher
  • [LIKES_WAR_DOG_HORDES]
    • View Profile
Re: Evil Fog
« Reply #15 on: April 17, 2011, 02:47:25 pm »

All that the fog does is damage buildings and living creatures. Undead creatures would be immune.


Fog forming on tiles adjacent to other Fog should be relatively simple, right? That's the only behavior that would have a chance at causing noticeable lag on normal sized maps.
Logged
Thank you everyone for the help! I've since flooded the fortress I was working on and now have a new one going up.

Sting_Auer

  • Bay Watcher
  • [LIKES_WAR_DOG_HORDES]
    • View Profile
Re: Evil Fog
« Reply #16 on: April 22, 2011, 11:44:08 pm »

Any new replies?
Logged
Thank you everyone for the help! I've since flooded the fortress I was working on and now have a new one going up.

ticattack

  • Bay Watcher
    • View Profile
Re: Evil Fog
« Reply #17 on: April 23, 2011, 06:46:13 am »

Any new replies?
Yes, several. They're just hiding, is all.

All that the fog does is damage buildings and living creatures. Undead creatures would be immune.

Fog forming on tiles adjacent to other Fog should be relatively simple, right? That's the only behavior that would have a chance at causing noticeable lag on normal sized maps.
Really, liquids are simple. There's just a lot of it going on at once, as would be the case with your system. Reread Jeoshua's post, quoted here for your convenience:
Also, this shouldn't cause all that much lag. he only calculation taking place is "if fog present = false & adjacent block = fog present, create fog on said block."

... which takes place for EVERY fog tile, on EVERY frame.  FPS nightmare.  Set all the grass in an area on fire, and you'll get a similar dip in FPS.

Seriously, tile-by-tile fog would be very intensive on the processor, no matter what you made it do.  Even a simple check of it's neighboring tiles would be very intensive.  For one region tile, that's 48x48x8 = 18432 calculations.  And that's not factoring in anything that it's DOING in that check.  That's just memory access.  And that's just one region tile.  Also, it's just ONE z level of checks... if the fog can go up and down, that's 59904 memory searches for one Z level of neighbor-checking, not factoring in WHAT it's doing, just touching those memory spots.

So yeah.  It would hurt FPS.  Severely.

Science'd.

Another option, since we're talking semi-sentient killer fog, would be a few clouds of it that function something like a wild animal, perhaps one that generates inanimate, short-lived clouds as it moves. It wanders the evil biomes, moving towards living creatures that move near it, but not moving closer than X squares from a totem. This would let you build safe pathways about the place, outside which the fog lurks. Perhaps they expire after a certain time, and need to be refreshed or rebuilt (aside: sending out one dwarf into the area that is now unprotected from the evil killer fog of doom seems... grim. Like suicidally brave lamplighters). If the totems near the front of your base fail, then you're in trouble, as the fog sweeps through your halls unchecked.

And now I'm getting mental images of Victorian London meets dark magic meets the fog monster from Lost...
Logged

Sting_Auer

  • Bay Watcher
  • [LIKES_WAR_DOG_HORDES]
    • View Profile
Re: Evil Fog
« Reply #18 on: April 23, 2011, 10:42:27 pm »

I love that idea of fog creatures, and I also like making fog into a water-like substance, except self-replicating.

Perhaps the creature info could describe the fog beasts as fog in the shape of some creature, with tendrils of fog coming off of it.


I think I'll add that to the OP. Perhaps the fog creatures could only be created if the fog has reached a certain density?
Logged
Thank you everyone for the help! I've since flooded the fortress I was working on and now have a new one going up.

Zesty

  • Bay Watcher
    • View Profile
Re: Evil Fog
« Reply #19 on: April 23, 2011, 11:16:39 pm »

I like the whole "Totems warding off the evil fog" idea. It has a Crystal Chronicles feel to it.

Like Crystal Chronicles, I really love the concept, but probably won't love the gameplay.
Logged
Cuius est solum, eius est usque ad coelum et ad inferos

Jeoshua

  • Bay Watcher
  • God help me, I think I may be addicted to modding.
    • View Profile
Re: Evil Fog
« Reply #20 on: April 24, 2011, 10:05:50 am »

Hmm, while I'm still going to stick to the idea that the fog should be homogenous to keep FPS running smoothly... nothing disallows some creatures that simply have the same appearance as that fog from wandering around in it.  You wouldn't notice until you start getting attacked that there even ARE creatures in it.

Very scary.  I like that idea.  You could even make some of them Building Destroyers with Flee-quick.  That would make these fog monsters destroy your walls  (and yet flee at the slightest trouble, like kobolds do).

You know, that's actually a workable concept!  Evil fog shroud rolls in over the whole map, bringing random fog-critters with it that YOU CAN'T SEE because they're fog and just an in-game representation of what that whole evil fog cloud can do.
Logged
I like fortresses because they are still underground.

Sting_Auer

  • Bay Watcher
  • [LIKES_WAR_DOG_HORDES]
    • View Profile
Re: Evil Fog
« Reply #21 on: April 24, 2011, 10:09:22 am »

I've never played Crystal Chronicles. I actually based this idea off of an idea I had for minecraft a while back.


Crap Ninja'd

In reply to jeoshua, What do you mean by homogeneous?

Also, the creatures within the fog wouldn't be building destroyers, because the fog itself destroys structures slowly. I like the idea of flee-quick though, but it should only apply when they are outside of the fog. Basically, they would find shelter in the fog, but would be very timid when outside of it and would be easy to dispatch.

Perhaps there could be different kinds of fog beasts? A weak one that is sort of just a nuisance, then a few others that are larger, slower, and do more damage. Possibly even create their own fog?
Logged
Thank you everyone for the help! I've since flooded the fortress I was working on and now have a new one going up.

Jeoshua

  • Bay Watcher
  • God help me, I think I may be addicted to modding.
    • View Profile
Re: Evil Fog
« Reply #22 on: April 24, 2011, 10:21:09 am »

Homogenous means as-one-piece.  Meaning the fog rolls in on the map, not as a fluid but as something that takes place on a per-biome level.  I've previously examined above why fog-as-a-per-tile-fluid cannot possibly work.

You wouldn't notice the fog creatures, because they would look just like the fog.  They would be the agent through which the fog destroys the structures.  From the standpoint of the player, the fog rolls in, and the FOG starts destroying the buildings.  The player knows nothing of these fog creatures, because they're just the way in which the GAME does exactly what you're suggesting.

This method is the easiest to implement, because it uses already existing in-game mechanics to achieve things, instead of requiring the air itself to be somehow changed in order to be an agent.

As per the idea of different fog critters, I love it.  Some would attack those wandering through the fog, only to disappear and be replaced by another before you can blink.  Others would wander, sneakilly, out of the fog, like ambushers.

The thing they share, tho, would be that they could all look just like the fog.  Meaning that from the perspective of the player (nevermind how the game is working mechanically), the fog is killing you, and destroying your buildings, and reaching it's tendrils into your fortress and killing off your dwarves.
« Last Edit: April 24, 2011, 10:25:06 am by Jeoshua »
Logged
I like fortresses because they are still underground.

Sting_Auer

  • Bay Watcher
  • [LIKES_WAR_DOG_HORDES]
    • View Profile
Re: Evil Fog
« Reply #23 on: April 24, 2011, 10:27:34 am »

I honestly prefer the fog to be like water. It could flow like water, albeit MUCH more slowly, and automatically make more fog on top of itself.

a 1/7 fog would turn into a 2/7, then 3/7, etc.

Now of course, as soon as it got above 1/7 it would spread, but if fog spread at a very, VERY slow rate, and reproduced faster than that, then the fog that has been around earlier would be denser, while new fog would be more sparse.

Also, since it would spread very very slowly, it would cause a much smaller amount of lag.
Logged
Thank you everyone for the help! I've since flooded the fortress I was working on and now have a new one going up.

DrKillPatient

  • Bay Watcher
  • The yak falls infinitely
    • View Profile
Re: Evil Fog
« Reply #24 on: April 24, 2011, 10:35:51 am »

I'm fairly sure there is no way that you can do moving map-wide sentient angry fog of doom without massive lag. Jeoshua's idea seems very doable, and there's not much difference-- the creatures IN the fog can still be repelled, but the fog itself doesn't do those calculations.

I guess you could (maybe) do tiny miasma-like clouds that emerge from the nonliquid fog to swarm dwarves.
Logged
"Frankly, if you're hanging out with people who tell you to use v.begin() instead of &v[0], you need to rethink your social circle."
    Scott Meyers, Effective STL

I've written bash scripts to make using DF easier under Linux!

Jeoshua

  • Bay Watcher
  • God help me, I think I may be addicted to modding.
    • View Profile
Re: Evil Fog
« Reply #25 on: April 24, 2011, 10:46:14 am »

Oooh, they could even do the badger conga-line to become reaching fog-tentacles of doom.
Logged
I like fortresses because they are still underground.

Sting_Auer

  • Bay Watcher
  • [LIKES_WAR_DOG_HORDES]
    • View Profile
Re: Evil Fog
« Reply #26 on: April 24, 2011, 10:48:40 am »

Oooh, they could even do the badger conga-line to become reaching fog-tentacles of doom.

That's awesome.


I still like the idea of making the fog act as a super slow-flowing liquid. Since it flows uber slow, it would cause less lag.


I think I'll make the weak fog monsters spawn in lower-density fog, and go in a conga line formation , and the stronger ones will act more independently and spawn in denser fog.
Logged
Thank you everyone for the help! I've since flooded the fortress I was working on and now have a new one going up.

DrKillPatient

  • Bay Watcher
  • The yak falls infinitely
    • View Profile
Re: Evil Fog
« Reply #27 on: April 24, 2011, 11:02:20 am »

The problem isn't the speed at which it spreads,  but that it checks 6 tiles (up, down, left, right, front, back) at every single frame per fog tile.
Logged
"Frankly, if you're hanging out with people who tell you to use v.begin() instead of &v[0], you need to rethink your social circle."
    Scott Meyers, Effective STL

I've written bash scripts to make using DF easier under Linux!

Umune

  • Bay Watcher
  • Not all who wander are lost.
    • View Profile
Re: Evil Fog
« Reply #28 on: April 24, 2011, 02:58:03 pm »

I like the tendrils idea; it would be epic if the fog formed the spinning circles of pain that badgers form on my maps.
Perhaps limit the fog to outside, but make it so that it is attracted to meat, living or otherwise.
Wheel of Time anybody?
Logged

Jeoshua

  • Bay Watcher
  • God help me, I think I may be addicted to modding.
    • View Profile
Re: Evil Fog
« Reply #29 on: April 24, 2011, 10:36:45 pm »

The problem isn't the speed at which it spreads,  but that it checks 6 tiles (up, down, left, right, front, back) at every single frame per fog tile.

Yep.  See the last page for actual figures on just how memory intensive that would be.
Logged
I like fortresses because they are still underground.
Pages: 1 [2] 3