Pseudo-3D Dungeon View
by James Rozee · in Torque Game Builder · 03/11/2007 (2:58 pm) · 82 replies
Hi,
I was wondering if anyone has any information on creating the old style Pseudo-3D engines of the early 90s like Lands of Lore, Bard's Tale or Eye of the Beholder? They all used a slicing sprite type engine to mimic the 3D view. Does anyone have any resources on this? I'm looking to make an old fashion game.
Thanks.
James
I was wondering if anyone has any information on creating the old style Pseudo-3D engines of the early 90s like Lands of Lore, Bard's Tale or Eye of the Beholder? They all used a slicing sprite type engine to mimic the 3D view. Does anyone have any resources on this? I'm looking to make an old fashion game.
Thanks.
James
#42
I picked up Game Maker last weekend ... figured, what the hell, it's only $20 ... seriously, can you ever go wrong at $20? Even if it was a heaping pile, it wasn't a real loss ... and ... best thing was ... it wasn't a heaping a pile ... loved it ... Space Invaders took a little longer then I would have hoped, but thats because I did it all with point-and-click logic ... and it's funny, I'm a developer ... I'm used to working with logic ... but seriously, simplifying it to the point of not having any code??? OMFG ... I was lost ...
Great little tool though ... and I'll have to give it a whirl for that 3D thing ... though, I'm really looking at doing dungeon based stuff, not shooter stuff, but I don't think that really matters, just figure out how to convert a tile-map into a 3D view and control movement, viola ... I suppose ... ;)
And, so the thread doesn't go too far off topic ... I am progressing with the dungeon code, though I haven't really touched it much today ... still working on cleaning up the overall framework so it's a bit easier to use and I can start working on the directional changes ... then it's a matter of wrapping a UI around it, and maybe make a quick demo level that 'does something' ;)
03/14/2007 (7:05 pm)
Yeah, I've seen the tutorial, didn't go through it yet ... I picked up Game Maker last weekend ... figured, what the hell, it's only $20 ... seriously, can you ever go wrong at $20? Even if it was a heaping pile, it wasn't a real loss ... and ... best thing was ... it wasn't a heaping a pile ... loved it ... Space Invaders took a little longer then I would have hoped, but thats because I did it all with point-and-click logic ... and it's funny, I'm a developer ... I'm used to working with logic ... but seriously, simplifying it to the point of not having any code??? OMFG ... I was lost ...
Great little tool though ... and I'll have to give it a whirl for that 3D thing ... though, I'm really looking at doing dungeon based stuff, not shooter stuff, but I don't think that really matters, just figure out how to convert a tile-map into a 3D view and control movement, viola ... I suppose ... ;)
And, so the thread doesn't go too far off topic ... I am progressing with the dungeon code, though I haven't really touched it much today ... still working on cleaning up the overall framework so it's a bit easier to use and I can start working on the directional changes ... then it's a matter of wrapping a UI around it, and maybe make a quick demo level that 'does something' ;)
#43
However, you can use the advanced drawing functions to draw primitives with textures in 2D mode and so be able to fake the 3D. It seems that the texture size just has to be a power of 2. In addition, you can create surfaces and draw directly on them and then render to the screen. So you can have a smaller dungeon windows with 2D elements around it without any D3D wierdness.
You could also layer sprites over each other to contruct the dungeon view as well.
03/15/2007 (6:55 am)
Just for comparison, GM's tutorial is using a D3D. D3D does not work with the GM rooms in the same way as it does in 2D. 3D support in GM is nowhere near the abilities of TGE. However, you can use the advanced drawing functions to draw primitives with textures in 2D mode and so be able to fake the 3D. It seems that the texture size just has to be a power of 2. In addition, you can create surfaces and draw directly on them and then render to the screen. So you can have a smaller dungeon windows with 2D elements around it without any D3D wierdness.
You could also layer sprites over each other to contruct the dungeon view as well.
#44
I agree with what you said David Higgins, you cant go wrong for $20. Now some other people has come in I hope there will be some great updates to it. It is great little tool to play and develop with it.
03/15/2007 (7:52 am)
TGE is going to be better because it is 3d engine but for price of GM you can make some outstanding game with it. I have been working with GM for long time. I love the simple task you can do in GM. They also have alot tutorials to teach the engine. TGB is outstanding but require to much coding and coding is not my favorite thing to do. Also I am waiting for more tutorials to make jump in TGB.I agree with what you said David Higgins, you cant go wrong for $20. Now some other people has come in I hope there will be some great updates to it. It is great little tool to play and develop with it.
#45
On the other hand, TGB has a lot of potential. It's more a V8 engine compared to GM's 4 cylinders. But it is still immature and I'm having a hard time getting my brain around using it. I'm still learning the basics. However, I'm looking forward to seeing it advance -- especially in documentation. The last release was a really nice improvement. I can't wait for the next one. :)
03/15/2007 (9:25 am)
I couldn't agree more. GM is very easy to use and you can dip into the GML whenever you need to, within the same interface. It's a quick and productive tool, too. But GM just lacks the power of the T2D/Torque engine. But, hey, it is only $20. :)On the other hand, TGB has a lot of potential. It's more a V8 engine compared to GM's 4 cylinders. But it is still immature and I'm having a hard time getting my brain around using it. I'm still learning the basics. However, I'm looking forward to seeing it advance -- especially in documentation. The last release was a really nice improvement. I can't wait for the next one. :)
#46
TGB is not for the weak or the code challenged, and thats for sure, and I doubt it will ever have the ease of use of Game Maker -- TGB allows for the developer to literally do whatever they want ...
If I wanted to invest the time in it, I could make TGB capable of doing 3D Dungeons just like Game Maker does ... creating 3D Surfaces and mapping textures to them and rotating them to make the 'dungeon' ...
But I can also invest some time into TGB's code ... and get it to make me coffee in the morning -- if you think I'm joking, try me ...
Point is ... TGB has all the power you need ... it's just a matter of time on your part, as the developer, to get it to do what you want ... while on the other hand, Game Maker is limited in functionality, and you have little to no abilities to extend that functionality -- nor do you have the community that TGB has to help you do it ...
Point? TGB Kicks Ass ... so does Game Maker ... which would I buy? BOTH!
I'm currently doing some mock ups for games to make with Game Maker just because I can throw together prototypes in Game Maker in LITERALLY minutes ...
I have three kids, whose attention spans are very short ... so Game Maker is great for satisifying there "do it now daddy" attitudes ...
But TGB is also there to satisfy my "do it right and command it to make my coffee" needs :)
03/15/2007 (10:59 am)
TGB was, from my understanding, designed from the ground up to be an "everything" engine -- where as Game Maker, for example was designed from the ground up to do a specific thing -- it has since grown through it's various versions and is now capable of doing simple 3D ... but the life-cycle and evolution of the two engines is drastically different.TGB is not for the weak or the code challenged, and thats for sure, and I doubt it will ever have the ease of use of Game Maker -- TGB allows for the developer to literally do whatever they want ...
If I wanted to invest the time in it, I could make TGB capable of doing 3D Dungeons just like Game Maker does ... creating 3D Surfaces and mapping textures to them and rotating them to make the 'dungeon' ...
But I can also invest some time into TGB's code ... and get it to make me coffee in the morning -- if you think I'm joking, try me ...
Point is ... TGB has all the power you need ... it's just a matter of time on your part, as the developer, to get it to do what you want ... while on the other hand, Game Maker is limited in functionality, and you have little to no abilities to extend that functionality -- nor do you have the community that TGB has to help you do it ...
Point? TGB Kicks Ass ... so does Game Maker ... which would I buy? BOTH!
I'm currently doing some mock ups for games to make with Game Maker just because I can throw together prototypes in Game Maker in LITERALLY minutes ...
I have three kids, whose attention spans are very short ... so Game Maker is great for satisifying there "do it now daddy" attitudes ...
But TGB is also there to satisfy my "do it right and command it to make my coffee" needs :)
#47
Has anyone purchased the Torque book and found it useful for TGB? I'm a big fan of reference books. :) I've read quite a bit of what's on TDN for TGB but I think I'm missing some of the basic concepts. I'm just wondering if that book would help. Once I get the concepts straight in my head, the programming wont be a problem.
03/15/2007 (11:43 am)
TGB does make a mean cup of Joe -- a little strong but all in all not half bad. Which is good 'cause it keeps you up half of the night coding. However, it does tend to wake me up early in the morning for a walk, which I don't like that much. But, hey, developer's best friend and all that. ;) Has anyone purchased the Torque book and found it useful for TGB? I'm a big fan of reference books. :) I've read quite a bit of what's on TDN for TGB but I think I'm missing some of the basic concepts. I'm just wondering if that book would help. Once I get the concepts straight in my head, the programming wont be a problem.
#48
Though, the yellow book may be more useful, I'm not entirely sure ... I haven't really had a chance to browse through it yet -- the 3D All in One books seem entirely useless for TGB though ...
03/15/2007 (12:26 pm)
I would be very surprised if any of the Torque books are useful for TGB -- outside of the scope of the TorqueScript they might teach you ... and most of the TorqueScript I've seen taught in those books is very generic ... Though, the yellow book may be more useful, I'm not entirely sure ... I haven't really had a chance to browse through it yet -- the 3D All in One books seem entirely useless for TGB though ...
#49
I did however, take the liberty to tweak the artwork just a tad ... I added some 'debug' outlines and text to the textures so I knew what I was drawing, and if I was drawing it in the right place ... ;)
All of these images are rendered looking down a hallway, using a tile-map that has a t-junction hallway down the hallway, as well as a 'right turn' at the end ... the images were taken at various 'steps' down the hallway ...
First up, is the 'imageMap' I'm using,
I've reduced this in size, it's true dimensions are 1024x641 ... the large cyan section on the top-right actually contains a 1 pixel grey square as the 5th frame ... and yes, for those math freaks who are watching, the image map is not properly sized, haha ... I goofed, but the images work since the actual 'size' used is part of the render systems config ... it should be 1028, or 1030 ... the frames are 512x512 and 128x512 and 512x128 and 1x1 ... depending on what were looking at ...
Most of these images are just mirror/flip versions of each other, but this image map allows for the ceiling and the floor to differ, and the left and right walls to differ, as well as the front-facing wall ...
Now, are you asking why theres two frames of 'grey' ... hehe, if you are ... it's a test for simulating 'lighting' using the shadows as overlays to simulate 'shadows' ... I believe with enough care taken, we can simulate lighting in this pseudo-3d environment, with an over-excessive amount of art assets ..
For those of you who are impatient, and can't wait ... here's the images thus far ... and erm ... if your drooling, please, be kind ... wipe up the desk before your wife uses the keyboard next ... k?






03/17/2007 (10:37 pm)
Yay, got some updates ... screens are more or less the same, new artwork ... contributed by James, thank you ...I did however, take the liberty to tweak the artwork just a tad ... I added some 'debug' outlines and text to the textures so I knew what I was drawing, and if I was drawing it in the right place ... ;)
All of these images are rendered looking down a hallway, using a tile-map that has a t-junction hallway down the hallway, as well as a 'right turn' at the end ... the images were taken at various 'steps' down the hallway ...
First up, is the 'imageMap' I'm using,
I've reduced this in size, it's true dimensions are 1024x641 ... the large cyan section on the top-right actually contains a 1 pixel grey square as the 5th frame ... and yes, for those math freaks who are watching, the image map is not properly sized, haha ... I goofed, but the images work since the actual 'size' used is part of the render systems config ... it should be 1028, or 1030 ... the frames are 512x512 and 128x512 and 512x128 and 1x1 ... depending on what were looking at ...
Most of these images are just mirror/flip versions of each other, but this image map allows for the ceiling and the floor to differ, and the left and right walls to differ, as well as the front-facing wall ...
Now, are you asking why theres two frames of 'grey' ... hehe, if you are ... it's a test for simulating 'lighting' using the shadows as overlays to simulate 'shadows' ... I believe with enough care taken, we can simulate lighting in this pseudo-3d environment, with an over-excessive amount of art assets ..
For those of you who are impatient, and can't wait ... here's the images thus far ... and erm ... if your drooling, please, be kind ... wipe up the desk before your wife uses the keyboard next ... k?





#50
I've spent the week cleaning up the code I wrote, and it is now 100% full functional for a "walk down the hall" ... and ... wait for it ... ITS READABLE AND MAKES SENSE ... Yep, I took out all of the whacky error(), warn() and echo() statements ... so the console doesn't get flooded anymore ... I removed all of my "comments" (I tend to write rather vulger comments next to troublesome lines) ... I also reorganized the way everything works too ...
For the most part, everythings dynamic ... I've not yet tested it, but you should be able to drop in any art assets you want that are scaled by any factor you as the artist decide ... all of these are set using Dynamic Fields attached to the Tile-Layer that acts as the "map" ...
I've also fixed up some bugs ... I found a reason to use "setBlendColor" while testing this week too ... I'd set the blendcolor of a sprite after creating it ... so I could see if the Left Hallway walls were rendering properly, etc ... I thought they were ... they looked like they were, but ... since the textures are damn near seamless ... it was hard to really tell ... moving them up a layer on the scenegraph and blending them ... made them stick out like sore thumbs ... and I found out my math was just a hair off ... so I fixed that too ...
03/17/2007 (10:42 pm)
Oh and, as a follow-up ... the first rendered image ... the ceiling and floor are not rendered because of how i implemented my "Start Location" code ... which is still a remnant from the original prototype code ...I've spent the week cleaning up the code I wrote, and it is now 100% full functional for a "walk down the hall" ... and ... wait for it ... ITS READABLE AND MAKES SENSE ... Yep, I took out all of the whacky error(), warn() and echo() statements ... so the console doesn't get flooded anymore ... I removed all of my "comments" (I tend to write rather vulger comments next to troublesome lines) ... I also reorganized the way everything works too ...
For the most part, everythings dynamic ... I've not yet tested it, but you should be able to drop in any art assets you want that are scaled by any factor you as the artist decide ... all of these are set using Dynamic Fields attached to the Tile-Layer that acts as the "map" ...
I've also fixed up some bugs ... I found a reason to use "setBlendColor" while testing this week too ... I'd set the blendcolor of a sprite after creating it ... so I could see if the Left Hallway walls were rendering properly, etc ... I thought they were ... they looked like they were, but ... since the textures are damn near seamless ... it was hard to really tell ... moving them up a layer on the scenegraph and blending them ... made them stick out like sore thumbs ... and I found out my math was just a hair off ... so I fixed that too ...
#51
03/18/2007 (6:09 am)
Wow that is fantastic!
#53
03/18/2007 (8:51 am)
Outstanding work, you going to release this as a resource or tutorial.
#54
i126.photobucket.com/albums/p108/ollie_obvious/gamedev/dungeoncrawlconceptv2.jpg
The problem is, it's a bit harder to make the sprites but I think it's worth the efford.
03/18/2007 (8:54 am)
I would move the PoV a bit upwards.. it looks much cooler if it's not all centric. :)i126.photobucket.com/albums/p108/ollie_obvious/gamedev/dungeoncrawlconceptv2.jpg
The problem is, it's a bit harder to make the sprites but I think it's worth the efford.
#55
03/18/2007 (9:14 am)
@david - awesome, I've always thought about making a modern Wizardry game. I look forward to reading your finalized sample code (or mini-tutorial).
#56
03/18/2007 (11:32 am)
Very nice! I'm glad the artwork came in handy. It looks pretty good. I'll send you another batch tomorrow. :)
#57
@Oliver ... I actually have skeleton code to allow you to set the POV, I'm experimenting with various different ways to do it ... one of which is drawing everything using 0,0 as an anchor, then moving the camera to set the POV ... another is leaving the camera at 0,0 and offsetting the graphics ...
I have some hand-placed artwork in level builder (that gets cleared when I play test), and I experimented with both options in level builder using the current artwork, and it achieves a fairly nice look ...
the concept art you provided should be possible with the final render system ... provided the artwork and the offsets used in the render system are matched together well ...
simply put, the system is dynamic ... you should be able to pair it up with any number of artwork, the only real suggestion so far is to use power of 2 sprites ... for example the 'front view wall' is 512x512 and the perspective walls, ceiling and floor are 128x512 or 512x128 depending on whether they are perspective or not ...
03/18/2007 (11:35 am)
Thank you all ...@Oliver ... I actually have skeleton code to allow you to set the POV, I'm experimenting with various different ways to do it ... one of which is drawing everything using 0,0 as an anchor, then moving the camera to set the POV ... another is leaving the camera at 0,0 and offsetting the graphics ...
I have some hand-placed artwork in level builder (that gets cleared when I play test), and I experimented with both options in level builder using the current artwork, and it achieves a fairly nice look ...
the concept art you provided should be possible with the final render system ... provided the artwork and the offsets used in the render system are matched together well ...
simply put, the system is dynamic ... you should be able to pair it up with any number of artwork, the only real suggestion so far is to use power of 2 sprites ... for example the 'front view wall' is 512x512 and the perspective walls, ceiling and floor are 128x512 or 512x128 depending on whether they are perspective or not ...
#58
03/18/2007 (11:38 am)
@Fucifer, I have not come to a final decision on what I'll be doing with the code base ... but I'm toying with the idea of making it a commercial 'code pack' ... or a 'kit', much like the Adventure Kit ... but we'll see where things go ...
#59
I tested a few various things, and "0 -24" seems to be a good value ... using an 800x600 resolution, and a 100x75 camera width/height ...
This is, of course, configurable ... :)
03/18/2007 (1:04 pm)
Ok -- I've decided to go with a "POV" field on the tile-layer, which, on the first call to 'updateScene', sets the camera position to the POV location ...I tested a few various things, and "0 -24" seems to be a good value ... using an 800x600 resolution, and a 100x75 camera width/height ...
This is, of course, configurable ... :)
Torque Owner Fucifer
www.gamemaker.nl/tutorial.html