The First Click

The idea of game programming struck me when I was talking to a friend about doing something during the holidays. I began researching about programming games using C++. I chose C++ because I was very familiar with most (if not all) aspects of this language. During my research I came across this word “Allegro” a number of times. My next step, as any amateur researcher, was to check for “Allegro” on Wikipedia and what came up was:

http//en.wikipedia.org/wiki/Allegro_library

“Allegro is a free and open source software library for video game development.

The functionality of the library includes support for basic 2D graphics, image manipulation, text output, audio output, midi music, input and timers, as well as additional routines for fixed-point and floating-point matrix arithmetic, Unicode strings, file system access, file manipulation, data files, and (limited, software-only) 3D graphics.”

This description was good enough for me to look for some online site that describes how to download and install allegro to work with my Microsoft Visual C++ Express Edition 2005.

Deviating from the topic let me first talk a bit about Microsoft Visual C++ for those who are hearing it for the first time.

“Microsoft Visual C++ (often abbreviated as MSVC) is a commercial integrated development environment (IDE) product engineered by Microsoft for the C, C++, and C++/CLI programming languages. It has tools for developing and debugging C++ code. The idea of express editions, according to Microsoft, is to provide streamlined, easy-to-use and easy-to-learn IDEs for less serious users, such as hobbyists and students.”

In simple terms, it just provides a platform for you to write your codes, compile them and create executables. Other C++ IDE is DEV C++ which is preferred by other programmers. However I will stick to explaining MSVC since I like its interface, formatting and appearance.

Coming back to Allegro,

After a Google search I found these websites dedicated to Allegro Library.

· http//www.talula.demon.co.uk/allegro/readme.html . This might be helpful to understand more about Allegro and download latest versions and tutorials.

· http//wiki.allegro.cc/. This site contains most information you would need with extensive resources and hyperlinks.

· http//www.allegro.cc/ . This is a forum, which will be really helpful for troubleshooting and learning new stuff.

After going through the various sites I finally found this page which was dedicated to configuring allegro with MSVC 2005.

http//wiki.allegro.cc/index.php?title=Visual_C%2B%2B_Express_2005

I followed the links provided to download the compatible version of allegro and followed the instructions to install it. After some initial troubles with the configuration settings I managed to get allegro working however with a slightly different configuration setting than what was listed:

  1. Select Project / Properties....
  2. Under Configuration Properties / C/C++ / General, change Debug Information Format to Program Database for Edit & Continue (/ZI).
  3. Under Configuration Properties / C/C++ / Optimization, change Optimization to Disabled.
  4. Under Configuration Properties / C/C++ / Code Generation, change Runtime Library to Multi-threaded Debug DLL (/MDd).
  5. Under Configuration Properties / Linker / Input, add alleg.lib to Additional Dependencies.
  6. Under Configuration Properties / Linker / Debugging, change Generate Debug Info to Yes (/DEBUG).
  7. Press OK.

I added alleg.lib to the additional dependencies instead of alld.lib

Then it was time to start learning allegro programming.

The first and most useful tutorial that I used was C++ Game programming at http//www.cppgameprogramming.com/

It covered almost everything that I needed. Then to take a look at the advanced allegro features I directly jumped to the Allegro Manual and documentation which is so well-written that I didn’t require any further tutorials. With this I was on my way with game programming.

0 comments:

This is Amulya Khare's blog cum website. You can know more about him by viewing his profile.

Read about his views and ideas on topics that grab his attention.

Also you can view his work and projects.

Included here are some resources and articles that you might find interesting or helpful.