Half-Life BSP Experiments

Discuss anything not covered by any of the other categories.
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Half-Life BSP Experiments

Post by Baker »

Half-Life .bsp Experiments

Image

Image

Image

Half-Life .bsp Support

Right now, several engines have Half-Life .bsp support. DarkPlaces, FTE, ezQuake, FuhQuake, Telejano and soon to be Qrack it appears ...

[img]http:///www.quake-1.com/docs/qrack-hl.jpg[/img]

Adding Half-Life support to an engine probably is a 3 out of 10 on the difficulty scale. It's not hard. You have the a WAD3 format loader and the sacred texture prefixes are different.

Half-Life BSP Advantages Over Q1.bsp

The Half-Life file format is scarcely different from Quake. Quake is bsp version 29; Half-Life is bsp version 30.

1. Each texture gets it's *own* 256 color palette.

2. Textures can be stored externally or internally within the .bsp. The advantage is that Quake has around 500 textures with several duplications being compiled into multiple maps. The total file size of Quake might only be 50% if it had all the textures in textures.wad and had the textures external.

3. Colored lights in the map; no external .lit file messy stuff.

4. Effective higher resolution appearance + faster speed developing textures. Having to palletize every texture to the 256 global Quake palette often adversely affects texture quality because there aren't, say, 50 shades of red in the Quake palette.

5. Alpha texture support. These are prefixed with "!" the way liquid textures in Quake are prefixed with "#". Alpha textures have transparent parts. (DarkPlaces does not seem to support this.)

Additionally, Worldcraft 3.3 uses WAD3 so compiling those maps into bsp version 30 maps is more convenient than messing around with Qconverge (or the QuakeAdapter) to make it use the Quake palette.

One downside is the hull sizes don't completely match Quake, but the compile tools are open source (Download) so that could be adjusted.

According to LordHavoc, Half-Life supports 4 hull sizes including a crouching player hull. I don't know if any engine supports the extra hull or how that works in QuakeC.

Avirox setup an experimental FTEQW server running a mod he made to further support the use of Half-Life maps as an experiment that includes func_ladder, rotating brushes, etc. It's pretty nice.

Here are the videos:

http://video.google.com/videoplay?docid ... 0825&hl=en
http://video.google.com/videoplay?docid ... 7861&hl=en
http://video.google.com/videoplay?docid ... 8685&hl=en
http://video.google.com/videoplay?docid ... 5607&hl=en
http://video.google.com/videoplay?docid ... 0227&hl=en
http://video.google.com/videoplay?docid ... 1049&hl=en
http://video.google.com/videoplay?docid ... 0027&hl=en

Note that videos were made using ezQuake, which doesn't have alpha entity support (glass). This is different than alpha texture support, which ezQuake does have.

I thought it would be good to bring this up because a lot of projects here that seem to be using q1.bsp might be a better fit in the long run using Half-Life.bsp because you would have more flexibility with the textures and the colors, instead of having to use mostly brown and gray textures.

Image
DireBetaFiend
Posts: 10
Joined: Mon Aug 18, 2008 3:46 am

Post by DireBetaFiend »

just wanted to give this thread some love <3
avirox is a bomb ass coder and i tried this on his server and ... unfortunately i didn't finish downloading it... but the videos are sweet!
ceriux
Posts: 2230
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Post by ceriux »

so to use hl1 bsp's do you need a special engine or can i run it strait out of darkplaces?
r00k
Posts: 1111
Joined: Sat Nov 13, 2004 10:39 pm

Post by r00k »

DarkPlaces supports hl1 maps. :D So yes, you can plop the map in /id1/maps and load up darkplaces :D You may need some .wad files though for the map to display properly.
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Post by Baker »

DireBetaFiend wrote:just wanted to give this thread some love <3
avirox is a bomb ass coder and i tried this on his server and ... unfortunately i didn't finish downloading it... but the videos are sweet!
If you own Half-Life, what is the best thing to do is to make a quakelife directory in your Quake directory (c:\quake\quakelife) and toss Half-Life pak0.pak in there.

Then load up whatever engine, I believe ezQuake was what Avirox recommended due to some DP bug (I'm not sure the nature of this, his server is FTEQW I believe -- I don't remember what Avirox said the problem was) and maybe some FTEQW problem and connect to his server. (If it's still up).

If I recall, some engines (but not DarkPlaces) will complain about not having sample.wad and I think you can just toss any wad in c:\quake\quakelife and rename it sample.wad.

The fastest way to just tour a Half-Life map is to load up DarkPlaces with the Half-Life pak0.pak in c:\quake\quakelife dir and then do "gamedir quakelife; sv_cheats 1; noexit 1; map c1a0a" in the console.

(You will need sv_cheats 1 because sometimes you need to noclip. Adding noexit 1 keeps you from accidentally exiting the map -- important because the maps are dissected and you can sometimes walk into the "exit" unintentionally).

Note: "quakelife" is the dir name used on Avirox's server; if you put your maps somewhere other than there, the client will download the maps even if you have them elsewhere.
Urre
Posts: 1109
Joined: Fri Nov 05, 2004 2:36 am
Location: Moon
Contact:

Post by Urre »

At one point I figured I'd recode HL in QC, and convert all the models into MDL format, thanks to the map format being so similar. Quite inspiring really. But then I got to my senses and realized it was crazy. And illegal (the converting of models part, unless I made a script for it supplied with the mod), and the reverse-engineering part is also questionable. The fact that all the entities are there, and they load fine, is cool though
I was once a Quake modder
leileilol
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Post by leileilol »

Urre wrote:At one point I figured I'd recode HL in QC, and convert all the models into MDL format, thanks to the map format being so similar
Why convert MDL to MDL? Fteqw has HL MDL rendering.

HL map loading was a novelty in 2001. Hardly anything is made of use of it right now.
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Post by Baker »

leileilol wrote:HL map loading was a novelty in 2001. Hardly anything is made of use of it right now.
This is true.

But the Quake palette is a very limiting factor.

Something like Kurok wouldn't have to fight against the 256 color global palette restriction.

And it a slightly modified Quake map format that supported independent texture palettes should theoretically run on Sony PSP, the Wii, etc. with very little modification.

It would unlock the color restrictions of Quake without spending much time on it plus there would be little or no performance hit, just a way to make the Quake engine more useful.

Some other benefits would be more interesting Quake single player releases where the map has a little more flexibility in the color set (the color green comes mind).
Urre
Posts: 1109
Joined: Fri Nov 05, 2004 2:36 am
Location: Moon
Contact:

Post by Urre »

lei: sure, but not DP, which is where my heart lies. And besides, I don't think FTEQW has bone control.
I was once a Quake modder
avirox
Posts: 137
Joined: Wed Aug 16, 2006 3:25 pm

Post by avirox »

FTE can actually do the bone control too. Spike was working on getting the gordon model working in CSQC. I don't plan on using any of the half-life models, however. Everything will be replaced with quake-based monsters/npcs/items.

Darkplaces right now has a few problems, which I have already brought up with LordHavoc about and I'm not sure when he'll fix them. The first 2 of these problems are not evident in 2006 builds of DP, but in more recent builds they are.

1) Ladders and other brush entities are surrounded by some sort of black box in any half-life map.
2) Brush models in half-life maps are sometimes solid, sometimes not. Also they can disappear at certain angles.
3) Half-life .wad files do not load for half-life maps
4) DarkPlaces needs a way to parse an entity's complete spawn information for half-life's multi_manager to work. FTE does this through a global string called _fullspawndata, which is tokenized in the QC and used to target its respective entities.

At any rate, yesterday I got environmental and ambient sound working in QuakeLife; Scientists also "talk" to you too, though they are replaced by grunts which are more intent on killing you (quake 1 never did favor NPCs :p). Once the project is done it will be fully opensourced for people to do with whatever they like. It's not the prettiest code, but it works :x
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Post by Baker »

avirox wrote:1) Ladders and other brush entities are surrounded by some sort of black box in any half-life map.
Guess #1: I haven't tried older build of DarkPlaces to know if DarkPlaces ever supported this, but I believe this is the alpha texture support (or seemingly non-support in this case).

Some of the textures are flagged as alpha textures with a prefix.
FuhQuake's identify alpha textures:

Code: Select all

#define ISALPHATEX(name)	(loadmodel->bspversion == HL_BSPVERSION && (name)[0] == '{')
In DarkPlaces, it looks to me like those textures just get ignored ...

Code: Select all

// used only for HalfLife maps
static void Mod_Q1BSP_ParseWadsFromEntityLump(const char *data)
{
	char key[128], value[4096];
	char wadname[128];
	int i, j, k;
	if (!data)
		return;
	if (!COM_ParseTokenConsole(&data))
		return; // error
	if (com_token[0] != '{')  <----------------------------------- *
		return; // error
2) Brush models in half-life maps are sometimes solid, sometimes not. Also they can disappear at certain angles.
For that second part ... try sv_cullentities_trace_nevercullbmodels 1?
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Post by Spike »

baker... the entities lump has nothing to do with textures, only the names of the wad files to load.
{ prefix means alpha tested, like sprites were originally. chances are it got lost in some recent change. in the mean time, you should be able to replicate the behaviour with shaders. although this is really a temporary solution.
MauveBib
Posts: 634
Joined: Thu Nov 04, 2004 1:22 am

Post by MauveBib »

The problem with HL BSP is that Q3 BSP is just superior. There's little point using it given that most engines that support it also support Q3 BSP.
Apathy Now!
avirox
Posts: 137
Joined: Wed Aug 16, 2006 3:25 pm

Post by avirox »

Ambient sounds and scientist/barney talks are more or less working now, along with lazers and beams. Some things though I'm not sure how to replicate, like the random small beams that emanate from certain env_beam entities. Scripted particles ftw? Also, I'm workign on adding support for the uplink demo, so even those of you who dont have half-life can test with something.
CocoT
Posts: 695
Joined: Tue Dec 14, 2004 5:39 pm
Location: Belly-Gum
Contact:

Post by CocoT »

avirox wrote:Also, I'm workign on adding support for the uplink demo, so even those of you who don't have half-life can test with something.
Oh, that would be nice!
I used to be a huge fan of trying to get maps from other games to work into Quake1. It was fun experimenting trying to get maps from games such as Heretic2 or Castle of Wolfenstein (see below) work. Instant loading is of course also exciting. When MrGLQuake came out, a few years ago, I was enthralled (I even made a little patch for it (http://cocot.planetquake.gamespy.com/fun.htm), and later, also a little QC file to easily add weapons and bonus to Half-Life maps (http://cocot.planetquake.gamespy.com/generator.qc)
Now, that said, I feel that there is only so much you can do with those external maps and people are not always willing to dig for old CDs to simply load up a map in Quake and, as pointed out by Wazat, the Q3 maps are in many ways superior.
I see you're going for a good QuakeC rewriting to really make all entities work, though, which is really nice. I did not have that courage ;) ... And, to go back to the quote, I feel that assuring a nice compatibility with the uplink demo is a very good idea, because that's something that people can just grab from the net. I'll be looking forward to trying it out! :)

Image
Neurotic Conversions - New location: Update your bookmarks!
Post Reply