Robotic Arts

Navigation

Recent site activity

Home‎ > ‎

Allegro Blank msvc Project

This is a skeleton project for Allegro 4.2.2 on Microsoft Visual Studio, tested working with msvc++ 2008 Express (a free ide).

Features:
  • Initialize graphics, sound, keyboard, and mouse handlers from allegro.
  • Viewport class features: Simplified 2d graphics functions, Scrolling screen, Transparent sprites(.tga format). (viewport.h)
  • Mouse cursor and optional sprite mouse cursor. 
  • Soundbox class for playing wav samples. A test sound will play upon running the project, adjust volume accordingly. (soundbox.h)
  • Some math and bitmap functions (maths.h, gfx_fn.h)
  • Take screenshots by pressing Print Screen, but they are always named ss.bmp, so files must be renamed manually before taking multiple screenshots. 
The project contains a sample sound, background, and sprite. The sound should play on startup, the bg is from my game TMNT, and the sprite is Bidoor, whatever that is. 
The sample files shouldn't be used in published projects. Especially not for Ludum Dare! (original content only)

There are some lines commented with //** These indicate where most of your game code should be. 

Requires Allegro, probably 4.2.2, which can be obtained from http://allegro.cc 
You will have to enter your allegro directories into MSVC, this should be under: Tools > Options > Projects > VC++ Directories. 
I've installed allegro to c:\allegro, so I have: Executables: c:\allegro\bin Include: c:\allegro\include Library: c:\allegro\lib
 
If the sound doesn't play, the sprite isn't transparent, or the project doesn't work in release mode, you have a problem, don't wait until the last minute to test/fix this. 
Contact me on AIM: mintygreencow, irc.afternet.org: greencow, or comment below.

Attachments (1)