Concerning your Update sync.

View previous topic View next topic Go down

Concerning your Update sync.

Post by S33m3 on Thu Apr 28, 2011 2:52 am

In your previous mesage you write :

The update logic is a bugbear of mine and is basically working at the moment but i am far from happy with it. There are times you can briefly see 'gaps' when you build or dig and the light can visibly update over a few frames. The infrastructure is in place to rework this and it will be something i undertake in the near future, hopefully to get it back to instant updates with no gaps or partial updates.

I have noticed that on occasion the light doesn't look right, and when you build or dig a block in the wrong looking area it corrects itself. Again, this is the update logic problem and hopefully will be fixed soon.

It's "funny", because I faced exactly the same problem ! Smile

Why I did to sort this out is :

For the "gaps" : I had this problem with face culling that are in a chunk border. it's obvious : if multiples chunks needs to be updated after a user created/remove a cube then the chunk rebuild order matters. If I place a seethrough block (= Replacing a block by air = Destroying), then all neighbor chunks must be rebuilt and send to graphic card first, and after that only I can refresh the chunk where the modification did happens. And it's in the other order (block chunk first, neighbor chunks after) if the bloc is blocking light !

For the Light, what I did : When a block is modified, I created a cube range depending on what is the maximum light influence this block could have.
ex : Let's say that that maximum light propagation is 16, then the range will be (For a block located at X, Y, Z) : Min : X - 8, 0 , Z - 8, Max : X + 8, 127, Z + 8.
I do a light source refreshing inside this range.
And after a light propagation on this range + 1 (To take into account the light surrending this refreshed range), so in our case the range will be : Min : X - 9, 0 , Z - 9, Max : X + 9, 127, Z + 9.

Hope it could help you !

S33m3

Posts : 54
Join date : 2011-03-23

View user profile

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum