Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign up3-dimensional Z-level support, Core Part 1: extend map class to 3D [$330] #6818
Comments
This was referenced Mar 21, 2014
GlyphGryph
added
Bug
and removed
Bug
labels
Mar 21, 2014
GlyphGryph
changed the title
Basic 3-dimensional Z-level support, part 1
3-dimensional Z-level support, Core Part 1
Mar 21, 2014
i2amroy
added
the
Bounty Issue
label
Mar 23, 2014
This comment has been minimized.
This comment has been minimized.
|
I'll be tackling this, but progress will likely be slow during my semester. See my current estimate of what needs to be done here: I'll put up a branch, soon. |
This comment has been minimized.
This comment has been minimized.
|
Great. Should I update the tickets with those requirements? Also, I will try and get the bounties up for each of them - How much do you think they are each worth? |
This comment has been minimized.
This comment has been minimized.
Bear in mind that underground is now Unpredictable since players can dig a downstair wherever they like. Not sure what that'll affect but wanted to make sure it's on the radar. |
This comment has been minimized.
This comment has been minimized.
Thanks for the reminder. Stuff like this ought to be handled automatically as long as it uses the appropriate accessors to change terrain(set_ter etc). |
CIB
added a commit
to CIB/Cataclysm-DDA
that referenced
this issue
Apr 9, 2014
This was referenced Apr 9, 2014
kevingranade
changed the title
3-dimensional Z-level support, Core Part 1
3-dimensional Z-level support, Core Part 1: extend map class to 3D
Apr 10, 2014
This comment has been minimized.
This comment has been minimized.
|
I was stuck on how to integrate reality bubble with z-levels cleanly so I wrote a document. |
This comment has been minimized.
This comment has been minimized.
|
You might be overthinking it, I was envisioning simply having X* vertical *X = 21 for a first approximation.
|
This comment has been minimized.
This comment has been minimized.
|
Maybe, I just don't really see that being any less effort, but it's definitely less flexible. |
This comment has been minimized.
This comment has been minimized.
|
I'm gonna throw out that 10 aboveground levels is probably good enough for game purposes. There are 11+ story buildings in New England, granted, but from a gameplay standpoint there isn't much one can do on the 12th floor that one can't do on the 10th floor. (Flying vehicles might want to go higher, but we could make a designated "airborne" level for folks who want to be assured that they won't crash into anything, at the expense of significant difficulty interacting with stuff on the ground.) Put it another way: how many different "office building", "hotel/apartment", etc floors can we realistically expect people to explore? After a while they will start running together. If places need more room, I'm thinking skybridge or simply 3x3 skyscraper. With basements being diggable to z-10, 21 levels should suffice for present purposes and keep things somewhat manageable for older systems. |
This comment has been minimized.
This comment has been minimized.
|
Mhm.. yeah, I guess all the work that needs doing for z map shifting is optional. But it will NOT make things more managable for old systems, because I was planning on having only 11 z-levels loaded at a time, not 21, whereas z-map-shifting would happen only very rarely, so that's not really an impact on performance at all. Another concern is configurability. With this max-z-level approach, you can't just go and say "only 1 z-level at a time", and things will magically speed up. You'd still have all that overhead for loading lots of z-levels into the map each time map::shift is called, even if only 1 z-level is used for lightmap calc etc. |
This comment has been minimized.
This comment has been minimized.
|
Note: My primary concern here isn't old desktop computers, those will probably be fine. But we did at one point have a working android version, and I also plan to port the game to the dingoo I ordered, and here that configurability really matters. |
This comment has been minimized.
This comment has been minimized.
|
The other question is, when can you PROVE that you don't need certain |
This comment has been minimized.
This comment has been minimized.
|
I'm fine with coding with static z-levels and then adding shifting on demand. Regarding RAM usage, my dingoo has 32 MB of RAM, I will probably ahve to look into other kinds of optimizations for that anyway. But what I was concerned about was having to LOTS of copying for the caches, not the RAM usage itself. |
This comment has been minimized.
This comment has been minimized.
ClockworkZombie
commented
Apr 14, 2014
|
So... I've made it at least as far as implementing the changes described in this issue at least four times, and scrapped those changes out of frustration at least as many times after a dozen or a few dozen steps further into overhauling things. Is this really the sort of thing people would be OK with merging? How functional is this supposed to be? Do callers need to be re-written to actually use the updated 3D functions? The biggest issue I've run into is that there's a rat's nest of bad caller assumptions that have implications when more than one level is active at a time. This can be simplified a bit by making sweeping generalizations such as that character actions can only be performed on the current level (world_Z or g->u.zpos, what have you), but this is the sort of thing that's just going to have to be re-written in the future. |
This comment has been minimized.
This comment has been minimized.
|
And that's why it's a bounty issue. These would need to be handled at least wit the others in mind, but a clean (and properly documented, so others can pick up on it--avoiding problems if the original coder disappears) implementation of one would likely get merged. |
This comment has been minimized.
This comment has been minimized.
|
Yea, updating the callers is the real pain point here, and is necessary. |
This comment has been minimized.
This comment has been minimized.
|
Yeah my progress is slow mostly because I'm trying to do as much groundwork as possible that can be merged without actually doing the 3d transition. As you can see from the issues popping up, even my harmless refactors can create problems, so I'm really wary of doing a large 2d->3d refactor without first having laid the requirements to make the process as simple as possible. |
This comment has been minimized.
This comment has been minimized.
|
@GlyphGryph: Following the recent discussion, these won't be necessary anymore:
Instead we'll simply have all z-levels loaded into the game at all times, and call map::shift only for x/y transitions as we do now. I might rework the TODO list in general when I have time. |
GlyphGryph commentedMar 21, 2014
Master Ticket #6822
This will be a "bounty issue" for the development of z-line track development.
This has following requirements:
Expand the "map" object to encompass alternate z-levels
CiB's estimate of required task components:
Did you help close this issue? Go claim the $330 bounty on Bountysource.