![]() |
|
SpeedHack 2014 is this weekend! |
Gideon Weems
Member #3,925
October 2003
|
Skip al_create_sample_instance and whatnot and go straight to al_play_sample. That works for me. For "big" stuff, I create a stream and attach it to a mixer that is attached to a voice. Day 2 has begun. I have nothing but respect for anyone in the competition who produces a working game. |
Mark Oates
Member #1,146
March 2001
![]() |
I've run into a few "oh crap" moments myself. Like when there's a bug somewhere and it takes a bunch of steps to solve it, and along the way I lose track of where I am. I'm attempting a 3D game, and there's a bunch of concepts and stuff that I've never done before. My #1 concern now, at this point, is that I can make a fun-to-play game. -- |
GullRaDriel
Member #3,861
September 2003
![]() |
Pfiou. I'm fighting with movement issues. Good luck guys. "Code is like shit - it only smells if it is not yours" |
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
I forgot to use a voice. That's why there was no sound. :/ My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Mark Oates
Member #1,146
March 2001
![]() |
typedef void (ProgramMaster::*collision_response_func_t)(Entity *, float, CollisionMesh::Face *, float); ... (this->*collision_response_func)(colliding_entity, collision_time * time_left_in_timestep, colliding_face, face_collision_stepout);
Yea, I just did that. -- |
Dizzy Egg
Member #10,824
March 2009
![]() |
Nice! I've done so much today that I'm 85% sure I'll get a playable entry in....my only worry now is that it wont have any sound!
---------------------------------------------------- |
Thomas Fjellstrom
Member #476
June 2000
![]() |
Dizzy Egg said: I've done so much today that I'm 85% sure I'll get a playable entry in....my only worry now is that it wont have any sound! No sound or musc in The Egg's entry? That's.... Unexpected! -- |
Dizzy Egg
Member #10,824
March 2009
![]() |
It's not like the melodies and noises are not flowing from my psyche, but I'm going to be so stretched to get a decent amount of puzzles in that just setting up voices etc (after Edgars earlier posts) in A5 is asking too much! Another 24 hours and maybe, just maybe....!
---------------------------------------------------- |
SiegeLord
Member #7,827
October 2006
![]() |
Here's a minimal example of how to play a sample (without using the simpler, but more limited al_play_sample API), just in case somebody runs into the same difficulty: 1#include <allegro5/allegro.h>
2#include <allegro5/allegro_audio.h>
3#include <allegro5/allegro_acodec.h>
4#include <stdio.h>
5
6int main(int argc, char** argv)
7{
8 al_init();
9 al_install_audio();
10 al_init_acodec_addon();
11 al_reserve_samples(1); // to create the default mixer/voice
12
13 ALLEGRO_SAMPLE* sample = al_load_sample(argv[1]);
14 ALLEGRO_SAMPLE_INSTANCE* instance = al_create_sample_instance(sample);
15 al_attach_sample_instance_to_mixer(instance, al_get_default_mixer());
16 al_play_sample_instance(instance);
17
18 while(al_get_sample_instance_playing(instance))
19 {
20 al_rest(0.1);
21 }
22}
"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
Dizzy Egg
Member #10,824
March 2009
![]() |
Nice!...Thanks a lot for that, should at least have a nice piano melody going on in the background! ...getting late here now but....couple more hours!! {"name":"608615","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/2\/0\/20c441ed3b48c0cefcfb02482568a092.png","w":1040,"h":806,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/2\/0\/20c441ed3b48c0cefcfb02482568a092"}
---------------------------------------------------- |
Gideon Weems
Member #3,925
October 2003
|
Dizzy Egg
Member #10,824
March 2009
![]() |
Yeah that's fine; it's what I'm using now, so "/gfx/tile_water.png" etc etc edit: it's hard, I just died twice whilst debugging!
---------------------------------------------------- |
Gideon Weems
Member #3,925
October 2003
|
Dizzy Egg
Member #10,824
March 2009
![]() |
Hello guys, my game is finished (well, I have a couple of hours left before I submit it) and there's a few things I want to check: In my .zip, I have the main source, header, graphics, font and audio. I've used only libraries from Allegro 5, which of course are not included in the .zip.... ...do I have to include a makefile, or is it enough just to list what libraries to link against? I've always used IDE's, so wouldn't know where to start with a makefile...unless Code::Blocks can auto generate one? Please be really specific on what EXACTLY needs to go in my .zip, I know I've already asked but I want to get it right!
---------------------------------------------------- |
Gideon Weems
Member #3,925
October 2003
|
SiegeLord
Member #7,827
October 2006
![]() |
Gideon Weems said: I think the important thing is just to upload it before the deadline. Hopefully you'll go through with this yourself... only 50 minutes left "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
Gideon Weems
Member #3,925
October 2003
|
Houston, we have a problem. I don't have a way of generating a ZIP file without pulling in about 700 MB of dependencies. I'll upload a tar.gz file for now and hope that it's better than nothing. Please let me know how to proceed. Edit: Made it! |
SiegeLord
Member #7,827
October 2006
![]() |
Upload it somewhere (e.g. here) and I'll convert it for you. EDIT: Woohoo! "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
Gideon Weems
Member #3,925
October 2003
|
Mark Oates
Member #1,146
March 2001
![]() |
Hey, I swear I hit submit at 11:59 for v0.4. The 0.3 I submitted seconds before doesn't compile. This is the one I submitted RIGHT before the buzzer: Here -- |
Gassa
Member #5,298
December 2004
![]() |
I had an issue with the combination "D programming language and Allegro timer" that took a bit of time. Looks like when a timer is created but not started immediately (more or less), or otherwise spends some time in stopped state, the subsequent attempts to start it don't work. Though al_get_timer_started reports true, the timer events are not being generated. An equivalent program in C/C++ does the job just fine. Now that the competition is over, I'll investigate further and perhaps construct a minimal example. For now, here's what works for me and what doesn't: the difference is that I move the start_timer call above or below display creation. I'm using SiegeLord's bindings. Edit: here is the equivalent C/C++ code, I took it straight from the tutorial.
|
GullRaDriel
Member #3,861
September 2003
![]() |
I didn't made it in time, but I'll submit the entry on the forum. And I'll try all the submitted entry, fear my review !! Not enough time, but that was good to have a nice excuse for a night coding session like when I was 15 ^^ :-) "Code is like shit - it only smells if it is not yours" |
Gideon Weems
Member #3,925
October 2003
|
I spent a day recuperating and now feel much better. Congrats to everyone who finished! And if you didn't finish, I honestly can't blame you. I was a hair away from not finishing, myself. So what do we do now? I'm gonna download and compile some games today, but are there rules concerning the review process? |
MiquelFire
Member #3,110
January 2003
![]() |
Keep an eye on the SpeedHack site. Matt will post the needed info to start the judging. --- |
Karies
Member #8,158
December 2006
![]() |
Please, post Speedhack binaries not only source code. |
|
|