Archive for January 25, 2011

LIGHTS!

3

I finally closed the lighting issue. It had to do with culling, which I still don’t fully understand, but one of the Krypton developers gave me the proper code to place before preparing the Krypton lighting and I finally was able to see a light through my camera class. I am so, so excited that this is taken care of. It marks a really big point of progress in the project, and I should really be able to amp up development now that I’m not running into such a horrible wall.

Seriously, I can’t state enough how happy I am. The Krypton guys are absolutely amazing for looking at my project and helping me figure this out. I couldn’t have done it by myself. This is why I love open-source projects; we can all collaborate. I only hope that I’ll be able to help someone out as much as I’ve been helped today in the future.

I’m left with a tiny bit of a mess because of all the commented code I created when trying different things, but that’s perfectly fine. I think I might make a sweep through my entire codebase for an hour or so to clean everything up, and then I’ll be able to finish the light and shadow hull components and Lighting class, and then move on with developing some more cool lights (now that I FINALLY have real lighting!!!!!!!) and create the introductory sequence to the game!

Thanks to xixonia on the Krypton project for the help. I am truly indebted.

The Lighting System

0

I haven’t yet been able to resolve the Krypton issues I’m having, although I’m working very closely with the developers to try and resolve my problem. In the meantime I’ve been trying to think of the best way to split out the pieces of the lighting system into components that my game objects could use. The components are turning out to be fairly intuitive, so I’m glad that I made the decision to use them. For now, I’ve created simple components for lights and shadow hulls, so that each object which should cast a shadow in the game world gets a shadow component, which basically creates the shape that should be used to cast shadows in the lighting system and then adds it to Krypton’s collection of shadow hulls. The same sort of technique goes for the lights. And for the Krypton engine itself, I’m thinking the best way to handle it is to add another major class to my engine class called Lighting, which is a component like any other that is updated and drawn appropriately. Soon I will have to deal with the draw order of components in more detail, because things like the light artwork should be drawn over Krypton’s output to provide the illusion of an actual light, as opposed to just the light’s output.

All of this stuff is now in place in a very simple form, and I will be able to make it much more robust once I can figure out how to get Krypton working with my camera. This is really the crux of the project, so while I’m disappointed that I couldn’t have it in place already I feel that I’m pretty close, and I’ve also heard from others that they have successfully integrated Krypton with a camera system so I know that it is possible.

Go to Top