Zoom, optimizations

2013-01-25 21.17.04


  • I’ve added some zooming features, they are used to render height difference in top view, for example a grenade that is supposed to go above the player will be rendered bigger. It works quite nicely, maybe I’ll need to adjust a few things though. I have added that just for bullets that uses images (for example gun pellet is a simple line, so it won’t zoom, it’s no big deal as it’s not necessary in this case). I’ll try to apply this effect for a jumping player too.
  • Lots of internal changes on how the mini cubes are handled, it makes things easier, the only down side is that now maps are limited to 127 textures, but this limit is high enough (I think no map use more than around 30 textures at the moment). It might have broken features in the level editor, I will have to check that.

I had to reduce view port size on my nexus 7, there are 2 problems with big viewport:

  • Sprites are very small, the nexus has an high pixel density, so sprites are relatively small
  • It uses more CPU

So I switched to a 800*460 viewport and used the default scaling functions of OpenGL, I used the NEAREST algorithm in order to keep a good pixel aspect. The game is still too slow to be played, I manually set to it 10fps in order to use less CPU and give other threads a chance to work, so it becomes playable, but it’s not a good solution of course. I will have to continue optimizations, again and again…

I don’t know how the viewport will be handled in the final version, I’ll try to make it so that the user chooses the view port size he wants.

The green buttons on the capture are temporary, I only use them to move the player, so that I don’t have to plug a keyboard on the nexus.

Comments are closed.