Graphics Libraries and game engines are frequently used as interchangeable terms – but what’s the difference? In general, a game engine will provide you with more aids to help you build your game. Graphics libraries will give you basic functions to render images to a window, and that’s about it. Sometimes, a graphics library will also include primitive input and sound controls. Nonetheless, there isn’t a concrete difference between a graphics library and a game engine. It’s all based on opinion, so the difference between a graphics library and game engine might vary from person to person.
Here are some obvious differences between graphics libraries and game engines:
- A game engine may provide functions that help implement physics, while a graphics library would not.
- Graphics libraries such as OpenGL or SDL might make you create a geometric figure or surface that you later attach an image file to as a texture, where as game engines will most likely make it easier for you to display an image on the screen.
- Game engines could contain pre-built functions for creating windows and applications, but graphics libraries won’t include this.
While these may sound like reasons to use a game engine instead of a graphics library, think again. Using a game engine won’t provide as big of a learning experience as a graphics library would. Using a graphics library will force yourself to learn game logic and advanced programming techniques. Making a game using a graphics library will be more challenging than if you used a game engine, but consider its added intellectual benefits when choosing between the two.
Terms, Terms, Terms
Let me clear up some more terminology. I’ve been referring to graphics libraries a lot. What exactly is a library? In terms of programming, a library is a collection of code that helps provide more functionality in your program. If you’ve programmed a little bit before, then picture a library as additional functions and classes that you can use in your own programs. If you’ve never programmed before, then just understand that a library adds code to make accomplishing a specific task easier.
For example, a graphics library contains some functions and classes (code, of course) that make displaying images and graphics much easier. A sound library adds code to help you implement music and sound effects. Even better, a game library will add code that helps develop all major parts of a game: sounds, graphics, input, you name it! Sometimes, game libraries will just be called libraries due to their broad functionality. Game engines will go even further than game libraries and include things such as physics engines, error handling (Very important in preventing games from crashing. No one likes a game that doesn’t work!), and simpler methods of incorporating graphics, sound, etc.
Sometimes, you might hear the term API get thrown around. API stands for Application Programming Interface. An “interface” creates a method of interaction between one set of code and another. APIs can even exist as libraries. If you think of an API as another form of a library, it’s not going to kill you.
What Libraries or Engines Should I Use?
There’s tons of both libraries and game engines out there, so it’s a daunting task to pick one for your game. Check out my pages on C++, Java, Python, and Objective-C to read about my recommendations.