Jump to content
  • Advertisement
  • entries
  • comments
  • views


Sign in to follow this  


Polishing up the lighting code that I ripped from Golem:

Allows static and dynamic light types. Day and night cycles affect ambient light as well. Currently, time interpolates between a Day and a Night ambient color, but I will eventually attach it to a color gradient instead to allow more flexibility in how the time of day affects the ambient lighting color, how rapidly day changes to night, etc... Static and dynamic lights can be colored, and can even have negative intensities (cool for implementing spells of darkness, regions of evil darkness, etc...) One cool effect is to place an altar to an evil god, and place a light with negative R and G components and a positive B component. This has the effect of leaching R and G out of the area, and giving everything a sinister blue cast. Doing similar with R positive and B and G negative gives it a hellish red light. Fun stuff. Fun stuff.

At some point in the past, for some vaguely recalled reason, I eliminated 'ceilings' for tiles, and incorporated 'ceilings' to be part of the wall instead. Well, this looks bad with lighting enabled, so I'll probably be bringing 'ceilings' back. It'll add an extra pass to the rendering loop, but shouldn't affect performance noticeably. A ceiling piece has to be lit in a manner similar to a floor tile (ie, a lightmap color value for each vertex) while a wall piece is only lit using the color values for the front two vertices. On walls running east and west, it looks fine. On walls running north and south, it looks like ass.

With the console completed, I have one final small change on my list of things to do (assuming I hold off on ceilings until later), then I'll freeze features and try to do as much testing and bug-fixing as I can. Then, I'll upload. Finally. It'll be buggy, but what else is new... [grin]

As evolutional intimated, this thing is getting closer and closer to being an actual game. It's actually pretty much over-engineered for what it is. I've been fiddling around on paper with some ideas for a game to build upon it, which I may end up doing. All in all, although this thing has many faults (and more appear with every new 'feature'), it is a lot nicer to work with than the original Golem 2D engine, in terms of organization, convenience and structure. A lot of the ideas I had for that original game are still screaming around in my head, begging to be let out, and this would be a much more convenient vehicle for their expression. We'll see how it goes.
Sign in to follow this  

1 Comment

Recommended Comments

Well, will it be an engine? Can I use it to make my own game? Really looks awesome.
Another question, will you make a similar work with Golem3D?

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!