[MacGLQuake] Hexen 2

pOx pox@planetquake.com
Fri, 17 Nov 2000 18:01:53 -0500


>> That's great Brad! - I've been messing with the Hexen 2 code but have been
>> having problems with the transparency of certain sprites. I'm kinda new to C
>> and all this bitshifting palette crap is over my head :(
> 
> Ah...I just got an email from Chris Wang Iverson that said I should get in
> contact with you about this. I don't know how far you've gotten with it, but
> I "cheated" on that particular problem...
> 
> It appears the Hexen 2 code is based on an earlier version of the Quake
> engine from what I can tell. One routine - GL_Load8 is the source of the
> problem. I hacked in parts of the Quake engine code to avoid that mess and
> it seems to have taken care of it.

I tracked the problem down to that routine (since that's where all the
alphas are generated) but must have missed a couple things. I changed all
the shifts when dealing with rgb values ( Hexen's b<<16 g<<8 r to Quake's
b<<8 g<<16 r<<24 ) but one of the 'trans[i] &= 0x00ffffff00;' must be
causing the problem - it only happens on a few sprites that seem to use
black as a transparent index (Necromancer's 1st spell, and the Assasin's
crossbow explosion are the only two I noticed so far)

> There's only one problem remaining that I'd like to fix: if you watch the
> intro (or type "timedemo t9.dem") you'll see that it treats the demo like a
> multiplayer game with 4 players spawning in. Interestingly, their skins
> don't load - they are solid white polygons. I don't know why that is yet. I
> looked through the archives to the list and saw your fix for the pcx loader,
> but those players don't use pcx skins.

The skins load fine for me - does this happen with all player models? (set
'chase_active 1' to check during a regular game). I haven't touched the
HexenWorld source myself, and I'm not sure how you integrated the two, but
it may be related to that somehow (?).
BTW - The PCX fix I posted a while back could actually been done much easier
using the built-in endian swapping functions, I was _really_ new back then
:)

>> If you're looking for a place to release the code, I'd recommend
>> http://www.idevgames.com - That site is becoming a really good resource for
>> Mac game programmers but they could use some more projects.
> 
> Thanks for the tip - that's probably what I'll do. What is the status of the
> Mac version of GLQuake? Has David stopped working on it? (You here, David?)
> I'd like to try and avoid forking the code unnecessarily.

I don't think David has posted hear since May (hope everything is alright),
but I think it's safe to assume he's no longer working on it. I kinda took
it under my wing and released a source patch available here
<http://dl.fileplanet.com/dl/dl.asp?paroxysm/mglq_src.hqx> It mainly
addresses problems with Voodoo cards (the 0.7 source never goes into
fullscreen) plus a few other bugs you may have already fixed.

>> I hope you keep hack'n on these - Gameranger support would be great, as many
>> people have been asking for that, and the inputsprocket stuff desperately
>> needs and overhaul (as you mentioned).
> 
> Yeah, it's a mixed bag. Carbonizing the app automatically means that any
> InputSprocket fixes I make have a limited lifespan, so I'm reluctant to pour
> too much time into it, but I probably will anyway. :-)

I hear ya. At least it'll be supported on OS8-9 weak linked from a Carbon
build (well, that's what I gathered from Apple's last words on the subject)

> Are there any other outstanding issues that need looking at? I've got pretty
> much the whole weekend to putz with it.

There's some WIN32 specific stuff I haven't hit yet that you may or may not
have completed (save/load gamestate clean up routines & midi music) and I
quickly discovered that FastFabs is evil. Contact me directly if you want to
swap code <pox@planetquake.com> I'm real interested in seeing your approach
to porting.

> At the moment, I've been concentrating on polishing up a few rough edges to
> the app. Ideally I'd like GLQuake to be good enough to eliminate the need
> for the "official" Mac binaries. I also have an ulterior motive: I have to
> write an OpenGL renderer for Centipede, so tinkering with the GLQuake code
> is a good learning process for me.

I for one am glad you're working on it, and I'm sure lots of gamers will
appreciate the effort as well.

Frank.
pox@planetquake.com
--