A game engine is a piece of software intended for game developers. It is almost a complete game, just add content. There are advantages to using a game engine to write your game. It is probably the simplest way to tell a story, next to writing a book. You don't have to be able to program to use an engine. Scripting is usually optional. You can finish a game much faster by starting with a pre-built engine, rather than writing your own from scratch. A game that starts out with a pre-built engine is much more likely to actually get done.
There are disadvantages too. Using a pre-built engine is much less flexible than writing your own. And you have to obey whatever license you are allowed to distribute the engine under.
A programming library is a piece of software that helps programmers, by implementing common functions so that they don't have to. You have to know how to program to use a library. Using a library to program your own engine allows you much more flexibility than using a pre-built engine. SDL, Crystal Space, Love2d and ODE are libraries that you might want to use to write your own engine, if that is the route you prefer.
You can get hundreds of game engines from the internet. Some of them are free. You can do anything you want with these, including selling them alongside your content for a fee. Most of the game engines on the internet, however, are not free. Most of them are closed-source. Often, you have to pay the creators a fee if you use their engine in a commercial product. Sometimes, a game engine is tied to a particular service, and your game can never stop using their service.
I have collected a list of complete and functional free game engines. You can use these engines without restriction. Please note, however, that there are obligations with certain licenses. For example, with the GPL, you have to include the source code to the engine, or make a written offer to deliver it. Make a point to read the full license of any engines before commiting to using them.
If you have a game engine you would like to recommend for this list, please contact me.
Commercial examples: Choose Your Own Adventure Series, Lone Wolf Series, Fighting Fantasy Series
Free Engine: The Gamebook Engine * License: GPLv2 Pros: 2 complete games. book format is simple and flexible. Cons: graphic support is rudimentary. New. Example gamebooks are not free.
Commercial examples: Starcraft Series, Warcraft I, II and III, Age of Empires
Free Engine: Bos-Wars Engine License: GPLv2 Pros: has a campaign Cons: poor documentation for creating maps or manipulating the GUI, maps slow down a lot while playing, AI plays poorly, has an unfinished feel
Free Engine: Stratagus License: GPLv2 Pros: has a few complete games using it. Cons: development has "permanently halted." The team is now working on the Bos-Wars Engine, which is a modified version of Stratagus.
Commercial Examples: Warlord, Lords of Magic
Free Engine: Battle for Wesnoth License: GPLv2 Pros: popular, large and active community, and many complete maps/campaigns. Cons: Maps use a proprietary, verbose metaformat. Scripting is hacked in, and difficult to write. Documentation is a clusterfuck, with no clear beginning for learning to write maps. "Stable" releases aren't really stable until around 1.x.6.
Commercial Examples: Doom Series, Quake Series, Half-Life Series
Free Engine: Dark Places License: GPLv2 Pros: Cons:
Free Engine: ioquake3 License: GPLv2 Pros: Cons:
These game engines are not complete. Either they don't have a complete implementation, or not everything necessary is there for you to use to make a game. If you are trying to make a game in one of these genres, I recommend checking these projects out. If you can use it, great. If you can't, you might want to help the project out, so that you can.
Commercial Examples: WOW, Runescape, EVE, Ragnorak Free Engine: The mana world, Worldforge, Planeshift License: GPLv2, GPLv2, GPLv2 Pros: Cons: Worldforge is underdocumented. It is difficult to figure out which files you need to edit to do what, and how to modify them. Planeshift requires the Crystal Space game library, which is also underdocumented. Crystal Space is not yet stable, and it's dependencies are numerous, unstable, and rapidly changing. Planeshift does not have any free content you can use to start your game.
Commercial Examples: Final Fantasy I, II, III, Dragon Warrior I-IV
Free Engine: KQ Lives RPG * License: GPLv2 Pros: retro feel. Cons: A lot of content modifications have to be done in the engine itself.
Free Engine: Hero of Allacrost * License: GPLv2 Pros: Very nice graphics and sound. Supports everything you would expect in a classic RPG with flexible and nearly complete scripting support. Cons: Scripting language is verbose and rudimentary. Still in Beta. Not officially advertised as a generic RPG engine, and you might not receive support for using it in your game.
Commercial Examples: Fallout I, II, Diablo I, II Free Engine: Flexible Isometric Fallout-like Engine License: LGPLv2.1 Pros: Cons: No working game demo. New.
* I am a developer for this game engine.