So, I accidentally spent time on my other competition entry. I'm still undecided as to which one I'm going to finish, so I'm working on both.
As for how I accidentally spent time working on it… I was going to play some Minecraft last night, but I kinda missed the launcher (By about ten inches).Anyway, this is where I was, post 7DFPS:I had introduced GLSL shaders to Exile's engine, and was doing a great job of borking simple lighting calculations. Also, everything was too shiny.So last night, I opened the project again (And branched it), and decided to start working on the Lightbound side of things.Lightbound has an emphasis on light and dark, so I basically decided that if I had made no progress in my lighting code by the end of the night, I'd ditch the idea.In GM I had fudged the lighting by using fog. The results couldn't be called great.Anyway, Exile's engine.Even though I've added shaders to the game thanks to SFML 2 supporting them (almost) fully now, I was still limited in what I could do.SFML still lacks a way of sending attributes to shaders, something that is very useful when working with lighting (Can send in several attributes per vertex for a light source, or an array of light sources).I can still access the attributes mechanism via the normal OpenGL functions, but if I'm going to do that, I'm rewriting my code to load the shaders itself. Which I'm going to do; I want full access to the OpenGL 3.2 specification.The only way SFML provides for passing information to a shader is via Uniform variables. Uniforms, though, are more or less intended to pass information that doesn't change per object. Using it per-vertex is slow as heck (I've tried it before).So I decided to use a bit of trickery. First of all, I implemented some basic Hemispheric lighting, to set the ambient levels. That didn't require much in the way of work or data being passed around.Then, I created a function that took a vertex position, and calculated the nearest/strongest light source nearby using a simplified distance calculation, then returned a value between 0.0F and 1.0F. From there, I called this per-vertex and passed the return value to glVertex4f, then trimmed the w value in my shaders to calculate lighting intensity per vertex.Here are the results so far:And if you think I'm having saturation issues… nope. Both of the textures I used for the test map are similar shades of gray. Then I took some of Lightbound's original tiles and dropped them into a test map.Anyway, the lighting isn't perfect. Far from it. I'd love to implement something a bit more complex (And with real shadows), but I'll take what I've got so far and ride with it.There is something I need to do. You'll notice in the first screenshot of the new lighting code that the back wall isn't lit. This is because the light is positioned at the corner of the grid position instead of in the middle of the grid position. Fortunately for me, that's a simple fix.Now, on the surface the lighting doesn't really look that useful/interesting. But with the system I have now, I can finally add dynamic lights, which is one of the backbones of the game.
I usually don't feel to comfortable using a real picture of me for an avatar, especially on sites like these where it's really uncommon and appears sorta odd when compared to everyone else. Besides there's no reason to do it, i don't want people to judge me based on my appearance, i'd rather them judge me based on my games. (also we get enough of that judgement in the real world, isn't the internet a place to escape from our normal identities?)
Charlo, I was expecting a top hat and cigarette, because that picture reminds me of your first avatar.
In my mind, Charlie will forever be a white-eyed, slightly disheveled smoker with a fedora no matter how many hair cuts he gets.
Unless we meet up for a round of milkshakes, of course. Then maybe that image will be dispelled.The only reason I switched my avatar here (And elsewhere) to a photo was because I was too lazy to draw a new avatar this time (I usually try drawing two per year).
Maybe I'll switch back to one of my others…Charlie looks surprisingly right for his art style.
looks really polished from what i can see Mega. good work. though i can't see much considering my brightness is on the lowest setting haha.
edit: note to never post tumblr images here again. no matter what i do i'm gonna get some unrelated animated gif in response.Beards are not mandatory. You can't kiss people without brushing all over their face.