News:

Rings of Reznor!

Main Menu

Map Creation Utility-ish

Started by GogglesPizanno, March 29, 2009, 11:19:11 PM

Previous topic - Next topic

GogglesPizanno

So I had me a wacky idea a couple of weeks ago while playing a rogue game. People always complain about the robot factory map getting stale and needing new layouts. So I got to thinking how difficult could it be to try building maps lego style out of simple square pieces. After toying around with nifskope and dat files and other less than satisfying (i.e. breaking the game) methods, I went simple. Basically I am working on a collection of blocks, these blocks are just objects that get copied into the art assets of the game and corresponding template entries. Then (and this was the wacky part) you can use a web based map editor to create your map, export the level layout and then import into FFEdit. Instant interior map (more or less)... Its still early on and suffers from the "blocky looking" syndrome. That and I only have rock walls completed, but these screen shots give a basic idea of how it turns out.

Spoiler
The Web based grid editor:



The Imported Map (from layout file):


catwhowalksbyhimself

Intriguing idea!  Very useful for people wanting interior maps.
I am the cat that walks by himself, all ways are alike to me.

detourne_me

Wow!  sweet ideas!
Have you looked at ow_tiobe's textured tiles?  they may be useful to you as well.
I know they were part of the mod goodies on his site.

stumpy

#3
Holy Dungeons And Dragons, Batman!

With a collection of "geometry" blocks (maybe with some triangular pieces and quarter rounds to smooth things out) and different textures, people creating missions will be able to create a custom map to order in, well, short order. It may never be quite get to the level of a custom meshed map, but this is a godsend for people wanting to do underground adventures, freeroam mods with junctions that lead inside of buildings, new bases, etc.

This is excellent, GP! That looks really good. :thumbup:

BTW, I wonder if maybe making the blocks a little taller would allow for Giants and fliers to be on the map without looking like they are "over" it?
Courage is knowing it might hurt, and doing it anyway. Stupidity is the same. And that's why life is hard. - Jeremy Goldberg

GogglesPizanno

Quote from: stumpy on March 30, 2009, 01:59:12 AM
BTW, I wonder if maybe making the blocks a little taller would allow for Giants and fliers to be on the map without looking like they are "over" it?
Yeah, I was flip flopping on that. There reaches a point where the height starts giving the impression of being really cramped so I was trying to balance asthetic vs. realistic. Its still not quite there...

cmdrkoenig67


GogglesPizanno

One stumbling block that I have worked around but cant seem to find an answer to is rotation values in the level layout file. In FFedit, it uses degrees. The game engine uses radians. If you use python to get/set the rotation tuple for an object, it returns values in radians (i.e. 90 degrees = 1.57xxxxx). However it appears that the level layout values it needs are in some kind of who knows what values that I can't correspond to anything.

What does this mean?
It means that instead of having 5 blocks and being able to "spin" those that have the same number of facing sides to create all possible combinations, I have to use 15 blocks with no rotation on any of them. Its easy enough to do this in nifskope, but it would be nice if it was more automatic. So if anyone can decipher what the numeric rotation values are in a level layout file, you win a no-prize from me.

stumpy

The rotations are expressed as quaternions, which I haven't seen since grad school. They weren't what I expected either, since the angles are more intuitive, but quaternions aren't all that complicated. This Wikipedia article will tell you all you need to really know about converting an angle into a quaternion set (the example is the most useful part). Use the level.txt quaternions in comparison with the angles in FFEdit as examples to check your work and it's pretty smooth sailing.
Courage is knowing it might hurt, and doing it anyway. Stupidity is the same. And that's why life is hard. - Jeremy Goldberg

Gremlin

This is awesome. Is there any way to adjust the height? Maybe just by units of blocks? You could default to one or two rows, and any maps that needed to be higher you could adjust when you generate the layout. That way you're only as high as the specific map needs

Volsung


Stuff  hosted by the courtesy of http://www.freedom-asylum.co.uk/

bearded

is there a way to go totally rogue and make random maps?
by the way, i was playing around with a similiar technique (totally based on your technique), and for some reason all the characters ingame when i started the level ended up 'floating' above the walls.  directly on the top level of the walls, and nothing dropped into the trenches.  i've still got that level if anyone wants to see it.  i'm wondering if it could be used for a flying level by taking out all the walls.  or something.
if you could set up random maps, and wandering monsters, well...that would be groovy.

Boalt92

Great idea GP.  Was looking at Tommyboy's mega maps and had a similar thought.

In addition to walls, how about terrain features/geography?  For example, a plateau with one or two ramps could allow you to "create" both elevated plains and valleys.  You could also "create" a lake or beach using the same theory.

These would be attached directly to the terrain, and could be added hidden/copied/pasted via nifskope

In the end, you'd end up with a new TV - Terrain Versatile

I know it's not what you're doing, it's just an idea I had.  (no idea how difficult this would be)


B92

yell0w_lantern

Ingenious! Maybe I won't have to make those map meshes I've been putting off for months.
Yellow Lantern smash!

GogglesPizanno

Quote from: bearded on March 30, 2009, 08:58:27 AM
is there a way to go totally rogue and make random maps?

Potentially you could but the math and coding for maze generation is beyond what my brain is wanting to handle. HOWEVER, if by random you meant a collection of maps stored as a giant array and a random one gets loaded at the start of the mission, that will work. That was actually what phase one of this was. The problem is that because the map is loaded and created on mission load there is no way to add details in FFEdit. It would just be like a bland maze... 

Quote from: Boalt92 on March 30, 2009, 12:24:54 PM
In addition to walls, how about terrain features/geography?  For example, a plateau with one or two ramps could allow you to "create" both elevated plains and valleys.
These would be attached directly to the terrain, and could be added hidden/copied/pasted via nifskope

In the end, you'd end up with a new TV - Terrain Versatile

Some of the many failed attempts I made was something similar to this. If you tried using nifskope to "build" a versatile map out of pieces, it would build ok, but the game engine had a real problem with computing move paths. Characters would get stuck in certain blocks, or move around areas that should be open etc.. And the behavior was random. Adjust one thing slightly, and it would throw off movement in 5 other places. I tried several different methods and each one cured one issue and created 2 more. Thats not to say it can't be done, its just I never figured out a way to make it stable enough to play..

UnkoMan

Wotta cool idea. Hopefully people will utilize this when all the bugs are worked out.

GogglesPizanno

Quote from: UnkoMan on March 31, 2009, 05:51:54 PM
Wotta cool idea. Hopefully people will utilize this when all the bugs are worked out.

BWA Ha ha ha ha.... (ahem).

yell0w_lantern

Goggles Pizanno drives like a man coming home on the freeway!
Yellow Lantern smash!

cmdrkoenig67

Any luck with this project too, Goggles?

Dana

GogglesPizanno

I actually started looking at this again a couple of weeks ago.
Its still kind of where it was, though I have Corner/Angled walls now.... woo hoo?

I'll try and get something sorta useable worked out. Its still very much in an alpha state however.

cmdrkoenig67

Cool....I was just very curious, being the map-maker I am.

Dana  :thumbup: