Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Beginner's Guide to Game Programming Ep1 Part 5-A Sound in Allegro 4

Loading...

Sign in or sign up now!
7,214
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jun 27, 2009

The Beginner's Guide to Game Programming:
A Problem Solving Approach
Episode 1: Makin' Pickin' Sticks
Part 5: Sound in Allegro

This is a written and video tutorial created to teach the basics of Allegro and SDL as well as game programming in general, while encouraging the newbie to code it out themselves.

Covers functions for loading and playing Samples (waves) and MIDIs.

You can get the written version and other things at my site:
http://www.moosader.com

Playlist link:
http://www.youtube.com/view_play_list?p=B9C8BC6F495BD17E

  • likes, 2 dislikes

Link to this comment:

Share to:

Uploader Comments (LusikkaMage)

  • I have an odd problem. When i put the midi in an if statement it only plays when the if statement is incorrect. im so confused. is there any way around this?

  • @TheMenkin Your if logic must be wrong, then.

  • Where are you post to put the sound and bitmaps so you only have to put the name and tag like she did?

  • What do you mean tag?

    For these videos, I have the BITMAP and MIDI objects in main, and I call the functions to use them somewhere in main since this is a small game.

  • sorry about posting this on wrong video but i noticed it during this video.

    I get an error on Load_image function :(

    here is the log for that particular error.

    20 C:\Documents and Settings\***\Desktop\C++ Game\init_allegro.cpp `load_image' undeclared (first use this function)

  • Load_Bitmap(...) ?

Top Comments

  • Hey first of all i've to say thank you. This tutorial is the best i've seen on the net. i'm spanish but it's so clear i can understand almost everything.

    For those who have the same problem than me (the program doesn't crash but can't hear anything), here is the sollution:

    Copy this code before loading the midi or the sample.

    install_sound(DIGI_AUTODETECT, MIDI_AUTODETECT, "A");

    Hope this help.

    Bye!

  • Your videos have taught me more than 2 years sitting in programming class. THANKYOU!

see all

All Comments (26)

Sign In or Sign Up now to post a comment!
  • @TheMenkin Check your equal signs. = is setting a value, == is comparing two.

  • when my midi plays it only plays the first second then repeats real fast

  • when my midi plays it only plays the first second then repeats real fast

  • when my midi plays it only plays the first second then repeats real fast

  • hmm, i don't seem to be able to play the sound in the game....

    i get no errors, it just doesn't play...

    any suggestions?? :S

  • I hate your videos.........Im getting no sleep, because I cant stop watching them :)

  • @frizider2 I've never really heard of anyone "filmstripping" their sounds, and I don't really think there would be much advantage in doing so. Sounds can vary a lot between themselves, while images are more simple, so filmstripping several actions of the same sprite leads to a smaller image size than saving them all separately.

  • Since i can copy only a part of one bitmap, to another bitmap, can i do the same for sample music, like just play from 5. second to 10. second if a ninja kills a samurai in ninja vs samurai game? Are there functions that allow manuvering with parts of samples?

Loading...

0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more