What's your point?
Not a Member? - Login or Create an Account...MC Offline
Wednesday the 21st of March 2018 @ 06:51am
Front Page Projects Your Profile About

Filed Under: Journal - Development - Game Development

Yay, updates. So I've been spending lots of time reading about lighting and trying to figure out the best/easiest way to light things in Onyx. Right now it would seem that the best thing to do will be to use regular GL lighting to create the simple shading effects (making things look 3D) and use a modified patch/lightmap for each ship to paint hilights caused by engines, explosions and weapons fire. I'll write more when I have a better idea what I'm doing. Right now lighting is still a bit of a mystery to me, so I'm not sure anything I'd say would be even remotely correct.

Fixes. There have been quite a few fixes. And, there have been quite a few fixes of fixes. The most notable of these bumbles would be my 'fix' to the cGlTexture class to enforce that all textures be sized of the form m^2 by n^2. Basically that textures had to have a size like the following, 16x16, or 32x256 or 512x2048, etc. I have no idea where I read that requirement, but it seems it should have been 2m by 2n. The xSize and ySize only have to be divisible by two, not some power of two. So a whole lot of ugly code to fix that mistake has been removed and a bunch of new ugly code has been put in to fix that requirement.

Along with the fixes I've enhanced the cSurface interface quite a bit to allow more sensical access to the surfaces, as well as some simple primitives to manipulate them. It's truely awesome to have a good software surface API like SDL to be able to muck with things before they get into texture memory. It allows all sorts of trickery like the true type font texture generation that I'll be talking about soon. It really is priceless to have a solid community and well written interface to all these low level things. I can't even imagine trying to do a graphical project without it.

Along with fixes, I've added font support to libN2L, which was a long time coming and a LOT easier than I had expected. Right now I'm only allowing texture fonts, what Photoshop/Gimp people would know as a bitmap scaled font. Luckily, with some surface trickary using SDL I can generate a bitmap font on the fly from a True type font, which makes importing fonts into the engine wicked easy. Eventually I'll have to make some class to support the actual geometry of true types, but for now I'm content with using prerenders. They're anti-alised and mipmaped by any arbitrary quaility level, so it isn't like they're ugly... and when they get converted into a texture font it's wicked fast to render them. So I'm not going to be complaining any time fast.

Thanks again to SDL, the whole thing is tied in and working well with the virtual file system. I was worried for a bit when I saw that SDL_ttf didn't have RWops support but apparently the newest version has it built in, which saves me a lot of tinkering with code I don't understand. I'm a little disappointed that Red Hat is still distributing an old version of SDL's runtime but I would imagine by time I'm ready to release Red Hat will have caught up. It doesn't matter that much anyway since any binary public release I do will all be statically linked anyway.

A good friend of mine asked just a couple of days ago if Life/Onyx/? was going to run on Win32 and I said yes, but there's a good question buried in that question. Does it? The last test build I did on Win32 was over a month ago, and there's a lot of new stuff in the codebase that hasn't been tested. There's also quite a few outstanding problems that I had to jiggle the handle to get working in Win32 LAST time. I can only imagine how much there is now. I'm really getting a sinking feeling that I'll have to waste some time soon getting a test environment set up on my machine to build Win32 versions. All this is forgetting that my successful test months ago was only building libN2L, not any test application itself. I seem to remember that when I tried to build the particle fountain toy the linker went nuts, and I never found out why. I'm just assuming that my ignorance of Visual Studio was the problem. Hopefully.

Speaking of compatibility, I haven't even TRIED this thing on OS X yet. My girlfriend has a Mac in the apartment, but I haven't installed any development tools on it, so I'm really not sure what's going to happen when I actually try to BUILD anything, let alone run it. I guess I've just been assuming that Darwin's UNIX roots would make it easier to cross-compile than windows. I hope that doesn't turn out to be a big mistake. I just loath the idea of wasting a whole bunch of time setting up a test environment. Bah... some day.

I took some of pierre artwork and twiddled it a bit to make a desktop. I'd like to put it up, but the bastard hasn't emailed me back with his approval. I'd do it anyway but I know he'll have a hissy-fit if he thinks it's as ugly as I suspect he will. Oh well, works for me at least. *rolls eyes* Artists.

Speaking of pierre, he's been learning some 3D graphics stuff himself. I never stop being amazed at how quick he's learning, and it really, really PISSES ME OFF. Bastard. I'm thinking he's going to catch up and pass me in a matter of weeks. I can't even begin to explain how depressing that is. Of course, he IS learning DirectX, and you know what Master Yoda says... "If you choose the quick and easy path... you will become an agent of evil."

I think that's been a long enough break. I'm getting more into keyboard handling and I'm going to slap together some quick GUI widgets so I can move onto the Onxy startup. Now that I have fonts, and will have simple widgets I think it'll be time to actually focus on the game itself. Now that I'm only about 3 months late, it's about time.



Reader Comments

©2018 Aaron Cameron