Jump to content
Sign in to follow this  
  • entries
  • comments
  • views


Sign in to follow this  
Evil Steve


Ok, I have some triangles now, rather than lines. Copying Benryves' idea from last year, I'm using fog instead of properly lighting the scene.

Piccy time:
(Click to enlarge)

I'm rendering the map twice, once in solid view, once in wireframe (Something I can do with one line of code thanks to the way my engine works), which is why it looks weird.
My method of generating triangles isn't really that optimal, and will probably cause artefacts with large polygons with many edges, but it works for now. Currently I just make a fake triangle fan (It's really a triangle list, but it looks like a triangle fan, you can see some in the screenshot), using the first vertex of the edge list as the fan start point, then just working my way around.

I've half got texture code working - It parses the textures and creates them, but I'm at work just now so I don't have a Quake pak file, which means I don't have the Quake palette handy, so I'll hopefully get that done tonight.

The next thing I'm going to run into is a problem with the way Quake uses OpenGL, and I'm using Direct3D. With OpenGL you can specify texture coordinates seperately from vertex positions, with D3D you can't (easily). That means that I'll have to duplicate some of my vertices to account for texture coordinates. And that's going to be a little fiddly with my current setup.
Still it needs done, and shouldn't be that bad.

Anyway, back to work...
Sign in to follow this  


Recommended Comments

Hooray for all things Quake-related. [smile] I missed your last entry, but glad to see you got it working!

I suppose you could always download the shareware episode of Quake for testing at work.

Share this comment

Link to comment
Original post by benryves
I suppose you could always download the shareware episode of Quake for testing at work.
Yeah, I realised that just after I'd written the entry. I've extracted the palette.lmp file and converted it into a static array in my source file while CodeWarrior was busy "compiling", so I'm set up to actually use it now (I'll be converting the Quake textures to 32-bit ones). I'm also using non-power of two textures just now - which is naughty - but peh.

Something else I'd like to do, although I don't think it's a very good idea - is to atlas some textures. That'd let me keep the number of texture switches and therefore batches down, but I'll only be able to apply atlases to some textures, e.g. the computer terminal textures that don't wrap or repeat.

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
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!