Second floors?

Started by Mufflamingo, January 12, 2016, 07:43:13 AM

Previous topic - Next topic

Mufflamingo

As the title says, is it possible to have upper floors?
Bleeeee. . . . .

MarcTheMerc

Short answer no, long answer noooooooooooooooooooooooooooooooooooooooooo.

However it is possible but would take alot of work for z levels and the every tile of the map would have to be rendered for every floor. Also ai pathing would need overhauling.
"So weird looking, like a twisted hulk of man and machine both scary and... well scary i mean it would look like a crab with limbs on limbs."

Yay i have a mod now ''https://ludeon.com/forums/index.php?topic=20513.0''; It adds mercs

Fluffy (l2032)

not going to happen.

Besides just not being the point (this isn't dwarf fortress, no matter how much some of us would like it to be), it's a huge increase in requirements for an already heavily overworked pathfinding system. Keep in mind that every z-level adds basically a whole new map, the number of squares in a normal map is x * y, with z levels it'd be x * y * z; a nearly quadratic increase in number of squares, and thus the difficulty of pathfinding.

On a more practical note, the game is built in unity engine, which uses vectors of length three a lot internally, these are x,y,z coordinates. You might think that makes it easy to do z-levels, but the game actually uses the z coordinate for 'normal' height/size calculations of buildings, pawns, etc. Changing all that so it would work with z levels is pretty much a fundamental rewrite of huge parts of the game.

jzero

I think besides all the reasons the guy before me mentioned one of the reasons this game can't handle that compared to dwarf fortress is that in dwarf fortress the graphics (at least the default one anyway) is VERY simple and so it isn't that hard to render.
Where as in Rimworld the graphics are pretty good and it would literally take about as long as it takes to load your map when you start the game EVERY time you went up or down a z-level. and in addition to that the gunplay wouldn't really work unless the whole view thing only shows the second floors of buildings. It wouldn't make sense if once a colonist shot, the bullet disappeared, and you went down a level to see what happened. While this would be great and all, it just won't happen
Actual cannibal shia labeouf.

Headshotkill

Quote from: pothangaena on January 12, 2016, 07:43:13 AM
As the title says, is it possible to have upper floors?

I think when you start asking for multiple Z-levels, it's time to try out Dwarf Fortress, Rimworld acts as a wonderfull tutorial for it.

Fluffy (l2032)

Quote from: jzero on January 15, 2016, 03:34:56 PM
I think besides all the reasons the guy before me mentioned one of the reasons this game can't handle that compared to dwarf fortress is that in dwarf fortress the graphics (at least the default one anyway) is VERY simple and so it isn't that hard to render.
Where as in Rimworld the graphics are pretty good and it would literally take about as long as it takes to load your map when you start the game EVERY time you went up or down a z-level. and in addition to that the gunplay wouldn't really work unless the whole view thing only shows the second floors of buildings. It wouldn't make sense if once a colonist shot, the bullet disappeared, and you went down a level to see what happened. While this would be great and all, it just won't happen
Actually, graphics aren't really the issue.

There's two reasons this is not going to happen;
The existing code is just not set up to deal with z-levels. It would require pretty much a complete rewrite of large parts of the code.
Pathfinding complexity would increase exponentially. You're going from a plane (x * y) to a cube ( x * y * z ). I know you're not suggesting more that two levels, but if z-levels were to be done you might as well do it properly. In that case, assuming a map size of 150 * 150, you're looking at a 22.500 cell map. Each z level adds another 22.500, so in a very naive calculation the complexity of pathfinding is increased nz-fold, where nz is the number of z levels. I'm sure there's tricks to be done to decrease this somewhat, but if you realise that pathfinding is already the most complex part of the game, you'll pretty soon realise that z-levels are not really feasible without a massive paradigm shift in the game the works.

TLDR;
Not gonna happen, Ty might as well code a new game instead.

blub01

one thing I'm always wondering, why is it so hard to do z-levels in rimworld, when minecraft for example has them, and actually has more stuff loaded in than rimworld on high render distances. I mean, one chunk contains 16*16*256 blocks, and you can have a render distance of 12 chunks. I don't remember if that means a square with a side length of 24 chunks (or 12), or if it's an approximate circle, but that is way more than rimworld does in any case. so again, why is it an issue for rimworld? also, the problem with only being able to view single layers could be solved by ditching the top-down view for a first person camera.
Quote from: Zobaken on September 02, 2015, 12:37:37 AM
1. Please make people unable to move through deep waters. I don't like raiders cosplaying Jesus.

Fluffy (l2032)

It's not rendering that's the main issue, it's pathfinding and finding items.

Adding z-levels exponentially increases the complexity of both. While finding items can be to some extent trivialized by keeping lists of item locations, z-levels would increase the amount and size of such lists. Pathfinding is a bigger issue, as it is much more dynamic. Z-levels just add many more options in how to get from A to B. There's plenty of optimization tricks that can (and are) done, but the net result remains; z-levels make things much harder - unless some major simplifications are used (e.g. dwarf fortress counts z levels as being 1 'distance' away, regardless of the path that dwarves actually have to take to get there).

I'm not big on minecraft, but my understanding is that there's not that many AI entities walking around on the map, and those that do mostly either wander or follow (attack) the player, both of which are fairly trivial. Compare that with RimWorld where there can be quite a few pawns (colonists, visitors, raids and animals) each of whom try to first find a job to do. Finding a job usually requires several checks; a) can I reach it? b) are the materials I need available? c) how do I get there?. The first two are highly optimized but can still be quite resource hungry, the third is the pathfinding problem, and takes the most time. Then take into account that each of these pawns goes through this every time it tries to find something to do, and you're hopefully starting to see the problem.

Ectoplasm

Somewhere out there's a darkened room. A room which last saw sunlight over a decade ago. The door hinges are rusted stiff, and creak from lack of use, the bottom of the door jams barely one fifth open. The floor is littered with empty energy drink cans. Old copies of MS-DOS monthly are strewn across the floor, and in one corner is a stack of very well used Sears Lingerie Catalogs, the stack reaches almost to the ceiling.

The only source of light is from a single low wattage bulb dangling precariously from thread bares wires. The distinct click click click of a mechanical keyboard denotes someone hard at work. And in the furthest, darkest corner, where daylight is eon aged memory, a huddled figure suddenly stops working. Tynan decides there and then that Z-levels and multi thread support will be in Rimworld II.

One thing at a time though, alpha 13 is due. Click Click Click.

skullywag

Thread was worth it just for that ^ *claps*
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

blub01

Quote from: Fluffy (l2032) on January 22, 2016, 08:11:58 AM
It's not rendering that's the main issue, it's pathfinding and finding items.

Adding z-levels exponentially increases the complexity of both. While finding items can be to some extent trivialized by keeping lists of item locations, z-levels would increase the amount and size of such lists. Pathfinding is a bigger issue, as it is much more dynamic. Z-levels just add many more options in how to get from A to B. There's plenty of optimization tricks that can (and are) done, but the net result remains; z-levels make things much harder - unless some major simplifications are used (e.g. dwarf fortress counts z levels as being 1 'distance' away, regardless of the path that dwarves actually have to take to get there).

I'm not big on minecraft, but my understanding is that there's not that many AI entities walking around on the map, and those that do mostly either wander or follow (attack) the player, both of which are fairly trivial. Compare that with RimWorld where there can be quite a few pawns (colonists, visitors, raids and animals) each of whom try to first find a job to do. Finding a job usually requires several checks; a) can I reach it? b) are the materials I need available? c) how do I get there?. The first two are highly optimized but can still be quite resource hungry, the third is the pathfinding problem, and takes the most time. Then take into account that each of these pawns goes through this every time it tries to find something to do, and you're hopefully starting to see the problem.

yes, finding a job might be tough on the cpu, especially for the more complicated ones, but these checks don't happen that often for pawns. and pathfinding ought to be much simpler when there aren't that many places where you can go from one level to the next. just keep a list of them, and select the closest one that leads to the intended level. that should reduce pathfinding to mostly 2d again, right? also, I'm pretty sure there can be quite a few mobs around in minecraft, maybe like 30 or so at least. so until you get to 40+ tribal raids, that should work, right?
Quote from: Zobaken on September 02, 2015, 12:37:37 AM
1. Please make people unable to move through deep waters. I don't like raiders cosplaying Jesus.

Fluffy (l2032)

Finding jobs happens more often than you think, especially when pawns are currently idle.
There's typically 3 colonists and several dozen animals on the map from the start. Late-game colonies can theoretically have hundreds of colonists (though 20~ might be more reasonable), and raids can start going into the hundreds.
Optimizations are certainly possible, but the simple fact remains that the quantity of available paths just increases dramatically.
All that aside, the changes to the code would be _very_ dramatic.

killer117

i dont really see the point. i ussually ave the problem of loads of building space and empty rooms and nothing to do except turn them into storage rooms. tbh id prefer content over Z lvls. give me some stuff to build so i need the space in an upper floor, but until then, ive got too much space as is.
Whats Rimworld without a little cannabilism/ murder/ maniacs/ crazy tribes/ nasty pirates/ nutcase animals/ genocidal robots etc.

LouisTBR

Great idea. HUGE ask. You see, although it seems like a really good addition to the game, there are some underlying factors that make it nearly impossible:

Pathing: Pathing is already a tedious affair to get it working, and with the addition of second floors it will need double the programming
Visuals: Rimworld is top-down view, which will make two levels a bit odd. You could counter this with a Sims-like 'Up Floor' button, but that would be annoying to constantly use

Raids: Raids would be completely pointless, as you could just hide all your colonists upstairs and wait for the raiders to get bored and leave

Access: Staircases? They would take up loads of space. Elevators? Good luck programming them to work properly

See what I mean? You are by far not the first person to suggest such addition. Again, great idea, HUGE ask on the developer's half.
Only in RimWorld is the phrase "31 Heavily-Armed Siegers are currently bombing your base" preferable to "50 manhunting squirrels are attacking your colony"

blub01

Quote from: Louisthebadassrimworlder on January 27, 2016, 06:42:03 AM
Raids: Raids would be completely pointless, as you could just hide all your colonists upstairs and wait for the raiders to get bored and leave

until the raiders burn the wall supporting the upstairs.
Quote from: Zobaken on September 02, 2015, 12:37:37 AM
1. Please make people unable to move through deep waters. I don't like raiders cosplaying Jesus.