2D/3D performance comparison

Android game development in 2D and 3D is different. It is a fact that 3D game processing is heavier than 2D games. However, the game scale is always the deciding factor.

Different look and feel

3D look and feel is way different than 2D. The use of a particle system in 3D games is very common to provide visual effects. In the case of 2D games, sprite animation and other transformations are used to show such effects.

Another difference between 2D and 3D look and feel is dynamic light and shadow. Dynamic light is always a factor for greater visual quality. Nowadays, most 3D games use dynamic lighting, which has a significant effect on game performance. In the case of 2D games, light management is done through assets. So, there is no extra processing in 2D games for light and shadow.

In 2D games, the game screen is rendered on a Canvas. There is only one fixed point of view. So, the concept of camera is limited to a fixed camera. However, in 3D games, it is a different case. Multiple types of camera can be implemented. Multiple cameras can be used together for a better feel of the game. Rendering objects through multiple cameras causes more process overhead. Hence, it decreases the frame rate of the game.

There is a significant performance difference between using 2D physics and 3D physics. A 3D physics engine is far more process heavy than a 2D physics engine.

3D processing is way heavier than 2D processing

It is a common practice in the gaming industry to accept less FPS in 3D games in comparison to 2D games. In Android, the standard accepted FPS for 2D games is around 60 FPS, whereas a 3D game is acceptable even if it runs at as low as 40 FPS.

The logical reason behind this is that 3D games are way heavier than 2D games in terms of process. The main reasons are as follows:

  • Vertex processing: In 3D games, each vertex is processed on the OpenGL layer during rendering. So, increasing the number of vertices leads to heavier processing.
  • Mesh rendering: A mesh consists of multiple vertices and many polygons. Processing a mesh increases the rendering overhead as well.
  • 3D collision system: A 3D dynamic collision detection system demands each vertex of the collider to be calculated for collision. This calculation is usually done by the GPU.
  • 3D physics implementation: 3D transformation calculation completely depends on matrix manipulation, which is always heavy.
  • Multiple camera use: Use of multiple cameras and dynamically setting up the rendering pipeline takes more memory and clock cycles.

Device configuration

Android has a wide range of device configuration options supported by the platform. In the previous chapters, we have already seen such variations. Running the same game on different configurations does not produce the same result.

Performance depends on the following factors.

Processor

There are many processors used for Android devices in terms of the number of cores and the speed of each core. Speed decides the number of instructions that can be executed in a single cycle. There was a time when Android used to have a single core CPU with speed less than 500 MHz. Now we have multicore CPUs with more than 2 GHz speed on each core.

RAM

Availability of RAM is another factor that decides performance. Heavy games require a greater amount of RAM during runtime. If RAM is limited, then frequent loading/unloading processes affect performance.

GPU

GPU decides the rendering speed. It acts as the processing unit for graphical objects. A more powerful processor can process more rendering instructions, resulting in better performance.

Display quality

Display quality is actually inversely proportional to the performance. Better display quality has to be backed by better GPU, CPU, and RAM, because better displays always consist of bigger resolution, with better dpi and more color support.

We can see various devices with different display quality. Android itself has divided the assets by this feature:

  • LDPI: Lowest dpi display for Android (~120 dpi)
  • MDPI: Medium dpi display for Android (~160 dpi)
  • HDPI: High dpi display for Android (~240 dpi)
  • XHDPI: Extra high dpi display for Android (~320 dpi)
  • XXHDPI: Extra extra high dpi display for Android (~480 dpi)
  • XXXHDPI: Extra extra extra high dpi display for Android (~640 dpi)

It can be easily predicted that the list will include more options in the near future, with the advancement of hardware technology.

Battery capacity

Battery capacity is an odd factor in the performance of the application. More powerful CPUs, GPUs, and RAM demand more power. If the battery is incapable of delivering power, then processing units cannot run at their peak efficiency.

To summarize these factors, we can easily make a few relational equations with performance:

  • CPU is directly proportional to performance
  • GPU is directly proportional to performance
  • RAM is directly proportional to performance
  • Display quality is inversely proportional to performance
  • Battery capacity is directly proportional to performance
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.17.137