🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Untitled

posted in DruinkJournal
Published January 09, 2008
Advertisement
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:
Slipgate
(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...
Previous Entry Untitled
Next Entry Untitled
0 likes 2 comments

Comments

benryves
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.
January 09, 2008 09:13 AM
Evil Steve
Quote: 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.
January 09, 2008 10:51 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement