what is an engine/api?

Started by
10 comments, last by devalgo 17 years, 10 months ago
Hi, Complete newbie here to game programming. I just want to clarify on what certain things mean. What is the difference between an Engine (eg Irrlicht) and an API? Also, is SDL an engine? If I was to create a game, using SDL, would I have to create my own 'engine' or can I just use the commands from SDL/C++? Thank you in advance.
Advertisement
http://gpwiki.org/index.php/Beginner_FAQ
Whoops, sorry I missed that. I went to "For beginners" in the resources tab, but didn't see anything about engines so I posted. My bad. However, I still don't understand it.

"A game engine does a lot more than just a library. It might even use many libraries itself."

Why is a game engine a lot more than just a library? What does it actually do? Surely it's coded using seperate classes and such, and as a result is ultimately a (large) library brought together?

I think I get what an API is. It basically has instructions for tasks (such as drawing windows, graphical effects etc..) which are called via libraries such as SDL/Allegro. Is that correct, or have I missed something?

Thanks for the help.

A library is a collection of functionality (hopefully) designed to fulfil a certain purpose or set of purposes.

An "engine" is a kind of library, usually one that provides "core" (i.e., important) driving features or functionality -- just like the engine of a car.

API means something along the lines of "application programming interface." As the last word suggests, an API is an interface (to a library).
An engine holds most of the content for your game together. It holds the audio and graphics together and glues them together to make the final game. I would suggest the link that was posted earlier. Good luck.
JPetrie Brings up an important distinction. API, technically, refers only to an interface used for programming. This interface could apply to an engine, a library, or even a single class (ie- a Game engine API, the OpenGL API or the string API in your favorite language.) Generally, however, API refers to a Library interface such as OpenGL or DirectX, with "Engine API" in second place. "Class API," though technically an acceptable description, is rarely used and more commonly refered to only as "Interface."

The distinction between what constitutes a library versus an engine is admitedly blurry, because, in a sense, they are merely different levels of the same core idea: providing an easy to use set of functionality to its users.

For me, the distinction between a library and an engine is the following-- A library provides a lower level of control through its interface, while an engine provides higher-level control and management functionality. A 3D Library might provide an API for displaying a mesh, a list of triangles and setting display properties. A 3D engine, on the other hand, might provide an API for managing texture and vertex resources, A scene graph and Entity Objects to represent in-game characters.

throw table_exception("(? ???)? ? ???");

Thanks for the replies. I know it's down to opinion but which engine would you recommend I look at for a 2D sidescroller that runs in 3D (for special effects). I've heard Irrlicht is quite good but I'm not sure if there are others that might be better for my game.
Thanks again.
For your case, may I recommend you Torque Game Builder. You may find it at www.garagegames.com. Provides an excellent 2D Game Engine and runs with 3D hardware. $100 is a low price for what you get.

Luck!
Guimo

Quote:Original post by Guimo
For your case, may I recommend you Torque Game Builder. You may find it at www.garagegames.com. Provides an excellent 2D Game Engine and runs with 3D hardware. $100 is a low price for what you get.

Luck!
Guimo

Seconded.

Check out my new game Smash and Dash at:

http://www.smashanddashgame.com/

An API (application programmers interface) is really just any collection of functions.
An SDK (software development kit) is usually an API bundled with some other goodies like tools or examples.
An Engine is a very fuzzy term which can mean anything from a simple API to a fully fledged SDK with its own file formats, level editors and content exporters.

Usually an 'Engine' is an API + game-specific file formats + good tool support.

This topic is closed to new replies.

Advertisement