development     reviews     feed

The Lighting System

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.