Alien Blitz 3d: behind the door, switching to 2d/3d, rebuilding maps

Behind the door

The first versions of Snorms had fully dynamic lights, but this feature was removed when porting to Android as it is very resource demanding (cpu & memory).

Now lights are precalculated on my computer and are saved along with the level file itself (lights precalculation takes around 2 seconds on computer, but more than 1 minute on mobile devices), these lights are stored in 2d as 3d doesn’t add that much (they will be in 3d for the PC version though as there’s enough resources there).

Problem is that some wall can disappear in Alien Blitz: wall destroyed, door opened,… and if nothing is done then it can result in weird things happening:

capture_2014-06-19_23-47-44_ capture_2014-06-19_23-49-55_0637

(dark floor near a light, light zone in a dark place,…)

What I do instead is that when a cube is removed I try to find the brightest cube around it and use its properties (color, brightness,…). And of course this feature was just added in 3d:

capture_2014-06-19_23-44-27_0518 capture_2014-06-19_23-54-06_0499

In 2d this is far more complicated as light information are not saved in memory, instead the texture used to display lights need to be read and data extrapolated.

 

Switching to 2d/3d

A new button in the options window has been added to switch to/from 2d/3d

capture_2014-06-20_12-51-16_0234

When clicking it or on first launch it will display this dialog

capture_2014-06-20_13-09-09_0952

 

Rebuilding maps

Everything is going pretty well so far, so I began adding 3d details to maps

capture_2014-06-20_17-06-08_0969 capture_2014-06-20_17-06-15_0845 capture_2014-06-20_17-06-43_0299

It’s usually small things, just one cube height difference, but with lights it renders well and makes 3d mode a lot nicer.

Comments are closed.