View Full Version : Quake2 BSP's and Half-life BSP's
02-09-2003, 11:49 AM
Im making a BSP loading engine that will support Quake2, Quake3, and Half-life BSP's. I know that Half-life is really just Quake2's engine. Quake2 md2's and Half-life mdl's are very simialar but not so close you can use the same engine to load them. I was wondering how close or diffrent Quake2 and Half-life BSP's are? If anyone knows a good place to find tutorials on this thatd be help full to.
02-09-2003, 12:35 PM
Here is a site I came across one time. It's a half life bsp viewer. According to the programmer, it's the same as the quake 2 format. Here it is: http://www.cfxweb.net/files/Detailed/858.shtml
I don't remember if source is included though.
02-09-2003, 03:02 PM
Thanks this is just what I was looken for. The only problem is that when I went to download it the link was broken. I e-mailed the programmer and asked him to fix the link.
02-09-2003, 05:45 PM
Halflife uses the Quake1 engine, not the Quake2 engine. Halflifes model format is VERY different to Quake2s model format, as well as being very different to Quake1s model format.
Halflifes BSP format is almost identical to Quake1s BSP format, the main differences being that Halflifes BSP files contain colour lightmaps, and textures arent necessarily saved within the BSP file.
Quake2s BSP format is quite different to that of Quake1 and Halflife.
02-09-2003, 06:42 PM
Actually that's not entirely true. At least about the bsp files. The Quake 2 engine is based off the Quake 1 engine for one, keep that in mind. I read in a magazine a long time ago that valve said they went to the quake 2 engine code base for Half-Life so it DOES use the quake 2 engine, which uses the quake 1 engine so really you can say both I guess. http://www.opengl.org/discussion_boards/ubb/biggrin.gif I also remember in this magazine article that they had some screenshots of the colored lighting thanks to the quake 2 engine. They said something like, thanks to the quake 2 engine, we now have colored lighting and here is a shot. Something like that anyway. http://www.opengl.org/discussion_boards/ubb/smile.gif I wonder if I still have that magazine. Hmm.
Too bad about that link. I downloaded it before and it worked pretty good. Again I don't remember if source was there though.
You know I just thought of something. You could download the source to the half life map comile tools and look at how they save all the data. So this way you would know exactly how the data is stored. Also I don't think there is much different about quake 1 and quake 2 bsps. If I remember correctly it's only like one maybe two things at the most that is slightly different.
02-09-2003, 06:49 PM
Hey here is something that might be of interest to you. A Half-Life bsp viewer WITH source! Check it out: http://www.planethalflife.com/botman/bsp_tool.shtml
02-09-2003, 06:52 PM
BSP files are really just about the same for every version. Only a few diffrences. I saw somewere that some guy took the quake2 source and created a quake3 bsp reader out of it. Doom III is supposted to have all new kinds of models and maps(not MD* or BSP)
What I hope to do is have one engine that will read them all.
Quake III is based off of Quake II and thats based off of Quake I they just kept upgrading there engine Doom III is supposted to have an all new engine though.
DopeFish: what I ment by being similar is how there drawn. There both drawn very similar.
SirKnight: I have the source for half-life I just wanted to see how else it was used. Also its kina hard for me to compile it since its made for win and I only use linux. The source does come with it, at least thats what the page said. I e-mail the guy about it but nothing back yet. Heh thanks for the link!!!
02-09-2003, 07:55 PM
SirKnight: I check out the second link you gave me. I ran the program threw winex a windows emulator for linux. It ran great. It was just what I was looken for thanks. I tryed a quake2 map and it didnt work, it said there was a problem with the version. What interested me so much about the first link you gave me was that it gave me the impression that it could display both Quake2 maps and half-life maps. I guess ill play with the source code.
02-10-2003, 01:14 AM
I used my previous 3d engine with Q1 bsp loader to load and view (without texture) halflife bsp files. The only difference are
1) the version http://www.opengl.org/discussion_boards/ubb/wink.gif
2) textures are stored out of the bsp files, in a shared wad texture library
So basically Q1 bsp and HL bsp use nearly the same file format.
02-10-2003, 01:27 AM
Valve did have a licensed copy of the Q2 source as well, from what I remember, however Halflife itself is a largely modified Quake1 engine.
They used the radiosity feature from Q2's compile tools for the lighting. The coloured lighting component is an easy addition to the stock Q1 compile tools, they wouldnt have needed the Q2 tools for that.
As for BSPs being just about the same for each version, whilst some aspects of that is true, there are some major differences between them, which is why I said they were very different. Quake1 and Halflifes BSP formats are near identical (the biggest difference being the lightmap colour depth).
Quake2s are quite a large change, introducing area-portals, not storing texture coordinates but rather positioning info, etc.
Quake3s is another sizable change, introducing different surface types (patches, triangle soups, etc), shader fields, light grids, etc.
Regarding the Quake2 engine that loads Q3 maps, QFusion, I speak with the author (vic) of that in IRC regularly, and it was *not* a simple change at all.
Doom3s model format is known as MD5 (not to be confused with the MD5 hash algorithm), and is a text-based skeletal model format.
Yes, it was possible to use the Quake 2 engine to view Q3 levels.
Carmack himself used Q2 to test the Q3 engine. This was possible because the Q2 engine could not only change between software/OpenGL/Direct3D rendering, but it also could change the whole rendering core. This way Carmack could create the Q3 engine and test it with the old Q2 levels, physics and all the other stuff, and had therefore a good basis to start with.
I donīt know if one can do this change without recompiling Quake (2), but i think so.
02-10-2003, 05:40 AM
John Carmack didnt use Q2 to view Q3 maps, he rewrote large portions of it. Q2 also never had D3D support, and it does require a recompile, along with MAJOR code changes, to load Q3 maps.
02-10-2003, 06:14 PM
That would make sence that half-life is based off the quake1 engine. IDSoftware just recently put out the quake2 source(you can get it on there ftp site ftp.idsoftware.com) It seems after a new version of a game comes out they put it out to the public. serria might of bought the source before quake2 came out and started working on half-life, then in later versions used quake 2 source code. Each version of quake was probly built off the last. Thats why BSP's are all very similar in the way there loaded and displayed.
02-11-2003, 05:51 AM
Well on the graphical side q1-q2-q3 are quite the same, a bsp with surfaces, it's easy to support drawing both from the same code (If you have q3 support, it's easy to downscale it...)
The biggest problem is that there are other changes too.
Like collision detection, on quake2 and up is totally different from quake1. Q1 uses 3 hulls depending on the box size and q2/q3 uses the .map brushes (binary stored in the bsp file)
So If half life bsp's are q1 bsp's you may have to do 2 collision engines.
Also content flags are different (water etc...) but those sould be convertable I guess.
02-11-2003, 03:58 PM
Pentagram: Thats true but thats were I would use the version number. I would assume that all Q1 version are the same, all Q2 versions are the same, all Q3 versions are the same, and all Half-life versions are the same. Depending on the version number I would have the engine read it a diffrent way. Thats an interesting thought about Q3 bsps being downgradeable to Q1 Q2 and Half-life. I was thinking of building up from Q1 to Q3. Maybe Ill try your way.
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.