Posted by Gravecat at 1:14 pm under Programming, Remnant Core. Comments (2)
I know I said I wasn’t going to do any more major code re-writes, that Remnant Core was getting to the stage where I was really happy with its internal workings and had no particular urge to rebuild its core functions further. But like Archimedes discovering the displacement of water in his bathtub, I was suddenly struck with possibly the greatest idea I’ve had so far — and, more importantly, the method in which to implement this insane plan.
I’m talking, of course, about the third dimension. While I’d already planned on expanding the city-building algorithm to create buildings with multiple floors, I was struck by some fundamental flaws in that design: Could the player not simply run up a flight of stairs and be instantly safe from whatever horrors lurked below? Would time stop on anything but the current layer of building? None of this seemed terribly adequate for my grand designs, until suddenly the idea and method of execution popped into my head.
Now, I don’t want to explain how I’d implement this — something I believe I can reliably work into the existing 2D code in a matter of hours — but the plan would allow for some truly unique mechanics, such as explosions that not only damage the structure of the current level but the levels above and below, or perhaps a scenario I regaled a friend with while elaborating on the plan — the player could run up a flight of stairs and set a trap at the top for the following hordes of demonic horrors to run into, or perhaps destroy an outer wall with a grenade and jump out of the second floor, landing (and taking minor damage from the fall) on the street outside, having time to flee before the horrors catch up.
I think this’d add an extra dimension — if you’ll pardon the pun — of strategy and depth to the game, something which I honestly haven’t seen outside of Dwarf Fortress; most roguelikes treat each two-dimensional “floor” as a separate entity entirely. And let it not be said that I’m all talk; if this plan works out as well as I’ve imagined it in my head, I’ll be posting proof-of-concept screenshots the very moment I’ve got it working.
Keep your eyes peeled. Shit is about to get real.
Edit @ 2:58pm: Terrain data structures modified, three-dimensional world is now partially working. There’s a lot of things (e.g. dropping items) that are going to need work, monster AI still doesn’t work in 3D, LoS is broken but not difficult to fix. Gravity is going to be a bitch.
Edit @ 3:35pm: Line-of-sight, terrain flags and visibility fixed, “copypasta” routine used in area generation now 3D-compatible. Taking a break!
Edit @ 9:43pm: Things are more or less working great, including visibility to lower levels (standing on a rooftop looking down at the city, etc.), though it’s introduced a slew of new bugs and brought some obscure old ones to light which have been floating around since around 0.17 or so. This’ll take a few days to clean up. Screenshots soon!
Edit @ 11.00am: Oh dear god what. One of the bugs that’s surfaced could easily have been a part of the code since the very first version of the game. We’re talking 0.0.1 here. It’s become pretty ingrained and will take some effort to budge.
Churchwood — May 1st, 2010 @ 9:29 pm
Good luck! Sounds like you have some awesome ideas!
Lu — May 1st, 2010 @ 11:00 pm
So glad to hear things advanced so greatly in my absence. I kind of forgot to put an away message up (sorry about that!) when I went to see Iron Man 2. Either way, so looking forward to seeing some more of this work in action, I’m honestly a little bit excited about it!