Previous Blog Next Blog
Prev/Next Blog
by date

Frustration can be a good thing

Frustration can be a good thing
Name:Rob Parton
Date Posted:Mar 06, 2007
Rating:4.0 out of 5
Public:YES
Comments:YES
RSS Feed:GarageGames Blog feedor Subscribe with .
Profile Page:View profile page for Rob Parton

Blog post
The last few days I've grown bored at work without a lot to do. When I get home I fiddle with some interiors, trying to come up with a nice crypt or dungeon level. However, no matter how much I try to make it look acceptable to me, it always comes up short.

The solution: a tileset. In theory, I should only have to make each tile once, and then just paste them together in a mission to get the right layout!

I started sitting around on my lunchbreak (if 9pm counts as lunch), and came up with the 14 basic tiles:


I started making the tiles in Quark at 12pm today. After about 30 minutes, I had all 14 basic tiles done:


Every tile is exactly 8 Torque units wide, so placing them is relatively easy. So easy in fact that it's faster to just draw the level layout in tiles on paper or even in MSPaint, and then just write the MIS file in Notepad... The only small issue I had was when rotating some tiles, but it didn't take long to piece that together either.

This is an extremely basic tileset. It doesn't include doors, stairs, windows, anything like that. It would be very easy to add more tiles, or prefab rooms as well.

But for now, here's a few shots of the tileset in action, from a number of angles.

Again: This only took me 30 minutes in Quark!







I think I may take some time off from doing interface coding and instead make a few tilesets. :)

Recent Blog Posts
List:10/04/07 - Thoughtbomb
03/06/07 - Frustration can be a good thing
02/02/07 - Minor Update and GuiWindowCtrl Gripe/Fix?
01/02/07 - New Year brings new things!
09/24/06 - Musings and Future Plans
09/03/06 - Time gets in the way
08/19/06 - GuiSkinnedButton Test #1
08/14/06 - Moving Day & UI Component Ideas

Submit ResourceSubmit your own resources!

Dave Young   (Mar 06, 2007 at 20:15 GMT)
That looks a lot better than I thought it would... the downside I think is the lack of portalling, but the lighting looks even across pieces. I am also surprised that there is no crashing, it was a long held thought to me 2 DIFS touching would crash the engine.

Cool!

David Montgomery-Blake   (Mar 06, 2007 at 20:35 GMT)
@Dave
DIFs in DIFs were a portaling problem, but I did not have a problem connecting DIF pieces (unless they overlapped and caused portal confusion).

Cool!

Edward F. Maurina III   (Mar 06, 2007 at 20:41 GMT)   Resource Rating: 5
@Rob - Cool idea. Note: You may run into some of the following issues:
- Performance may lag w/ too many small interiors pasted together as one large unit (in game).

- You may encounter some weird cases where the player drops through a crack between two pieces (even when it doesn't look like there is a crack). This is likely just a minor misalignment and I would check the position of your pieces. Using even floating-point values and offsets (1.0 vs. 1.125) is best.

- As Dave mentioned, you lose the benefit of portals unless you make bigger tiles (each having their own portalized zones).

- Also as dave mentioned, you may see some odd lighting issues (w/ leaks and shadows), however TGE 1.5 is much improved in this respect. The biggest issue I can see is portalized areas where the portal does not admit ambient light. In this case, because the portal has to be offset from the edge you may get little 'lit gaps' between sections. If what I am saying is unclear, try creating a few portalized pieces and disable ambient light on all portals surrounding a 'room'. You'll see what I mean. (Of course, don't forget to put a light source in the room if you do this.)


Regardless, I'm looking forward to more posts from you on this topic. I have a shelved project where I wanted to use this technique but I put it off for other work. (Imagine that.).


@ Dave - Yes, you are right. In older versions of the engine, having two interiors overlapping would crash the engine. This no longer occurs in 1.42 or 1.5.

Note: You could even see this problem with interiors that were next to eachotyer if their offsets were some odd floating-poing value. Why? Rounding error would sometimes cause oddly aligned interiors to overlap.

One often encountered this issue while editing and moving an interior by hand.


Hall Of Worlds - For Gamers
EdM|GPGT


PS - I haven't verified what happens w/ overlapped portalized zones.
Edited on Mar 06, 2007 20:51 GMT

Geom   (Mar 06, 2007 at 22:22 GMT)
I've always thought it would be neat to do something like this, to generate random missions for a FPS.

Bobby Leighton   (Mar 07, 2007 at 00:12 GMT)
I use a similar method, and Ive never had any problems with connecting DIF's together....In fact as far as I know this is the way they were meant to be used. I have done MOD's in Unreal, Quake, and Half-Life, and they all use BSP style blocks, or in the case of Torque, they call it a DIF. What ever the engine uses for a naming convention isn't important, but I think you would have less problems for those of you that are, to make sure that the DIF's have LOD's built into them, with blocks that are going to be together I would make sure they have the same amount of LOD's though. That's what I do...well here Ill show a couple of things I did...same method as above:)
<a href="http://photobucket.com" target="_blank"><img src="http://i129.photobucket.com/albums/p220/lmaceleighton/CrossSection.jpg" border="0" alt="Photobucket - Video and Image Hosting"></a>

[IMG]http://i129.photobucket.com/albums/p220/lmaceleighton/CrossSection.jpg[/IMG]

http://i129.photobucket.com/albums/p220/lmaceleighton/CrossSection.jpg


Hope the pic work...if not ill be back to put it in...one of these will work i hope:)

PS id be happy to help with any problems related to DIF object in general:)
Edited on Mar 07, 2007 00:15 GMT

Tony Richards   (Mar 07, 2007 at 02:07 GMT)
Bobby's images:



Affectworks   (Mar 07, 2007 at 02:08 GMT)
Rob, it's a neat idea and one that I tried earlier, but eventually the lack of portals forced me to discount this idea. What I did instead was save the pieces in Quark as prefabs instead, then just dragged the pieces into maps as needed.

If you run into frame rate issues, this might be an idea to keep in mind.

The strong point of your approach would of course be randomly created dungeons which would be, as the kids say, hella cool.

Looking forward to more posts from you on this subject.

Cheers!
Fredrik S

J.C. Smith   (Mar 07, 2007 at 08:31 GMT)
I also did something similar to this a while back, though your DIFs are a lot better. In the end though what would probably be the best approach if your trying to rapidly develop content for dungeon generation would be to instead generate the layouts into a .map file, rather than as a bunch of DIFs in game and then compile the map as a single dif. The performance will be much better that way and the only loss is that it can't be generated at run time.

Matt Huston   (Mar 07, 2007 at 09:14 GMT)
Cool, reminds me of the system Neverwinter Nights 1 & 2 uses for dungeons.

Saurabh Torne   (Mar 07, 2007 at 10:56 GMT)
you can add lights in those interiors itself thru quark.
Some of those interiors dont seem to be like interiors as they are not having walls on each side. it will be better to use completely enclosed units with doors and portals. Also with such a small size they will definately put an extra load on polygons and culling and hence slower game.
Edited on Mar 07, 2007 11:01 GMT

Andy Hawkins   (Mar 14, 2007 at 04:15 GMT)
For the skelly pack I'm going to do something like this. I was just reading this thread for issues. I am doing larger sections all portalised and see what sort of performance I will get. I will adjust the editor to grid snap too to make editing easier.

You must be a member and be logged in to either append comments or rate this resource.