Page 5 of 10

Re: Zombie Outrage 2 (ZO2 Updates)

Posted: Sat Sep 18, 2010 6:18 pm
by TheAustech
Okay, so since the lighting seems to be one of the problems, and lighting is one of the main things I plan on using to it's fullest in the game. I'm working on a completely new lighting system.

Image

Image

Image

I'm working on a way to get it more optimized though. Right now three lights drop the fps to about 50. And that's without Box2D running or any other entities :(

Re: Zombie Outrage 2 (ZO2 Updates)

Posted: Sat Sep 18, 2010 7:44 pm
by eatcomics
sweet... hey get on tinychat xD

Re: Zombie Outrage 2 (ZO2 Updates)

Posted: Sat Sep 18, 2010 7:49 pm
by TheAustech
eatcomics wrote:sweet... hey get on tinychat xD
Which channel is it? Long dev knights? XD

Re: Zombie Outrage 2 (ZO2 Updates)

Posted: Sat Sep 18, 2010 7:50 pm
by eatcomics
yes... minus the k... although....

Re: Zombie Outrage 2 (ZO2 Updates)

Posted: Sun Sep 19, 2010 6:21 am
by MrDeathNote
Man, thats pretty damn sweet. If you added some alpha blending to the light it would look so good.

Zombie Outrage 2 New Lighting System

Posted: Sun Sep 19, 2010 7:53 am
by TheAustech
So, I said that I would update the lights. The latest post a made was some little picture of a light with a simple rectangle. Hours have past, yet no update. Well, here it is. People wanted it, and it's added. ;)

The New Lighting System

Image
Image
Image
Image
http://www.youtube.com/watch?v=NFxENq0xiWU


Features:
  • Ray Casted Lights
    Per Boxel Lighting (Will be Explained)
    Shadows
    Optimization (Yet Still in the works)
Optimization Techniques:

Per Boxel Lighting - Ever heard of per pixel things? Things like per pixel lighting, per pixel collision. Well, in case you didn't know, that can be quite a CPU hog. But it's because it very precise. When colliding, it's to the very pixel (hence, "per pixel"), when lighting, it's down to the very pixel. So what is per boxel? Per Boxel is just some clever name I made up. Here's how it works:

It shoots rays of lights (ray casting) in the angle of the lighting. This is very accurate. But when looking for Blocks (things that block the light and casts a shadow), it doesn't cast a shadow down to the exact pixel. Instead, it stops based off the Block's Bounding Box. This allows the lights to reflect correctly, yet still maintaining a reasonable frame rate. The only downfall is that it's not 100% correct, meaning there may be some things that will cast a noticeable box shadow, when the block is a completely different shape.

Light Spacing - The way that lights get the roundness and the width of it's light is stored in it's class called "AngleSpacing". Yet the Light System itself it what takes advantage of it. The light system holds a variable that can be changed to set the spacing. What this does, is it determines how much spacing between the light rays until it reaches it's full light. The higher the spacing, the less light rays, yet the better the performance. Examples of changing the value are:
Image Spacing at 5.
Image Spacing at 2. You can see more light rays, and can easily make out the outline of the flashlight.
Image Spacing at 1. (Default for quality + performance.)
Image Spacing at .3 . (Default for quality)


My goal is to be able to run many lights + blocks at .3 spacing with little to no performance impact. I'm not too sure if I can, but believe me, I'm working on it. :P
On the video, you can see it running pretty smooth. Yet on the area where I'm shining lights through holes in the wall. I can feel a frame rate decrease. And that's not good obviously. :P


Thanks for reading. : )

Re: Zombie Outrage 2 (ZO2 Updates)

Posted: Sun Sep 19, 2010 8:05 am
by GroundUpEngine
Nice lighting system, looks awesome dude! :mrgreen:

Re: Zombie Outrage 2 (ZO2 Updates)

Posted: Sun Sep 19, 2010 8:13 am
by TheAustech
GroundUpEngine wrote:Nice lighting system, looks awesome dude! :mrgreen:
Thanks, also I noticed I got a new rank. :D
Image

Re: Zombie Outrage 2 (ZO2 Updates)

Posted: Sun Sep 19, 2010 9:59 am
by WSPSNIPER
TheAustech wrote:
GroundUpEngine wrote:Nice lighting system, looks awesome dude! :mrgreen:
Thanks, also I noticed I got a new rank. :D
Image

hell yes, that lighting system is epic!

Re: Zombie Outrage 2 (ZO2 Updates)

Posted: Sun Sep 19, 2010 12:05 pm
by eatcomics
:D You know how much we all envy your efforts :D

also my 99 cents is READY! lol

Re: Zombie Outrage 2 (ZO2 Updates)

Posted: Sun Sep 19, 2010 2:55 pm
by TheAustech
eatcomics wrote::D You know how much we all envy your efforts :D

also my 99 cents is READY! lol
WOO! :D

But put those pennies away good sir because I plan to make this game FA FA FA FREE! XD

Re: Zombie Outrage 2 (ZO2 Updates)

Posted: Sun Sep 19, 2010 2:58 pm
by eatcomics
TheAustech wrote:
But put those pennies away good sir because I plan to make this game FA FA FA FREE! XD
WHA WHA WHA???? OH MY GOD, THIS IS THE HAPPIEST DAY OF MY LIFE!!!!!!!!!!!!!!!!!!!! Now... what do I do with these 99 pennies... wait! One more and I can get a soda!

Re: Zombie Outrage 2 (ZO2 Updates)

Posted: Sun Sep 19, 2010 3:06 pm
by TheAustech
eatcomics wrote:
TheAustech wrote:
But put those pennies away good sir because I plan to make this game FA FA FA FREE! XD
WHA WHA WHA???? OH MY GOD, THIS IS THE HAPPIEST DAY OF MY LIFE!!!!!!!!!!!!!!!!!!!! Now... what do I do with these 99 pennies... wait! One more and I can get a soda!
How much would you pay for this ice cold soda? 1000 dollars? 100 dollars? ONE DOLLAR!?!? How about, oh shit. Yeah it's a dollar...

Re: Zombie Outrage 2 (ZO2 Updates)

Posted: Sun Sep 19, 2010 3:43 pm
by eatcomics
TheAustech wrote:
eatcomics wrote:
TheAustech wrote:
But put those pennies away good sir because I plan to make this game FA FA FA FREE! XD
WHA WHA WHA???? OH MY GOD, THIS IS THE HAPPIEST DAY OF MY LIFE!!!!!!!!!!!!!!!!!!!! Now... what do I do with these 99 pennies... wait! One more and I can get a soda!
How much would you pay for this ice cold soda? 1000 dollars? 100 dollars? ONE DOLLAR!?!? How about, oh shit. Yeah it's a dollar...
:lol:

Re: Zombie Outrage 2 (ZO2 Updates)

Posted: Sun Sep 19, 2010 3:48 pm
by TheAustech
Hey guys, notice any difference?
Image



No?
How about the fact that 15 lights are currently active checking against an area with many blockers still active while maintaining a decent frame rate. :D

Edit:
It's still being worked on as I speak. That's why it looks more shitty. :P