Map Display
Moderator: InsideQC Admins
6 posts
• Page 1 of 1
Map Display
Hello.
Here is my idea:
An easy way to display maps in the menu without having to modify the engine to be specific to the mod (It avoids having to have a custom engine to do it when your base engine could already do it for you.)
There are a couple versions of it:
1. You could have a section in the menu where the maps are that would display all of the map names found in a folder (id1 most likely)
2. You could have it read a .lst file and display the names from there.
Do any engines have something like this already, has anyone done this? What would be the best way to go about accomplishing this?
Thank you.
Here is my idea:
An easy way to display maps in the menu without having to modify the engine to be specific to the mod (It avoids having to have a custom engine to do it when your base engine could already do it for you.)
There are a couple versions of it:
1. You could have a section in the menu where the maps are that would display all of the map names found in a folder (id1 most likely)
2. You could have it read a .lst file and display the names from there.
Do any engines have something like this already, has anyone done this? What would be the best way to go about accomplishing this?
Thank you.
- Team Xlink
- Posts: 368
- Joined: Thu Jun 25, 2009 4:45 am
- Location: Michigan
Listing maps ...
JoeQuake lists the maps via the map menu. Qrack is based off JoeQuake and therefore does this.
FitzQuake lists the maps via, I'm thinking the "maps" command and prints them on the console.
DarkPlaces does the same.
DirectQ does this I believe.
The weaknesses of at least JoeQuake's way for sure is that it also lists the item brush models (like healthboxes and ammo boxes) because those are also .bsp.
JoeQuake indicates if it is in the folder or in the pak file.
You probably have to "tune" it to trim it down to what you are intending to have it display. JoeQuake, for instance, displays the maps in any pak file loaded and at least in standard Quake even if a gamedir is being used, the id1 folder paks are always loaded so it's gonna list e1m1 and such.
JoeQuake lists the maps via the map menu. Qrack is based off JoeQuake and therefore does this.
FitzQuake lists the maps via, I'm thinking the "maps" command and prints them on the console.
DarkPlaces does the same.
DirectQ does this I believe.
The weaknesses of at least JoeQuake's way for sure is that it also lists the item brush models (like healthboxes and ammo boxes) because those are also .bsp.
JoeQuake indicates if it is in the folder or in the pak file.
You probably have to "tune" it to trim it down to what you are intending to have it display. JoeQuake, for instance, displays the maps in any pak file loaded and at least in standard Quake even if a gamedir is being used, the id1 folder paks are always loaded so it's gonna list e1m1 and such.
The night is young. How else can I annoy the world before sunsrise?
Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
-

Baker - Posts: 3666
- Joined: Tue Mar 14, 2006 5:15 am
DirectQ does it for sure but it's very Windows-API-ey; you could use the standard CRT versions of _findfirst/etc though (the advantage of the Windows API for me was that I could also get filesystem attributes, like whether or not it was a hidden file).
The method I use to exclude box models is to scan through the BSP looking for an "info_player_*" entity. Of course having this naming convention is only a convention, and a custom mod that totally rewrote it's QC could well call it "elephant" and cause my method to break.
The method I use to exclude box models is to scan through the BSP looking for an "info_player_*" entity. Of course having this naming convention is only a convention, and a custom mod that totally rewrote it's QC could well call it "elephant" and cause my method to break.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
We knew the words, we knew the score, we knew what we were fighting for
-

mh - Posts: 2292
- Joined: Sat Jan 12, 2008 1:38 am
Ah, well making file system notes ...
If I recall correctly, the JoeQuake way is not operating system portable directly. It uses some file listing functions that are Windows specific.
And I'm thinking FitzQuake's code is also Windows specific.
You need a platform neutral file listing method, this can be located in fs_something.c or some such source file in DarkPlaces and plugged into the JoeQuake method, as it appears each operating system has it's own way of listing files in directory. More or less it is Windows versus everyone else ... again, if my memory is correct ... and DarkPlaces has a nice little "wrapper" it puts over that to bridge the differences.
/DarkPlaces source code is so handy! Half the time it is like a toolkit to solve any given problem, an engine coder's reference manual.
If I recall correctly, the JoeQuake way is not operating system portable directly. It uses some file listing functions that are Windows specific.
And I'm thinking FitzQuake's code is also Windows specific.
You need a platform neutral file listing method, this can be located in fs_something.c or some such source file in DarkPlaces and plugged into the JoeQuake method, as it appears each operating system has it's own way of listing files in directory. More or less it is Windows versus everyone else ... again, if my memory is correct ... and DarkPlaces has a nice little "wrapper" it puts over that to bridge the differences.
/DarkPlaces source code is so handy! Half the time it is like a toolkit to solve any given problem, an engine coder's reference manual.
Last edited by Baker on Thu Jan 14, 2010 10:25 pm, edited 1 time in total.
The night is young. How else can I annoy the world before sunsrise?
Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
-

Baker - Posts: 3666
- Joined: Tue Mar 14, 2006 5:15 am
mh wrote:DirectQ does it for sure but it's very Windows-API-ey; you could use the standard CRT versions of _findfirst/etc though (the advantage of the Windows API for me was that I could also get filesystem attributes, like whether or not it was a hidden file).
The method I use to exclude box models is to scan through the BSP looking for an "info_player_*" entity. Of course having this naming convention is only a convention, and a custom mod that totally rewrote it's QC could well call it "elephant" and cause my method to break.
Do people make new bsp models?
maybe a possible solution will be to "blacklist" these names b_nails.bsp as not a map. So before dumping the map list, compare against the blacklist.
- Teiman
- Posts: 309
- Joined: Sun Jun 03, 2007 9:39 am
Teiman wrote:mh wrote:DirectQ does it for sure but it's very Windows-API-ey; you could use the standard CRT versions of _findfirst/etc though (the advantage of the Windows API for me was that I could also get filesystem attributes, like whether or not it was a hidden file).
The method I use to exclude box models is to scan through the BSP looking for an "info_player_*" entity. Of course having this naming convention is only a convention, and a custom mod that totally rewrote it's QC could well call it "elephant" and cause my method to break.
Do people make new bsp models?
maybe a possible solution will be to "blacklist" these names b_nails.bsp as not a map. So before dumping the map list, compare against the blacklist.
Actually they do, believe it or not. ne_tower for example is full of cogs that are huge BSP models (and that are a bitch on your FPS in most engines).
Nobody's (I think!) made an environment sky as a BSP model yet, but it's only a matter of time.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
We knew the words, we knew the score, we knew what we were fighting for
-

mh - Posts: 2292
- Joined: Sat Jan 12, 2008 1:38 am
6 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest