Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Dynamic z-levels  (Read 1081 times)

gurra_geban

  • Bay Watcher
    • View Profile
Dynamic z-levels
« on: June 30, 2008, 07:53:48 am »

Ok, came up with this idea after playing a hugely successful but FPS-wise slow fort. I chose the fattest location, with a huge caveriver and 80 total z-levels (yeah i know this is madness). Later on at 80 dorfs my FPS dropped to 25-30, and i didnt have anything to manage really.

So, my suggestion is this:

Let the player decide, in-game how many z-levels he wants to view, apart from the z-levels that display the aboveground area of his start location and maybe 3 sky levels or so. This would remove the unneccesary sky levels when digging into a mountain or the excess levels of rock when building your settlement aboveground. Also, this would mean that the player could also increase the amount of z-levels, allowing taller towers and deeper caves.
Logged
een failing lately?

zagibu

  • Bay Watcher
    • View Profile
Re: Dynamic z-levels
« Reply #1 on: June 30, 2008, 08:12:25 am »

What do you mean with "view"? To improve performance, they would have to be cut from the local map, so that no computing would be done at all for these layers.
Logged
99 barrels of beer in the pile
99 barrels of beer!
If some dwarves know the way to the pile
0 barrels of beer in the pile!

Align

  • Bay Watcher
    • View Profile
Re: Dynamic z-levels
« Reply #2 on: June 30, 2008, 08:36:31 am »

Why does the size of the map affect performance anyway? Seems like everything except animals and dwarves is inert and don't need no computing.
Logged
My stray dogs often chase fire imps back into the magma pipe and then continue fighting while burning and drowning in the lava. Truly their loyalty knows no bounds, but perhaps it should.

Kappas

  • Bay Watcher
    • View Profile
Re: Dynamic z-levels
« Reply #3 on: June 30, 2008, 09:29:08 am »

Why does the size of the map affect performance anyway? Seems like everything except animals and dwarves is inert and don't need no computing.
Perhaps it is for pathfinding or something else with AI? Bigger size -> more tiles to consider as a part of a path.
Logged

Anfold

  • Bay Watcher
    • View Profile
Re: Dynamic z-levels
« Reply #4 on: June 30, 2008, 10:05:05 am »

Why does the size of the map affect performance anyway? Seems like everything except animals and dwarves is inert and don't need no computing.
Perhaps it is for pathfinding or something else with AI? Bigger size -> more tiles to consider as a part of a path.

That.. or for every z-level you are basicly adding an entire new 2-d map.  That's Z different X x Y x Z maps to load into memory, which can add up to quite a large amount.
Logged

Draco18s

  • Bay Watcher
    • View Profile
Re: Dynamic z-levels
« Reply #5 on: June 30, 2008, 11:03:12 am »

The map is already divided into blocks and sky blocks are already not loaded into memory (thus if you have a tower off in one corner of the map, the sky levels below the top aren't loaded in the opposite corner).  Ditto underground.
Logged

zagibu

  • Bay Watcher
    • View Profile
Re: Dynamic z-levels
« Reply #6 on: June 30, 2008, 11:28:34 am »

Makes sense if you think how you have to designate the bottom-most layer to be mined out when working with reveal. That probably forces the game to load all these tiles into memory.
Logged
99 barrels of beer in the pile
99 barrels of beer!
If some dwarves know the way to the pile
0 barrels of beer in the pile!

Draco18s

  • Bay Watcher
    • View Profile
Re: Dynamic z-levels
« Reply #7 on: June 30, 2008, 11:56:38 am »

That is exactly what it does.  I believe Reveal's instructions state as much.
Logged

Align

  • Bay Watcher
    • View Profile
Re: Dynamic z-levels
« Reply #8 on: June 30, 2008, 05:14:12 pm »

Regardless, unless it's the CPU memory rather than the RAM it shouldn't affect speed.
Logged
My stray dogs often chase fire imps back into the magma pipe and then continue fighting while burning and drowning in the lava. Truly their loyalty knows no bounds, but perhaps it should.

Puzzlemaker

  • Bay Watcher
    • View Profile
Logged
The mark of the immature man is that he wants to die nobly for a cause, while the mark of the mature man is that he wants to live humbly for one.

wallish

  • Bay Watcher
    • View Profile
Re: Dynamic z-levels
« Reply #10 on: June 30, 2008, 09:29:54 pm »

Why does the size of the map affect performance anyway? Seems like everything except animals and dwarves is inert and don't need no computing.

Just for the hell of it I decided to start a fortress with the max map size.  However, I chose no river for this test (there was magma and _small_ chasm though).  I had 25-30 fps, surprisingly.  Then again, that was only with the seven dwarves and 100+ creatures running around.
Logged

ArchMageOmega

  • Bay Watcher
    • View Profile
Re: Dynamic z-levels
« Reply #11 on: July 01, 2008, 12:58:14 am »

It's been a little while, but at one point I had started a full-sized map on an ocean tile with land on either side (with the intent to build a bridge across the ocean :)). I don't remember the exact FPS, but with only the starting dwarves, it wasn't running too badly.
Logged