Tuesday 24 January 2017

Optimization

Collisions:
               In the game engine that we are using to develop gunfire there is no option to interact with tiles, like collide with them. There are many tiles used as walls and obstacles, for collision system, at start of map game run a loop, detect for walls tiles and place a 64x64 pixel collision mask object on them. 64x64 because tiles size is also same. But number of object increases with number of wall tiles and can be upto 200, which is too much for Android devices.
      New System:
                         The new system create a collision map at startup with indexing and then check for wall next  to it. In this way there is boost in performance because lots objects are removed.
      Disadvantage:
                        Disadvantage of new collision system is that players cannot slide much. But it is acceptable.


A look at resolution:
                       GunFire uses 1280x720 (16:9) resolution, in this 1280/64 =  20 tiles are visible horizontally and 720/64 = 11... tiles vertically. But this is too much resolution for a mobile game. Most mobiles dont have wide display screens and I know GunFire is going to be scaled down in mostly android devices.We will have to decrease visible area to reduce resolution/view. But It is NOT acceptable. So we decided to keep this resolution.


There are some other small optimization in code too but I can't describe them all here.


Multiplayer:
                Multiplayer part for basic gameplay is done. Players die, kill, shoot, win, loose and earn money. But only some users will host server on their PC/Devices and others can only join for some reasons. But after release we will focus on it.

 
 

 

No comments:

Post a Comment