It is currently Sat Aug 22, 2020 3:32 pm


All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Handling Large Worlds with LargeVolume
PostPosted: Sun Jan 22, 2012 6:09 pm 

Joined: Sat Dec 17, 2011 5:42 pm
Posts: 19
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 :)


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Handling Large Worlds with LargeVolume
PostPosted: Mon Jan 23, 2012 5:05 pm 

Joined: Sat Dec 17, 2011 5:42 pm
Posts: 19
Obviously I've missed the flush function :roll: Everything works fine now!

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.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Handling Large Worlds with LargeVolume
PostPosted: Mon Jan 23, 2012 9:49 pm 
User avatar

Joined: Wed Jan 26, 2011 3:20 pm
Posts: 203
Location: Germany
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.


Top
Offline Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created StylerBB.net