Monthly Archives: April 2012

Explosion Craters

I am playing with the pressure propagation for explosions, and so far it’s not too good. For all the complexity I put in I am not getting anything very interesting – I could have used much simpler algorithm and get virtually the same results. I’ll spend some more time on it, and if it doesn’t work, I’ll revert to the simpler method.

Here’s a video of some craters I created so far :-)

 

 

Run, the fuse’s on fire!

Explosives work going all right. I’m now doing the explosion particle system.

I also now know why Notch called his explosive TNT, even though it looks like dynamite. It was always bugging me, and not until I started to do my own have I discovered the answer :-)

Lumia 900 Climbing Fast

Here’s a graph of recent Survivalcraft sessions by phone model in North America. Nokia Lumia 900 seems to be making quick progress towards the top, even though it’s been on the market for just a couple of weeks it already displaced the venerable HTC HD7 from 5th place and is accounting for 10% of all sessions.

Also of note is that 4 out of 5 top phones are now 2nd gen devices.

 

Alpha 1.11 progress

I am still working on the new feature that will use sulphur and saltpeter. As you correctly guessed, it will be gunpowder :-)

I don’t know how it will be made to explode exactly yet, what I am working on now is the explosion physics. I want to do a pressure propagation-based simulation that will allow you to do more interesting things than just turn a sphere of rock into a sphere of air and play a “boom” sound.

We’ll see how it will turn out. What I want to achieve is that you will have to be clever how you place the explosives to get the effect you want.

Shadows and lighting

I have just fixed the shadowing/lighting issue that caused excessive darkening of grass, fences and other things. I can now tweak the exact amount of shadow each block casts, as opposed to all-or-nothing solution that was there before. I had to refactor the lighting code slightly, but I think the new one should not be any slower.

This is how it looks now:

On this screenshot fences have shadow of 4, grass 8. Previously everything had shadowing of 15.

Magma as a fluid

I changed the behavior of magma to be fluid. You can now swim in it, and although the pleasure will be intense, it will be rather short lived. Items and projectiles that fall into it are destroyed. The current of magma will carry you and the animals, just like water. Magma now flows further, up to 4 blocks from the source (in 1.10 it’s 3 blocks).

The purple screen issue with invalid texture packs is fixed. I also fixed the problem with block icons when texture pack was changed. They now re-render correctly, and you don’t have to restart the game any more.

 

Purple Screen

I reproduced it. Thanks for all the tips. I now see the reason why this is happening and will fix it for Alpha 1.11.

Until then please make sure that:

  • The texture pack image has power-of-2 width and height (128, 256, 512, 1024 etc.)
  • The texture pack is not too large. I’ve seen 1024 working on my phone while 2048 does not, but it depends on how much free memory there is and so may be device dependent. Default texture pack is 256×256.
  • The texturepack file name is not too long (up to 16 characters should be safe), and does not contain fancy characters (english letters, digits, underscore are definitely fine)

Otherwise the texture pack may brick the game and require a reinstall until I release a fix in 1.11.

What is happening: during the initialization the game renders all block images later used in the UI. If this process fails (for example because the blocks texture is invalid), due to a mishap on my side the game becomes stuck before the main menu screen appears.

I also want to investigate why the purple screen appears. The screen should just show some rubbish – but it’s purple. This means that purple may be also rendered under UI/game when everything is OK, slowing down the framerate a bit. That would be cool because I could remove it and speed things up for free :-)

Edit: Ok it seems I’m not drawing purple under the game, so no perf gains there. It’s XNA clearing backbuffer to purple if nothing was drawn on it to avoid garbage on screen.

1.10 texture packs

I will post the new texture pack containing new ores later today, so that you can update your hi-res stuff.

I know about the pink screen issue. But as is usual with nasty problems, this never happens on my phone, even though I tried hard to reproduce it. Moreover – I never render a purple screen in the game, so where does it come from? What happens on mine is when the texture is too big and fails to load, the game just goes back to the main menu, as it should.

I guess this issue is on the same level of nastiness as the invisible world. Maybe it only happens in retail version – I’ll try to check that today.

Edit: the texture pack for 1.10 is now up, you can download it from Files/Technical page.

1.10 passed cert

This time with no conditions. Should be in the marketplace tomorrow.

In the meantime I made some inroads into the new feature and it’s looking good so far. Nothing to show yet though.

Saltpeter

Just realized that I should have put saltpeter in sandstone, not in granite. Reasons:

  • Sandstone is shallow in the game, which matches shallow location of saltpeter
  • It would be the first mineral to be found in sandstone, increasing game variation
  • In nature the mineral is found in arid areas only, and sandstone mostly exists in deserts in Survivalcraft – another match

Too late to fix for 1.10, but will amend in 1.11.

1.10 still in certification.