Volumes Of Fun http://www.volumesoffun.com/phpBB3/ |
|
Handling Large Worlds with LargeVolume http://www.volumesoffun.com/phpBB3/viewtopic.php?f=14&t=320 |
Page 1 of 1 |
Author: | Illidan [ Sun Jan 22, 2012 6:09 pm ] |
Post subject: | Handling Large Worlds with LargeVolume |
Hi, I'm using LargeVolume in my project and it's working very good. Today I tried loading a lot of voxels and I've seen the ram skyrocketting. I only need to keep in memory only a small area around the player, while new chunks are streamed form the server when needed, and distant ones can be deleted as they're no longer needed. How would I go about doing this? I suppose that if I only need, say, a 5-blocks (composed of 32 voxels per side) in every direction, I can call setMaxNumberOfBlocksInMemory with a value of 10*10*10, am I right? I think setting a "valid region" every time the player moves would be the best choice, thus deleting all the unneeded voxels outside of that region. Is that doable or I have to use the data Required/Overflow handlers? Or maybe I'm missing something and there's a better way of achieving what I want? Thanks in advance for any answer ![]() |
Author: | Illidan [ Mon Jan 23, 2012 5:05 pm ] |
Post subject: | Re: Handling Large Worlds with LargeVolume |
Obviously I've missed the flush function ![]() However my question from the previous post still stands: If I set the maximum numbers of blocks in memory to 10*10*10, will PolyVox retain a maximum number of 1000 32x32x32 blocks in memory? Thanks in advance. |
Author: | ker [ Mon Jan 23, 2012 9:49 pm ] |
Post subject: | Re: Handling Large Worlds with LargeVolume |
in short. yes. but it discards the oldest blocks, so that might not be your desired behavior. i created the largevolume... but i am not always happy with the way it works. everyone expects something different from it and it cant be completely universal. maybe there should be many largevolumes. for your case i advise only using prefetch and the callbacks. always call prefetch on your current active region. give yourself a little buffer, too. if you want 10x10x10 use 12x12x12 max loaded blocks instead, but use your 10x10x10 region for extraction and prefetch calls. |
Page 1 of 1 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |