Beware of common pitfalls while using APIs

(51 occurrences)

Context

The use of game engines/frameworks and external libraries is common in game development [1]. The APIs provided by frameworks/engines and external libraries are used for quick and convenient implementation of the functionalities based on the requirements of the game

Problem

APIs may be useful in implementing the required functionalities. However, their incorrect or improper usage due to a lack of proper understanding of their usage and working may cause the game to malfunction and lead to inefficiencies. This may impact the game’s functionality and the performance.

Solution

This can be avoided by being aware of common pitfalls of while using the APIs and take appropriate steps to deal with them.

Example

Consider the use of SpriteBatch in Monogame framework to render multiple tiles on screen.Saving each tile in a different texture slows down the rendering on large screens due to Spite- Batch’s internal handling of texture switches. Being aware of this pitfall and using texture atlas to deal with the issue can resolve the issue of slow rendering. The example is based on the post with ID 82799

Reference

[1] M. Lewis, J. Jacobson, Game engines, Communications of the ACM 45 (1) (2002) 27.

Occurrences

Questions
51 occurrences