Mythruna
April 16, 2024, 07:57:06 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to the new forums. See "Announcements" for a note for new users.
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: Progress...  (Read 14442 times)
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« on: June 01, 2013, 12:13:43 AM »

So, life has been pretty "one thing after another" lately but I have been able to make some progress.

Tonight, I finally got all major features of the new light propagation system working.  It was like pulling teeth because I hate working on lighting.  Cellular automata at this level is notoriously difficult to debug but it's a bit easier than it used to be.

The old engine did all of the lighting on the "back end".  Ultimately the light values were part of the blocks themselves though it was encoded separately.  On the plus side, in multiplayer, lighting was only calculated once and then sent out to everyone.  On the down side, since the lighting values were saved with the blocks then any errors were persistent.  It also made ever doing smooth lighting (or even better optional smooth lighting) nearly impossible.

The new engine chooses to use the space on the back end to store more general data about a cell.  Instead of storing the lighting it stores things like where the solid visible sides are based on the surrounding blocks... and it stores which direction light can travel into and out of a cell.

This information is much easier to calculate and of much more general use to the engine.  The solid side masks, for example, are used by the physics engine for collision detection.  The "light masks" can be used for AI pathfinding, light propagation... even sound, smell, water, and smoke propagation.  (all of which are on the to-do list... sound propagation coming sooner rather than later).

However, the new architecture then heavily favors calculating lighting on the client, ie: in the graphics layer.  This meant that I really couldn't use any of the old code.  (Which had the benefits of not porting those long-standing bugs over.)

On the plus side, the lighting calculations are much faster overall.  The light masks make this sort of propagation really straight forward now since the "which way can light pass" is baked into the world.  Also, geometry/mesh generation is greatly simplified and faster because of the solid side data baked in.  On my system, in many cases it now only takes 4 or 5 milliseconds to recalculate the lighting and rebuild the geometry when a lighting value changes (block added/removed, light added/removed, etc.)

Also, because the lighting is handled externally to the world it means that I can someday potentially make it perception based.  Perhaps certain races see some lighting colors better than others, etc..

The big deal will be dynamic lighting.  I can fully add lights to the view now without them being part of the world as blocks.  So while I'm not yet at the point where I can add player carried torches or blueprint objects providing light to the scene, it's now totally doable.  Not even tricky.

Like physics integration, this is a pretty major milestone because it was one of those systems that was completely different than what came before.  A lot of things to come will get some reworking or at the very least a new UI... and those are their own level of fun+perfectionist-compulsion, but they are still relatively straight forward.  Put some music on and hammer through it.

For this next "equivalence" release, I think the only major milestone left of the "big" size is the networking.  Very little of that will port over because I plan to widen the "logging in stage" to handle character creation a little more robustly and the physics networking integration will be a significant effort... also, while I'm rebuilding it I will try to add the auto-reconnect feature that is really missing right now for when the connection blips.

The rest of the stuff: porting the blueprint editor, property system, object action scripts, etc.. is more straight forward.  I'm trying to at least have equivalent functionality to the last version before releasing.  Even if climbing is broken and there are nitpicky physics bugs.  We'll figure something out.

A year is too long.
Logged
Sean
Donators
Hero Member
***
Posts: 598



View Profile
« Reply #1 on: June 01, 2013, 07:29:00 AM »

This seems to me you are hinting a public update soon?? Smiley
Logged

"People willing to trade their freedom for temporary security deserve neither and will lose both." - Benjamin Franklin
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #2 on: June 01, 2013, 08:24:22 AM »

This seems to me you are hinting a public update soon?? Smiley

I hope so.  There is still a lot of work to do so it's anyone's guess what "soon" means.  There will be one or two private updates before that.

When I get the new builder wand done and tweak the physics a little then I'll probably put out another donators-only release.
Logged
BigredRm
Donators
Sr. Member
***
Posts: 379


<-o Word up goes to that modern man o->


View Profile
« Reply #3 on: June 01, 2013, 09:04:27 AM »

Love the update.  Thanks
Logged

Visit Iron Island @ 1708,702
Michael
Donators
Hero Member
***
Posts: 2166



View Profile
« Reply #4 on: June 01, 2013, 11:28:38 AM »

Thank you for the update, I never knew that the lighting was actually attached to the blocks.
I hope you enjoy your programming!
Logged
BenKenobiWan
Friendly Moderator
Donators
Hero Member
***
Posts: 674


Jesus loves you!


View Profile
« Reply #5 on: June 01, 2013, 02:44:20 PM »

Thanks for the update!
Does this mean that the lighting will be somewhat faster, more flexible client-side, and more realistic?
Logged
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #6 on: June 01, 2013, 08:35:52 PM »

Thanks for the update!
Does this mean that the lighting will be somewhat faster, more flexible client-side, and more realistic?

Probably not more realistic.  There are limitations to the approach.

Faster, yes... though not in a way that the player would notice except for now I can do things with it that I couldn't before.  From the player's perspective, lighting was fast enough before.

I forgot to mention that the new system also supports colored lighting.  That's in and already working.
Logged
Michael
Donators
Hero Member
***
Posts: 2166



View Profile
« Reply #7 on: June 02, 2013, 09:35:58 AM »

Thanks for the update!
Does this mean that the lighting will be somewhat faster, more flexible client-side, and more realistic?

Probably not more realistic.  There are limitations to the approach.

Faster, yes... though not in a way that the player would notice except for now I can do things with it that I couldn't before.  From the player's perspective, lighting was fast enough before.

I forgot to mention that the new system also supports colored lighting.  That's in and already working.
I just love the updates on new engines, tells us what you and the community can do that we couldn't do before with a new engine.
Logged
ebag51
Donators
Hero Member
***
Posts: 531


View Profile
« Reply #8 on: June 02, 2013, 09:56:47 AM »

one more update closer to survival and npcs  Smiley
Logged

belgariad87
Donators
Hero Member
***
Posts: 507


RPG player for life


View Profile
« Reply #9 on: June 03, 2013, 09:09:18 AM »

thanks for the update, Paul. I look forward to the day when all these are done and we can get to the good stuff  Smiley
Logged

Specs for future reference:
Windows 7 64bit ; Intel Quad Core ; 8GB RAM ; AMD Radeon HD 6800 ; TB HD
Sean
Donators
Hero Member
***
Posts: 598



View Profile
« Reply #10 on: June 03, 2013, 11:27:08 AM »

thanks for the update, Paul. I look forward to the day when all these are done and we can get to the good stuff  Smiley
The one thing about programming that turns me off the most is all of the BORING stuff that needs to get done before the good parts.
Logged

"People willing to trade their freedom for temporary security deserve neither and will lose both." - Benjamin Franklin
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #11 on: June 03, 2013, 11:56:54 AM »

thanks for the update, Paul. I look forward to the day when all these are done and we can get to the good stuff  Smiley
The one thing about programming that turns me off the most is all of the BORING stuff that needs to get done before the good parts.

Heheh.  Normally it's not quite this bad.  The things that I've already done three times before with much pain have already had all of the life sucked out of them.  Up until now, lighting has been my least favorite thing to debug.  Testing is difficult and there are so many edge cases.  The new algorithm is simpler and I built a lot of trace logging into it that I can turn on and off as needed.  That's helped a lot.
Logged
belgariad87
Donators
Hero Member
***
Posts: 507


RPG player for life


View Profile
« Reply #12 on: June 04, 2013, 04:09:03 AM »

thanks for the update, Paul. I look forward to the day when all these are done and we can get to the good stuff  Smiley
The one thing about programming that turns me off the most is all of the BORING stuff that needs to get done before the good parts.

Heheh.  Normally it's not quite this bad.  The things that I've already done three times before with much pain have already had all of the life sucked out of them.  Up until now, lighting has been my least favorite thing to debug.  Testing is difficult and there are so many edge cases.  The new algorithm is simpler and I built a lot of trace logging into it that I can turn on and off as needed.  That's helped a lot.
Paul, i think the only problem here is that you are TOO good at your job.
Logged

Specs for future reference:
Windows 7 64bit ; Intel Quad Core ; 8GB RAM ; AMD Radeon HD 6800 ; TB HD
Michael
Donators
Hero Member
***
Posts: 2166



View Profile
« Reply #13 on: June 04, 2013, 09:22:05 AM »

thanks for the update, Paul. I look forward to the day when all these are done and we can get to the good stuff  Smiley
The one thing about programming that turns me off the most is all of the BORING stuff that needs to get done before the good parts.

Heheh.  Normally it's not quite this bad.  The things that I've already done three times before with much pain have already had all of the life sucked out of them.  Up until now, lighting has been my least favorite thing to debug.  Testing is difficult and there are so many edge cases.  The new algorithm is simpler and I built a lot of trace logging into it that I can turn on and off as needed.  That's helped a lot.
Paul, i think the only problem here is that you are TOO good at your job.
You can never be too good..
Logged
Teknonick
Sr. Member
****
Posts: 438


View Profile
« Reply #14 on: June 04, 2013, 11:40:07 AM »

thanks for the update, Paul. I look forward to the day when all these are done and we can get to the good stuff  Smiley
The one thing about programming that turns me off the most is all of the BORING stuff that needs to get done before the good parts.

Heheh.  Normally it's not quite this bad.  The things that I've already done three times before with much pain have already had all of the life sucked out of them.  Up until now, lighting has been my least favorite thing to debug.  Testing is difficult and there are so many edge cases.  The new algorithm is simpler and I built a lot of trace logging into it that I can turn on and off as needed.  That's helped a lot.
Paul, i think the only problem here is that you are TOO good at your job.
You can never be too good..
Except for when you're Paul. If we don't watch him, he might take over the world and go power crazy. :O!
Logged
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!