Video Game Design/Programming/Framework
General Architecture Issues
[edit | edit source]A game's framework is basically all the programming that goes into the creation of the game but does not directly implement any of the gameplay. This can be the code that manages the display, access to files, sound and other peripherals.
There is no one size fits all framework for video games. Each game requires a selection of components and strategies for linking them together. Using a freely available or even licensing a popular framework has the benefit that you will not need to "reinvent the wheel" and get support and collaboration in solving issues and extending capabilities. In fact the only advantage in creating your own framework is to have control over it, this can be due to the need of implementing something that other oppose or simply to get monetary compensation from that specific work and license it to others.
Choosing an API (Application Programming Interface)
[edit | edit source]There are a large number of APIs that are suitable for Game Programming. APIs range from specialty (Graphics only, such as OpenGL) to very, very broad (windowing, graphics, networking, etc are available in ClanLib)
- OpenGL -- Specifically, this is a graphics library. Some other APIs can integrate very nicely with OpenGL (such as SDL). It is also cross-platform.
- DirectX -- A set of APIs by Microsoft, specifically for machines running Windows, though it is on some other Microsoft platforms(xbox 1 used an modified version of the DirectX API). They include sound, music, graphics, input, and networking.
- SDL (Simple DirectMedia Layer) -- A good C-based library that is very portable, and while pretty low-level, it is complete enough to control sound, graphics, and input (from joysticks, keyboard, mouse and CD-Rom). zlib/png license.
- SFML -- An Object Oriented C/C++/.Net API supporting audio, graphics, window handling, multi-threading, networking, and input (from mouse, keyboard and joysticks).
- Allegro -- An easy to use library for C/C++ programs. Cross-platform (supports Windows, DOS, Mac OS X, UNIX, and BeOS). Provides functions for graphics, sounds, input, and timers.
- ClanLib -- A C++ toolkit and OpenGL 2.0 wrapper.