Automatic Map Creation Possible with Q3Map2?


(Grecy) #1

Hi all,

Sorry this is such a newbie post, but I’ve read the readme and the manual to Q3Map2 and I’m not sure if it can do what I want it to… I’ll see if I can explain myself:

I’m trying to investigate weather its possible to automate the process of map creation.
(I’ll give you some background)

I’m working in a VR lab where we have a custom OpenGL Performer program used to ‘simulate’ walking through rooms. Different information can be presented (textures on the walls) in each room. At the moment, the rooms required are read in from a text file at startup and the rooms and info are generated on the fly.

I’ve looked into using CAVE Quake III (CAVElib is a library that allows for programs to easily be shown on the complex projector setup)
I could make a map with lots of rooms connected by tunnels, placing the required textures in each room.

What we really need is a way to automate this process (much like the text file solution). Is it in anyway possible to script Q3Map2 to create rooms/textures as required ?
Ie, I would basically use XML (or plain text) to specify how many rooms, and which ones are connected to which others and what textures to place on what walls etc.

From there, I write a Program that parses the XML and writes out a corresponding .map file. ( all the map files created will be very similar (ie, romms connected by tunnels) so this shouldn’t be too hard.) from here, I can just throw the written map file onto Q3Map2, and hopefully have generated a dynamic quake level (I realise it will take time to ‘compile’ but thats fine.)

Is this going to be possible? where can I learn about writing a .map file to achieve this?

I greatly appreciate any help given,

-Daniel Grec


(U.S.S. Speed) #2

Q3Map2 doesn’t “create” room.

It’s done in Radiant (GTK or Q3).

Q3Map2 is only a compiler for lightmap and portal.

.map can easily be open in a text editor since it’s only vertice and dot information. Quite easy to understand when you read it.

I think a mod team actually did a mod that use a .bsp with special portal, and each time you load a map, it’s different. It’s basicly a portal like seen in Q3DM0, but it is random to different end point.

But the .bsp (Compiled version of a .map) can’t change without a re-compilation.


(Grecy) #3

U.S.S Speed,

So what you are saying is that I can write (or generate) a .map file then run it though Q3Map2 and create a .bsp file - from here I assume this can be leaded into Quake and I can use the level I have created?

please correct me if any of this is wrong… I’m still trying to understand how this will all be possible.

also, do you know where I can find info about writing a .map file for this purpose?

thanks again

-Dan Grec


(Hewster) #4

Hey Grecy,

From what I understand that you want, I would think it is possible.

You are basically saying you want to create a .map file, but not with
Radiant ( the 3D app most use) but by specifying number of rooms,
room sizes/types and textures in these rooms, via a text document…
So lets say you create different types of room with say different
furniture / lighting, using Radiant you can save each room as a
‘prefab’ these are basically a map file (not sure the exact difference)
but these could be your room modules…
You could simply call them TypeA, TypeB ect.

To describe the texture used in each room you could call
each different texture ‘wallpaper01’, ‘Wallpaper02’ ect
and then finally you need to describe how the rooms connect.
You could simply work in a clockwise fashion…staring North,
and describe which room that exit will lead to, maybe using
00 to describe no exit in that direction:
See pic:

A text file that describes this layout might be written like this:

Room_01 - TypeA - wallpaper1 - 00,02,03,00
Room_02 - TypeB - wallpaper2 - 00,00,04,01
Room_03 - TypeC - wallpaper3 - 01,04,00,00
Room_04 - TypeD - wallpaper4 - 02,00,00,03

This text file could be produced from a simple design app, maybe using xml
or java, so it could be used in web-browser…

Another app, or indeed the same app, could read this text file,
and build a .map file for you (a good understanding of the .map file will be needed),
using your pre_made prefab modules, which could then be complied with q3map2.
The resulting .bsp file could then be viewed in QuakeIII or Wolf or whatever
QuakeIII engine game you wana use.

Interesting project… and quite a lot of work I would imagine.
And possibly only worth while for a commercial project, in which case
you’d better check with ID that its ok to use their engine in this way ?

I’m afraid I don’t currently understand the .map file enough to help you
any further, but I’m sure there must be a description of it somewhere.

Hope I got the right end of the stick here?

Hewster


(Grecy) #5

Hewster,

thanks for that reply… that really helped.

I’ve just had a metting with the bosses, and for now they want me to knock up some rooms in QtRadiant and we’ll see how good/nice they look on the big screen.

cheers.

-Dan


(U.S.S. Speed) #6

The Q3 Engine is currently 250,000 $US + 12,5% of royality

Cheap isn’t it?

If you need some little map, I have some. :smiley:


(wudan) #7

Say, that is cheap!

Ever looked in to the price of opening up a McDonalds?

Anyway, yes, a .map file is just an ASCII file anyway (if I recall), it would be easy to write a program to generate them, or you could take preset rooms of specific sizes as map files and drop in some creative algorythms … and viola! A cool looking map that is random …


(U.S.S. Speed) #8

You mean a text file? (.txt), so yeah… It is.


(Tigris) #9

Perhaps you could ask Raven- what they did in SOF2 is more or less what you want to do.
For the Map-File I would ask the people at http://www.qeradiant.com, if they can’t help- who can :wink: