I would like to know how you would get the bricks to show correctly. What I mean by this is would I do a 2D array, or is there an easier way of this?
I would like to know how you would get the bricks to show correctly. What I mean by this is would I do a 2D array, or is there an easier way of this?
i did a 3d array and my game is runnin fine now...
just make somethin like this
the just use some for loops to draw to screen...Code:short Iblock[4][4][4] = { { {0, 0, 1, 0}, {0, 0, 1, 0}, {0, 0, 1, 0}, {0, 0, 1, 0} }, { {0, 0, 0, 0}, {0, 0, 0, 0}, {1, 1, 1, 1}, {0, 0, 0, 0} }, { {0, 0, 1, 0}, {0, 0, 1, 0}, {0, 0, 1, 0}, {0, 0, 1, 0} }, { {0, 0, 0, 0}, {0, 0, 0, 0}, {1, 1, 1, 1}, {0, 0, 0, 0} } };
What is C++?
Thank you. I get to work on that tomorrow....
Are you gonna have music in your game?
I tried to load some midi file but it wouldnt play.. Any ideas why?
What is C++?
Vicious, I know how to play .wav files (I'm not sure if this will work with .midi files or for that matter I'm not even familiar with MIDI except what I read in the Allegro docs).
install_sound(DIGI_AUTODETECT, MIDI_AUTODETECT, 0);
// to install the sound inside main()
SAMPLE *name;
//to declare ths .wav before main()
name = load_sample("name.wav");
// to load the .wav inside main()
play_sample(name, 128, 128, 500, FALSE);
//to play the .wav once
/* if you want to play a .wav in a loop then you change FALSE to the number of times you want the .wav to loop. if you want the loop to stop then you use stop_sample(name). i should mention that you don't use stop_sample(name) if you don't use a loop for you .wav */
my shooter game i was making had some pretty cool sound effects in it too. you can get them from www.a1freesoundeffects.com hopefully that's the right address.
oh wow, after checking to make sure that link is right, i noticed that the a1freesoundeffects site has been redone. it looks pretty good. hopefully all of the same free sounds are there. they must have just done this in the past 2-3 days.
To load music, just define the midi name like this:
where (enter name here) would be the name of the midi, and then set the volume like TechWins said, and then look at the docs for playing, because there are a few (namely looped, and play-to-end). Hope that helped.Code:MIDI *(enter name here);
well i know all that...
I loaded everything right it just wouldnt play it...
What is C++?
Ohh...what libraries did u link it with anyways?
Allegro....
What is C++?
.......did u use the alleg_s.a?
.. um, no....
..............
um, what the crap is that anyway?
What is C++?
In the lib directory (if your using Dev-C++ one from the package section of their website), there is a .a file that is called liballeg_s.a
is that for sound or something?
will it work as well as liballeg.a?
What is C++?
i don't know, I can't get it working honestly