• entries
    222
  • comments
    606
  • views
    587735

Custom Levels and Model Skins

Sign in to follow this  
benryves

837 views

Quote:
Original Post by Scet
Do you plan on making anything out of it, or will it just be a bsp viewer?
An XNA Quake implementation the way I intend on working - that is, to start from scratch - is not really worth it (as far as getting the gameplay 100% identical to DOS Quake).

As a learning project, there's a decent quantity of further material (as far as maps, high-resolution textures and so on go), and I intend on trying to learn how to write a 'FPS-friendly' 3D engine based around Quake's data. Whether I shoehorn some sort of game into that or not is yet to be decided. [smile]

Anyhow, I mentioned that I'd be moving on to light maps. Unfortunately the documentation I have is rather vague on this topic (the Unofficial Quake Specs), and I can't get meaningful data out of the BSP files.



I had a slight issue to resolve. Certain textures were appearing as a single colour, like the above. As far as I know this is a symptom of using crazy texture coordinates. I wrote a crude routine that attempts to shunt vertices into the 0..1 range, and the result looks a bit better:



As you can see, the top edge of the large texture is still badly distorted.

I modified the resource loader slightly to handle loading files outside the main pack files.





The result is that I can low load resource files - such as external levels - as you would any other resource, with a call to LoadResource("maps/ikspq5.bsp"). The level loader also parses the entity declaration block inside the .bsp, putting the player in the correct starting place and - more noticably in the screenshots - finding out the title of the level.



I've made a start at loading the Alias .mdl files, but their structure is rather convoluted so the only visible result thus far is a dump of all of the skin pictures.



There doesn't seem to be much information about Quake BSPs (plenty on Quake 3 BSPs, however!) so if anyone has any recommendations I'd be grateful. Looking at flipcode's article on Quake 2 BSPs it would appear that they're not too different, so I'll have a go with that.
Sign in to follow this  


2 Comments


Recommended Comments

Ooh, pretty. This is the first I've seen of this project of yours.


Do you intend to parse the progs.dat file (I think that's what it was called) - the QuakeC compiled code? I've no idea what's actually involved in that, however...

Share this comment


Link to comment
You might want to check the version of your BSP files versus the one used in the Unofficial Quake Specs. My files are one version ahead and I think that's what most people have, the Unofficial Quake Specs where for the first shareware release. There's only one difference, I forget what it is though, you can find it in the Quake source, there's one file with all the bsp structures laid out.

Also here's some API independent code for loading Quake MDL models.

Share this comment


Link to comment

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

Sign in

Already have an account? Sign in here.

Sign In Now