

This is an example of a function that most game engines expose to their users. As far as we are concerned, the IsColliding function is a black box that does some magic and correctly returns true or false if those objects are colliding with each other or not. There is no need for the programmer to know how this function is implemented or what is the algorithm required to correctly determine if two shapes are overlapping. For example, it is not rare for a game engine API to expose a function called " IsColliding()" that developers can invoke to check if two game objects are colliding or not.

To really understand how this API thing works, let's put it into context. This API allows the programmer to call engine functions and perform hard tasks as if they were black boxes. Game engines and game frameworks usually expose an API to the user. These engines can be small and minimalist, providing just a game loop and a couple of rendering functions, or be large and comprehensive, similar to IDE-like applications where developers can script, debug, customize level logic, AI, design, publish, collaborate, and ultimately build a game from start to finish without the need to ever leave the engine. But just so we are all on the same page, let's quickly review what game engines are and what they help us achieve.Ī game engine is a set of software tools that optimizes the development of video games.

If you are reading this, chances are you already have a good idea of what a game engine is, and possibly even tried to use one yourself.
