Tedious work

From the last post you know that starting from the next version (1.29) Survivalcraft will use 32 bit blocks instead of 16 bit.

I am working through the existing blocks and updating them one by one to take advantage of this sudden abundance of bits.

One thing that is now possible is this:

Paintable stairs.jpgPaintable stairs

I am about halfway through with it and have lots more stuff done than just stairs painting. I will show you later.

Anyway, it is delicate work. I am sure I will break very many things. The chunks file format is changing completely. Additionally, I will of course provide backwards compatibility. You won’t notice anything when loading a 1.28 world into 1.29 game. But behind the loading screen, every block will be scanned and expanded, its bits jumping in all directions.

I noticed that you are speculating what difference 32 bits make from the technical point of view. Here’s a brief explanation:

In 1.28 and earlier, each block takes 16 bits in memory:

Number of bits (total 16) Usage
8 Block ID
4 Light intensity
4 Block data

In 1.29, the structure looks as follows:

Number of bits (total 32) Usage
10 Block ID
4 Light intensity
18 Block data

As you see, in 1.29 the number of data bits jumps from 4 to 18. And Block ID is encoded using 10 bits instead of 8, giving a total of 1024 block IDs instead of 256 (remember when I was saying we’re running out of block IDs? No more).

How does the game use data bits? Every block does it differently. Take stairs for example. First 2 bits encode rotation (4 possible rotations). Third bit says whether stairs are upside-down. Fourth and fifth bits encode corner state (00 – no corner, 01 – inner corner, 10 – outer corner, 11 – undefined). Bit 6 says whether stairs are painted. Bits 7, 8, 9, 10 determine paint color (one of 16), if bit 6 was enabled.

In total, 10 bits out of 18 are used by the stairs.

This new structure is actually still in the air. As far as I can see now, no block will use more than 16 bits of data. It means I could take 2 bits from the data and give it to Block ID. That would extend number of available block IDs to 4096 (from 1024) – and incidentally bring us to the structure used by Minecraft since anvil file format was introduced. I am still pondering which is best.


  1. Posted December 28, 2015 at 01:21 | Permalink | Reply

    I am so happy that the game is going to be converted to 32 Bits. This is a big update Kaalus. Thank you.

    • Posted December 28, 2015 at 14:54 | Permalink | Reply

      Not the game, just the blocks. The game is already in 32 bits and 64 bits, depending on your OS and CPU. But I think the game runs in a 32 bit environment to be compatible with all devices.

      • Posted December 28, 2015 at 17:33 | Permalink | Reply

        Oh, thank you for the clarification.

      • Posted December 28, 2015 at 20:03 | Permalink | Reply

        No, it runs in 32 and 64 bit environments, I think kaalus mentioned that this was a new feature of Engine.

  2. Posted December 28, 2015 at 01:24 | Permalink | Reply

    Wow! Sounds complicated, but we are sure they’ll pull it off. So excited for the update!

  3. Posted December 28, 2015 at 01:24 | Permalink | Reply

    So can u add multipplayer in this Big Update?

  4. shez951
    Posted December 28, 2015 at 01:28 | Permalink | Reply

    Wooow kaalus sounds awesome!
    However I’ve got a question. Will this impact performence in a negative way?

  5. Posted December 28, 2015 at 01:30 | Permalink | Reply

    Nice work! Can’t wait for 1.29, this is going to be so cool! Also, will there be more paint colors available for wood, brick and granite? :P

  6. Posted December 28, 2015 at 01:33 | Permalink | Reply

    Can you add multiplayer please? This thing make the game more challenging and more fun.

  7. Posted December 28, 2015 at 01:42 | Permalink | Reply

    You’re awesome Kaalus, can’t wait!! Ty! Ty!

  8. Posted December 28, 2015 at 01:56 | Permalink | Reply

    Hey! Happy new year! Great work. Please add a check box in the recipe dis to suppress or allow the paint colors. It takes way too long to scroll to the bottom with all of the colors.

  9. Posted December 28, 2015 at 02:00 | Permalink | Reply

    Will this mean we can paint more stuff? Such as marble, stone brick, glass

  10. Posted December 28, 2015 at 02:22 | Permalink | Reply

    Yesssssss I will finally be able to paint stairs! I’ve been waiting so long…

  11. colbyfranknorth
    Posted December 28, 2015 at 02:53 | Permalink | Reply

    Awesome! Now i sort of understand it. Will this mean repairing blocks and weapons, and proper breaking of blocks and kept progress in digging? Hope so!

  12. colbyfranknorth
    Posted December 28, 2015 at 02:55 | Permalink | Reply

    Is that a new block in the background? The structure-like thing? Maybe birch stairs, or a completely different thing. Or nothing at all.

  13. colbyfranknorth
    Posted December 28, 2015 at 02:56 | Permalink | Reply

    Nah, i think it’s cobblestone.

  14. Posted December 28, 2015 at 03:15 | Permalink | Reply

    Two Q:
    1 will world texture file layout change? If so can we get a template in advance?
    2 will wood blocks (& others) now be rotatable? Creative needs this for beams.

    Thanks Kaalus!! 🎉

    • colbyfranknorth
      Posted December 28, 2015 at 03:41 | Permalink | Reply

      Hey, Aesop! I like your blog, but can you post soon? Also, i think it will include rotatable blocks, as hinted two posts ago.

  15. Posted December 28, 2015 at 03:41 | Permalink | Reply

    So if you have more I’d could you fix the problem with slabs as floor. Everytime i put slabs as the floor all items are floating in air while I’m standing just fine. The other blocks probably think that the wooden slabs are like wooden planks that’s why they look like foating.

    • Posted December 28, 2015 at 05:14 | Permalink | Reply

      Hi there. It is not a bug. Slabs can be placed on two heights. If you place them on the lower part of a block, there is a gap above them. If you place them on the upper part of a block, there will be a gap below them, but your furniture will not float.

    • Posted December 28, 2015 at 15:27 | Permalink | Reply

      Look the blocks cannot enter eachother…. For example… Slabs are half hight blocks but they have the same 1×1×1 block boundary that every single block in the game, with the exception of doors, works with….so if the slab was on the ground the furniture won’t be able to fall into place like an entity ,like you, would….. Instead all blocks must stay inside there own gridspace….. To prove my point… Do this put a slab on the ground next to a full sized block so there touching….. Next you take the same or different kind of slab…. Any kind will prove my point….. Then tap on the open half hight opining directly above the slab…. What you will find is that the slab will brake and be replaced with the new one…. The two slabs don’t join to become a full block simply because they both work with a 1×1×1 grid that outside blocks cannot enter…

  16. Posted December 28, 2015 at 04:20 | Permalink | Reply

    Chunks Dat completely changing…


    Let’s see how that goes xD

  17. Posted December 28, 2015 at 04:21 | Permalink | Reply

    And this sounds so awesome I can’t wait…

  18. Posted December 28, 2015 at 05:00 | Permalink | Reply

    Kaalus, I have found a bug. In one of my worlds I can not drink milk anymore. When I make new worlds I can drink milk but after a while I can’t. I have an iPad2 IOS7

  19. Posted December 28, 2015 at 05:31 | Permalink | Reply

    Instead of giving each and every different colour block in the inventory, can’t you rather have just one block and then paint them and use that as a user block. The inventory is becoming a bit too big and with all the new colours will make it even worse.

    • Posted December 28, 2015 at 05:38 | Permalink | Reply

      Also by doing this, maybe you can increase the colour depth by one or two bits, giving us 32 or 64 colours.

    • Posted January 1, 2016 at 08:16 | Permalink | Reply

      I support your idea. I like this…

      Se va a hacer demaciado largo el inventario con cada cosa en sus diferentes colores, seria mejor colocar el base y agregar una seccion con los baldes llenos de los diferentes colores de pinturas. Facilitaria mucho. Thanks

  20. Posted December 28, 2015 at 06:06 | Permalink | Reply

    is it new slab’s rotation on background?

  21. shez951
    Posted December 28, 2015 at 06:52 | Permalink | Reply

    Is the new grand feature a sort of enchantment system? Like minecraft but a lot more realistic.

    • shez951
      Posted December 28, 2015 at 06:55 | Permalink | Reply

      Or another way to put it is modifying/upgrading tools

    • colbyfranknorth
      Posted December 28, 2015 at 15:31 | Permalink | Reply

      I would hate it if there was an enchantment system in a game like this.

      • MTB adventures/RCs to the limit
        Posted December 28, 2015 at 16:06 | Permalink | Reply

        Yep. me too.

  22. Posted December 28, 2015 at 07:47 | Permalink | Reply

    Please make all arrows NOT to fly back with deadly velocity. It makes your game a masochistic suicide simulator.

  23. Posted December 28, 2015 at 08:27 | Permalink | Reply

    Those stairs in the background look like white-painted basalt stairs.

  24. Posted December 28, 2015 at 14:39 | Permalink | Reply

    *What about adding a “backpack” in the game as source of carrying items. (Inventory).
    *Blocks can can be painted in a single side/both as usual.

    • MTB adventures/RCs to the limit
      Posted December 28, 2015 at 16:03 | Permalink | Reply

      Yes a backpack!

  25. Posted December 28, 2015 at 14:40 | Permalink | Reply

    I wish Kaalus would make fence out of different kind of stone. So it’ll match my houses made of sandstone and brick. ^_^

  26. Posted December 28, 2015 at 15:07 | Permalink | Reply

    OK, so the different block have different data sets. That gives some flexibility. I though they shared it. For instance, stairs have rotation etc, while water have movement information. Do I understand it correctly?

    I see the number of colours stay the same. It was 16 and is still. Is there a chance that some blocks can have more colours? One guy mentioned that glass must also be coloured. This could be possible in this case, not so?

    Personally I think you can stay with 1024 ID’s and leave the change for when you can increase the bits again somewhere in the furture, maybe in 2 years time.

    Now you can use those 2 bits for more colours or for something else in electronics. From 256 to 1024 is quite a big step. If you want to, just use 1 bit extra, to 2048 if you are unsure. When will you exceed that? Not soon…. Just add one bit more to colour and we can have 32 colours, or 2 bits for 64. It will call for a redesign of the inventory, which will take quite long I suppose. Maybe for a future update?

  27. Posted December 28, 2015 at 15:56 | Permalink | Reply

    Kaalus there is a major bug in my game where the game`s frame rate drastically decreases untill it crashes or until you close the app. Everytime i feed or ride my horse this happens and it is very annoying. Please fix this in the next update!

    • Posted December 28, 2015 at 16:30 | Permalink | Reply

      It only seems to happen on downloaded worlds

    • Posted December 28, 2015 at 18:32 | Permalink | Reply

      There is another issue that would be nice if it could be fixed. When your world has a lot of electronics, the framerate drops, even if you are notclose to the electronics. Maybe updating electronics can reduce as you move away or something.

  28. MTB adventures/RCs to the limit
    Posted December 28, 2015 at 15:58 | Permalink | Reply

    Woah, A little bit complicated for me. :) You do this so fast now! cant wait for more!

  29. Posted December 28, 2015 at 17:29 | Permalink | Reply

    One thing I have always wanted was a pressure sensor that only defects pressure through a block for example… You want a land mine With no way of detecting it…. So below the dirt is a pressure sensor that detects pressure through the dirt and explodes when you step on the dirt….

  30. Posted December 28, 2015 at 18:52 | Permalink | Reply

    Can you add Multiplayer? PLEASE!!!😫

  31. Posted December 28, 2015 at 18:55 | Permalink | Reply

    Multiplayer would be really cool because I am already making a world for multiplayer servers

  32. Posted December 28, 2015 at 20:07 | Permalink | Reply

    Ah, I was a bit confused; I didn’t realise that the 16, now 32, bits were for the entire block. Anyway, 18 bits of block data means 262144 possible variants of each block. 16 means [only] 65536. Still, it’s a lot better than the previous 16.

  33. Posted December 28, 2015 at 20:25 | Permalink | Reply

    I suspected the chunks.dat structure would completely change…I use hexedit for PC but are there any recommendations for Mac? I sure hope Kaalus updates the documentation quickly!

    • Posted December 28, 2015 at 20:46 | Permalink | Reply

      I hope there’s not too much code rewriting to do lol…

      Do you have any free time to take the world before 1.28? There’s just a few block changes and a couple of chunks. I can’t remember much lol…

      • Posted December 28, 2015 at 20:46 | Permalink | Reply


        Time machine

        • Posted December 28, 2015 at 21:11 | Permalink

          Good point! I should finish up the hex work before 1.29. Can you send me a PM on WP? I’m on vacation till 4-Jan.

        • Posted December 30, 2015 at 02:23 | Permalink

          Same :P would a forum pm be OK? I don’t think I can pm you on wordpress..

  34. Posted December 28, 2015 at 21:04 | Permalink | Reply

    Thanks for explaining.

  35. Posted December 28, 2015 at 21:35 | Permalink | Reply

    Kaalus… You say you want to know what you should do with some extra bits that you will have left over for block data…. Impersonally beleave you should keep it in the block data just in case in future updates you nead the extra bit or two… And if you some how never nead to use them just add it to the block IDs when you run low…. And one request…. We nead some way to condition our homes…. So we can make it colder or warmer…. CHEAPLY….. I would love a way to make an electronic air conditioner to completely freeze a section of a house…. Or a way to make an ELECRONIC heater…. If you make an electronic heater please DONT make it into a furnace as this would be a super cheap way to escape the cost of fule for craftin

  36. Posted December 28, 2015 at 22:35 | Permalink | Reply

    Hey Kaalus im not sure if you gonna read this but i just want to thank you for this fantastic game. I play survivalcraft since it was released and it was soo cool to see your New updates and your development. I also wanna thank you that you add firework;) If somebody here played the map called working firework, that was one of my maps that i build. But thats a long time ago. Today i played SC and i had a new idea for a New thing that you should add. I called it a bagpack. You can craft different types oft backpacks. I came to this idea because i often dont have enough space for rare stuff and thats a Problem if somebody like me likes to travel the world and dont build a house and live there forever. I just wanna say that i like to explore the world with my horse and have a nice adventure. I hope you know what i mean. Sry for my textfails i live ind switzerland and im not that gold in english. Bye Bye!

  37. Posted December 28, 2015 at 23:44 | Permalink | Reply

    Kaalus would be perfecto to a de woods natural color (so that when one tale wood from thre tres leaves color and minecraft)hoy add armor forma bordes and you add more clothing forma años worm well apreciarse if you take into account my soggestion

  38. stanimus1
    Posted January 4, 2016 at 23:16 | Permalink | Reply

    Kaalus, I really hope you will fix the bugs while adding these new features. There’s a lot of people expecting it. (Especially the boat bug – boats are useless, now.)

  39. Posted January 8, 2016 at 13:51 | Permalink | Reply

    quando vai sair 1.29

Leave a Reply. No swearing please.

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s