News Design Artwork Photos Articles
 Pyramid of the Magician + Bots   Back to PoM Page File Size: 23.3Mb
Electric Knife Eating Rockets Drop down Ledge Dueling

A couple of years ago I created a map called Pyramid of the Magician and it had a lot of awkward brush shapes everywhere, on the floors, walls and ceilings. It had far too many crazy angles and to be honest, I was not surprised at the time that no bot file was created for it.

There were countless problems with creating the bot file and most of them centered around bspc.exe and the way it generated the AAS file. I am sure you are thinking why not just bot clip the original map? Unfortunately it was not that easy because bspc.exe still loaded in all the other brushwork buried in bot clip and eventually ran out of memory. I needed to create a special "light" version for the bots, that excluded all the excessive detail so that it could compile.

After speaking to Mr Elusive and Ydnar an idea was suggested to create a special map which could be used to create the bot AAS file that in turn could be re-attached to the original BSP file. After a lot of discussion and testing I could not get the feature to work right and bot support was not included in the original map zip file. Eventually I published the map, wrote an article on alpha terrain blending and moved on.

Recently someone at Q3W had found a way to get the q3map2 parameter to work correctly and that gave me the idea of trying to get bots to work for Pyramid of the Magician again.

 New Procedure
Now that I had a working example of how the AAS file could be attached to a different BSP file it was time to create a procedure that would work with the old map file that I created years ago. Initially I tested the procedure line by line making sure it worked and then created two batch files to do the process automatically.

Batch File 1
@echo off
@set Q3_PATH="C:/Program Files/Quake III Arena/"
@set COMP_PATH="C:/Program Files/Quake III Arena/q3map2/q3map2.exe"
@set MAP_PATH="C:/Program Files/Quake III Arena/baseq3/maps/"
@set BOT_PATH="C:/Program Files/Quake iii arena/q3map2/bspc.exe"

@set GEN_OPTIONS=-fs_basepath %Q3_PATH%

rem Special Bot file
%BOT_PATH% -forcesidesvisible -bsp2aas %MAP_PATH%

The first batch file is run on the bot only map. It does a basic q3map2 compile (In theory the -vis stage could be skipped but it was so quick it did not really matter) and then does a normal BSPC compile. I had to use the -forcesidesvisible parameter because all of the floor in the original map was terrain. I did experiment with flat bot clip floors, but the bots just spent most of their time floating above the terrain instead.

After the batch file is complete a working bot AAS file is created, but it is attached to the wrong map file. I manually renamed the AAS file to match the original map file but this process could be automated. I paused at this point because I wanted to see what cluster portal area's had been created and decide if I need to do anymore changes to geometry.

If the cluster portal arrangement was bad I would go back to the bot map file and tweak things a bit more. I also removed all lights, terrain alpha textures, non solid patches and models from the bot map. I even removed all wall / ceiling details and turned most rooms and corridors into huge flat caulk faces. Visual textures in a bot map file don't really mean much, so most of my work was done with caulk.

One thing I did find while testing was that the final AAS file was merged with original map geometry in game so you can force the bots to do certain things. When I removed all the wall brushes I thought the bots would just fall out of the map, but they did not. They would often beat themselves senseless against corners because they did not believe they existed, but they did in game.

One problem I had with the bots was they would pull back, while in the air after hitting a jump pad. In the original map file the brushwork after the jump pad was gradually sloped down but the brushwork in the bot file I changed to be flat and the edge was a lot further back. This had an interesting effect because the bots would then used the air control of the jump pad to move forward instead of back and then land correctly. If they missed for some reason, the original map geometry was still there so they did not fall into the gap, but bounced off and down only to try again.

 Switching maps
Batch File 2
@echo off
@set Q3_PATH="C:/Program Files/Quake III Arena/"
@set COMP_PATH="C:/Program Files/Quake III Arena/q3map2/q3map2.exe"
@set MAP_PATH="C:/Program Files/Quake III Arena/baseq3/maps/"
@set BOT_PATH="C:/Program Files/Quake iii arena/q3map2/bspc.exe"

@set GEN_OPTIONS=-fs_basepath %Q3_PATH%


%COMP_PATH% -light -fast -patchshadows -samples 3 -bounce 3 

%BOT_PATH% -optimize -reach %MAP_PATH%
The second batch file is run on the original map. It fixes the AAS file to work with the original map file, does a complete vis/light stage and finally optimize's the AAS file. Unfortunately there are 3 problems with the -fixaas parameter in the q3map2 2.16 version as follows:

- The compiler says the parameter is invalid, but yet still seems to work!

- The -fixaas parameter trashes the light map (most of the time) in the original bsp file so you have to re-compile the original map again.

- The bot AAS file has to have a newer date than the original bsp file so you have to end the process by optimising the bot file so that it is regenerated and work correctly with the original bsp.

 Final Thoughts
This has been a long journey for this map, but finally I have been able to produce a bot file which is strangely rewarding after all this time. If it had not been for a user over at Q3W investigating the -fixaas parameter and producing a working example then this bot version of Pom would have never seen the light of day.

I know a couple of people have expressed interest to me about re-creating bot files for other maps, but this parameter was really created to get around bspc.exe compiler limitations not be some extra optimizations stage. Yes in theory this parameter could be used to tweak AI behaviour, but this would involve maintaining 2 versions of a map file and that is something I would not recommend.

Overall the bots should be enjoyable as they travel most of the map and get to all the special area's that I had originally set up for human players. If the door at the top of the temple is opened then the bots will get the power up inside, otherwise they keep checking the door. There is a couple of places where the bots get caught up on geometry but the portal clusters for the map overall are so good I am going to leave this version alone.

Sometimes while running a server I would run out of memory due to some of the portal cluster area's being so large and the bots consuming lots of memory. If this happens I recommend you change the parameter com_hunkmegs to 64 and restart quake3. The default is 56 if you want change it back afterwards.

Hope you enjoy the bot support.

Architectural Concepts -
The Bridge Crane -
Florentine Library -
Shape and Form -
Single Player Maps -
Edge of Forever -
Freeport Docks -
Midnight Stalker -
Backsteingotik -
The Ivory Tower -
The Horde of Zendar -
Metal Monstrosity -
Castle Kaahoo -
One Thousand Cuts -
Fallen From Grace -
Single Player Mods -
In the Shadows -
Arcane Dimensions -
AD Only Maps -
Arcane Adamantine -
Arcane Monstrosity -
Firetop Mountain -
Forgotten Sepulcher -
Grendels' Blade -
Nyarlathoteps Castle -
Obsessive Bricks -
Ogre Fortress (e2m2) -
Slipgate Conundrum -
Tenacious Tentacle -
The City of Zendar -
Multi Player Maps -
Focal Point (QuakeLive) -
Pyramid of the Magician -
Mystic Gemini -
Si'Metrik -
Chiroptera -
Indie Games -
Flipper -
Firefox This site has been cobbled together by Simon O'Callaghan
Contact Information: Simon O'Callaghan
All content is Copyright © 2000-2020
Hosted by ApisNetwork