Difference between revisions of "Third dimension in an ASCII-based roguelike"
ElectricEel (talk | contribs) m (Typos) |
|||
Line 93: | Line 93: | ||
*[[Dwarf Fortress]] | *[[Dwarf Fortress]] | ||
*[[Wish]], available at the [http://www.graveyard.uni.cc/ Roguelike Graveyard]. | *[[Wish]], available at the [http://www.graveyard.uni.cc/ Roguelike Graveyard]. | ||
*[[DungeonClimb]], available at [http://sourceforge.net/projects/dungeonclimb/] | |||
[[Category:Articles|Third dimension in an ASCII-based roguelike]] | [[Category:Articles|Third dimension in an ASCII-based roguelike]] |
Revision as of 19:43, 19 March 2008
Third dimension in an ASCII-based roguelike
Sounds crazy, eh? Well our world is apparently three dimensional. So why should a roguelike map be only 2D? Of course this article considers only the serious reality-based roguelike games - Crawl is 2D and it is fine.
So what do I mean "ASCII-3D-roguelike"? No, I don't want to add 3D-models and do a QuakeTT style game. What I'm thinking about is a 3D map, that also has a "z" component. Why the hell, you might think?
Advantages
- the possibility of really flying enemies (you can be overflown) without hacks.
- a truly 3D system of dungeons, where you can fall from a gallery, or climb up a ladder, or swim underwater... possibilities are endless.
- underwater action - cities, caves
- Thief-style game, where you sneak on top of the town's roofs, trying to sneak past the townguards. Moreover, a assassin on the roof... at last jumping and climbing comes in handy.
- a real ability to fly
- complicated interconnected Castle buildings, where you can actually walk around the roofs. A lot inspiration for political/assassin games.
- a truly mountainous landscape, hiding behind hills, charging downhill
- patrolling the city walls at night, trying to sight an enemy
- a real siege scenario
- and more...
Ok, so 3D is a NiceThing(tm). So why don't we plug it in?
Problems and Solutions
- a extended map object (space consumption, more coordinates)
- monster AI that takes into account the third dimension
- a new raytracer or light engine for three dimensions
- a way to represent elevation on the map
- and more...
Point number 1 is quite easy -- space isn't so much restricted (if you do level compression), the additional coordinate can be implemented easily (if you're doing it from the beginning, that is). Calculating distance may be done easy with the formula:
3D Distance = Max(D,H) + Min(D,H)/2 D = 2D Distance (x,y) H = Difference in height
Point 2 would still be possible, although you would have to remember to alter the spotting chance depending on the difference in elevation. Flying creatures are a little more tricky though. It is wise to change the cost of moving up and moving down for flying creatures and for walking ones as well (it's easier to run downhill then uphill).
It's point number 3 that will cause trouble, light has to be treated as a sphere and not a circle, and standing on the middle of a roof, you wont see what is just by the building's wall.
But the real killer is point 4. It still isn't a problem if you use graphics or more than 16 colors. But if you're trying to make a hardcore 16 color ASCII-based game -- then you're in trouble.
A way to do it is just to show the current elevation -- but then many possibilities are closed (you can't see from a roof where the guards on the bottom are). So we need some kind of representation for the lower levels (we ougth to have a representation for higher levels, but as far as I can think of it, it's pure science-fiction...). Another idea, taken from the UFO game is to have a key, to cycle through the levels -- seems good, but it's quite inconvenient to do that every time when you want to see what's happening below.
Of course you can treat higher elevation as seperate levels, but that seriously impairs on their interaction capabilities.
IMHO the best way to resolve this problem is to make all the squares below the player Dark Gray... but then, how will we see the light on them? I need more shades of Gray! There is a problem still with creatures flying high -- maybe a shadow on the ground (that is a gray tile?).
On the other hand, this could be a very good use case for 2.5D display system such as goggles that simulate 3D objects or even upcoming 3D display systems that no longer have a need for goggles. ("I, for one, welcome our 2.5D roguelikes" ;) )
Things to remember about
- gravity -- items dropped in air will fall, so will corpses of killed flying creatures. So will the player if his "Fly" spell ends...
- targeting -- here keys like PgUp PgDown for switching between levels would come in handy.
- hurling grenades over walls -- just think about it...
- explosions (e.g.fireball) -- do they affect creatures over you?
- jumping -- how to implement it?
- roofs -- there is a difference wether a tile is just empty, or non-existent -- that is a floor on level two seperates the levels, an air tile doesn't
- and more...
3D Roguelikes
- CastlevaniaRL and MetroidRL http://www.santiagoz.com/web
- Dwarf Fortress
- Wish, available at the Roguelike Graveyard.
- DungeonClimb, available at [1]