Report article RSS Feed Infdev water and save-breaks

infdev is getting a huge epic new water system. but the bad news is, in over a week, all infdev saves will be broken.

Posted by Kizzycocoa on Jun 14th, 2010

Good news and bad news. Infdev is getting a massive water update! when? tomorrow! (15th june 2010)


Now, the bad news. I hate to do this, but I will break all your infdev saves.

One of the major performance issues with infdev is how it saves levels. I need to give it a major overhaul, and that will cause all old saves to break.

It would be possible to write a level converter for it, but I’m leaning towards not doing it, as it’s quite a bit of work just for preserving levels in a development build of an alpha version of the game..
If people are REALLY in love with their games, I could probably do something that converts only the terrain (no mobs, no chest contents, not keeping track of the time of day), or possibly work with some volunteer and give out information on how to write a level converter. If you wish to do this, first make sure you understand the NBT file format.

This save breaking change almost certainly won’t happen this week, and I won’t delete the old files after the change, so there’s still time to implement a converter after the change.

As requested, here’s the actual technical reason:

Right now, the level is saved in files that cover 16*16*128 blocks. Each file gets a unique name for the zone it covers, and gets saved to a subdirectory of a subdirectory to avoid having too many files in a single dir. My test level (which isn’t huge by any means) takes up 6.11 MB in 4825 files in 4160 folders. That’s an average of just over 1 kb per file. The file system on my computer (and many others) won’t allocate less than 4 kb per file, so the actual space used for this save is 18.8 mb. That means that the save is three times the size it really should be.

Saving and loading new areas of a map causes a lot of file seeks and reads (30 per second is not uncommon), which is far from optimal. Added on top of this is the time spent compressing and decompressing the data.

Instead, the new plan is to store data in much larger individual zones of uncompressed terrain data that can be directly memory mapped. Each zone will probably be something like 256*256*128 blocks and will occupy 4 MB each. Entities and Tile Entities will be saved in a separate database like structure.

(development blog links #1, #2)

Post comment Comments
Eegah
Eegah Jun 14 2010, 3:42pm says:

No problem to me, I'll just be glad to see infdev streaming more smoothly. I don't know why anyone would have started a big building project in an infdev save. On top of that, anyone who's done any building in multiplayer should have learned by now not to get too attached to anything they've built; it's very Zen garden in a way.

It's also good to see features like working water coming back, it looks even better than the earlier version, I can see more detailed flow to it, very cool, notcho.

+2 votes     reply to comment
doppl3r
doppl3r Jun 14 2010, 3:56pm says:

I'm glad to see Notch posting on moddb. This will for-sure help with popularity as he gets further in alpha testing. The water looks great!

+2 votes     reply to comment
Rook98
Rook98 Jun 14 2010, 4:05pm says:

Dynamic water? SWEET!

+1 vote     reply to comment
Arxae
Arxae Jun 14 2010, 4:38pm says:

dynamic water is already in lol
as are caves :p
how about you make a cave and then make sure water has the possibility to flow in , youl see how dynamic it is xD

+1 vote     reply to comment
Kizzycocoa Author
Kizzycocoa Jun 14 2010, 4:41pm replied:

inFdev. not indev. :P

+2 votes   reply to comment
Arxae
Arxae Jun 14 2010, 4:49pm replied:

why is that a reply to me? xD

+1 vote     reply to comment
Kizzycocoa Author
Kizzycocoa Jun 14 2010, 6:45pm replied:

because you said water is dynamic and infdev has caves.

water is not dynamic at all, and no caves are generated. so you must be mistaken :P

+1 vote   reply to comment
Arxae
Arxae Jun 15 2010, 4:07am replied:

oooh like that
excuse me then xD

+2 votes     reply to comment
Kizzycocoa Author
Kizzycocoa Jun 15 2010, 7:30am replied:

no problem at all ^^

+2 votes   reply to comment
Jelemonde
Jelemonde Jun 15 2010, 9:02pm says:

Notch posting on Moddb O_O Auto Track!

+1 vote     reply to comment
Kizzycocoa Author
Kizzycocoa Jun 16 2010, 3:04am replied:

actually, I'm posting this stuff for him. but if it gets active enough, he could very well start posting it himself :D

+1 vote   reply to comment
pyrko
pyrko May 21 2011, 1:34pm says:

Do you have indevf version mine craft please let me play it very like looking for a long time

+1 vote     reply to comment
Post a Comment
click to sign in

You are not logged in, your comment will be anonymous unless you join the community today (totally free - or sign in with your social account on the right) which we encourage all contributors to do.

2000 characters limit; HTML formatting and smileys are not supported - text only

News
Browse
News
Report Abuse
Report article
Related Games
Minecraft
Minecraft Single & Multiplayer Adventure
Related Engines
Custom Built
Custom Built Commercial Released Sep 1, 2007