• entries
222
606
• views
591266

# High-Resolution/Luma Textures and Monsters

1417 views

Quote:
 Original post by Evil SteveYup, I've done soem QuakeC modding before. The progs.dat is basically all the game code, and quake.exe is all the engine code. if you can load progs.dat properly, you should be able to get behaviour exactly like the original Quake.Progs.dat is responsible for all monster types AI, and I think you're right about triggers and bridges and stuff.
Ah, makes sense! According to the Unofficial Quake Specs it's p-code, which at least makes parsing easier. Working out which opcodes do what will (I assume) require a perusal of the Quake/QuakeC compiler source.

One quick and dirty way to (possibly) improve Quake's elderly graphics is to use a modern texture pack, which provides high-resolution reinterpretations of Quake's own offerings.

Personally, I'm not too keen on these packs - high-resolution textures on low-poly structures emphasises their sharp edges, and texture alignment issues - Quake's textures are aligned pretty badly in places - are made even more obvious. In the same vein, low-resolution textures look very bad to me when magnified using a smoothing filter - I'd much rather see chunky pixels.

Anyway, adding support for them is very simple. When loading textures from the BSP, I simply check to see if a file textures/texturename.tga is available, and if so load that instead.

The Slipgate Complex with the original and high-resolution textures.

One advantage of these high resolution texture packs are their luma variations. These are available for certain textures that need to 'glow', such as lights, computer displays or runes. These are mostly black textures with the only the part that lights up drawn.

I draw the world geometry twice. The first time I draw it normally. The second time I disable lighting and fog, enable alpha blending, use an additive blend function and the luma textures instead of the regular textures.

The Abandoned Base before and after the addition of luma textures.

Quake's maps have limited support for animated textures. If the texture is named +0xyz (where xyz is the descriptive name of the texture) then chances there's a +1xyz, +2xyz (and so on) texture to go with it. Once a level's textures have been loaded, I go through looking for any names starting with +0. From this I can search for the indices of its other frames.

Texture2D OldFirstWall = this.WallTextures[ATD.TextureIds[0]];Texture2D OldFirstLuma = this.LumaTextures[ATD.TextureIds[0]];for (int i = 0; i < ATD.TextureIds.Length - 1; ++i) {	this.WallTextures[ATD.TextureIds] = this.WallTextures[ATD.TextureIds[i + 1]];	this.LumaTextures[ATD.TextureIds] = this.LumaTextures[ATD.TextureIds[i + 1]];}this.WallTextures[ATD.TextureIds[ATD.TextureIds.Length - 1]] = OldFirstWall;this.LumaTextures[ATD.TextureIds[ATD.TextureIds.Length - 1]] = OldFirstLuma;

Once I've collected up the indices of each animated texture's frames, I simply rotate them using the code above.

The levels do look rather lonely without the various monsters patrolling them. This can be remedied by parsing the entities lump. In the true brute-force tradition, the models are loaded once (at startup), but to render them I just loop through the entire entities block (which contains many irrelevant entities) hunting for types referencing a model - if so, I pull out their angle and offset and render the model at the specified position.

Most of the items spread out throughout the level - powerups, weapons and armour - are represented by Alias models, so adding support for those is easy enough:

Some of the other items - such as ammo crates - are represented by BSP models, so are currently not supported.

QuakeC is pretty gorram old. I remember getting QuakeC working for the very first time under DOS, so when I was modding Quake on my Mac, I would have to wait until I could get my hands on a DOS machine to build a new release of my QuakeC program.

Eventually I gave up on my mod (double shotguns).

##### Link to comment
Ooh, that looks pretty cool [smile]

I seem to recall that the original Quake used "Truebright" colours (Which were either the first or last 16 colours in the palette), and these colours weren't affected by lighting. How the rendering was done, I've no idea.

As for the textures; I kinda prefer the originals actually. Maybe because I'm a Quake purist [smile]

I might make a Quake clone as my next random side project / engine code test actually. I like doing cool low level stuff like this.

## Create an account or sign in to comment

You need to be a member in order to leave a comment

## Create an account

Sign up for a new account in our community. It's easy!

Register a new account