Friday, November 21, 2008

Allegro @ Home

To get allegro cooking @ home, first you'll need MS Visual C++ Express 2008

Allegro Installation


0) Copy the files:
  • Copy the contents of the include folder to C:\Program Files\Microsoft Visual Studio 8\VC\include
  • Copy the contents of the lib folder to to C:\Program Files\Microsoft Visual Studio 8\VC\lib

2) Extract all files into c:\

3) Run c:\allegro\build\pre-build-msvc.bat

4) Open c:\allegro\build\msvc8\Allegro.sln. Finish conversion. Click Build / Batch Build. Check all versions. Wait for build to finish.

5) Copy the files:
  • Copy the contents of C:\allegro\include to C:\Program Files\Microsoft Visual Studio 8\VC\include
  • Copy the .lib files from C:\allegro\lib\msvc to C:\Program Files\Microsoft Visual Studio 8\VC\lib
  • Copy the .dll files from C:\allegro\lib\msvc to C:\Windows\System32
6) Start a new *empty* c++ project then add a main source file.

7) Click Project / Properties. Click Configuration Properties / Linker / Input. Add alleg.lib to Additional Dependancies.

8) Now we're ready to program using Allegro.

9) We're going to start with a few tutorials.

10) Finally, we master the universe.


.

Wednesday, November 19, 2008

The Goulish Goldfish

We're going to need this code...

(thanks Micah)
.

Pong V2.0

Your Pong game is due at the start of class tomorrow. When you're done, I want your program files uploaded in a compressed (zipped) archive; I ONLY want your .cpp, .bmp, & .wav files. Also, you must make sure that the zipped archive is smaller than 2Mb.

Your Pong code should have the following:

  • Keep track of the current score.
  • Keep track of the current number of times the ball has hit the paddle; reset this number when somebody wins.
  • There should be a sound played when the ball strikes a paddle.
  • There should be a different sound played when the ball strikes a wall.
  • There should be a sound played when a player wins.
  • There should be a background image.
  • The paddles should be replaced by similarly sized bitmap images.
  • The ball should be replaced with a similarly sized bitmap image.
  • The rest time in the main logic loop should get shorter as the number of hits increases.
  • Add something *else* to make your Pong game unique.

  • .