It was a bug that was annoying me for quite a long time, grenades were sometimes behaving very strangely when bouncing. The bug was quite hard to correct in the first versions of Alien Blitz, that’s why it was still present. But with recent additions (since 1.1 actually) it was possible to correct it a lot more easily.
It is now corrected, grenades should no longer go in the opposite direction when bouncing
Another bug that was annoying me, especially in 3d, is jump, after jumping when player collides with the floor he is positioned on the nearest cube, it means he might be moved a few pixels from the expected position.
I’ve made a dirty hack to correct that, it will just work for the player (monsters are mostly always positioned on cubes and rarely jump anyway) and only when hitting the floor, but it should do it.
In order to help the player doors are now always fully lighted, they are more visible and we can more clearly see their color (for keys)
Camera on borders
In 2d camera is stopped exactly on the border of the map, this is a bit harder to do in 3d because of perspective.
So instead the camera is stopped near the border of the map, and I’ve added a faded black border on the edge to make the transition a bit smoother.
As always it is very important to check the memory usage when developing a java game, after a few minutes of gameplay, no garbage collector called and a nice sampler:
The only “problem” is from JsonValue, but it’s just because currently models are loaded live during gameplay when first visible. In the future they will be preloaded at the beginning of the level so this value will disappear (and be eaten by the first forced garbage collector that is called just after level is loaded)
The other thing to check is to make sure that when exiting a map nothing is left in memory for this map (except some things that need to be cached). I had a few static instances left that were easily removed, but nothing fancy.
And when playing and exiting multiple maps memory must not grow in between (except expected cache).
The viewport size is approximately the same in 2d and 3d, so so far I was using the old system to guess where the player was clicking. But because of the camera not being top view in 3d the farthest the click was the lower the precision was.
So I’ve used camera.getPickRay and Intersector.intersectRayPlane function from LibGdx to have the exact coordinates, it works very well now.
I don’t know if I’ll add a zooming feature, but if I do it will automatically work.
Everything is going quite smoothly, most major features are already there. Of course when tests begin I will find a lot of stuff to change/add, but so at least I’m sure Alien Blitz will be updated with a 3d mode, that’s great!
The next major work will be to change existing maps by adding more height differences, I could reuse old isometric levels, but I’d rather start from the current top one as they have been corrected and I can’t exactly remember what changed.
I should be able to release at expected date, or maybe earlier, depending on how long my holidays will be.