Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » SpeedHack 2014 is this weekend!

This thread is locked; no one can reply to it. rss feed Print
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. 8-) SpeedHack is fun but a lot of pressure. The programming itself is simple, straightforward stuff--but bringing it to coherent whole is a completely different story.

I have nothing but respect for anyone in the competition who produces a working game.

Mark Oates
Member #1,146
March 2001
avatar

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.

--
Visit CLUBCATT.com for cat shirts, cat mugs, puzzles, art and more <-- coupon code ALLEGRO4LIFE at checkout and get $3 off any order of 3 or more items!

AllegroFlareAllegroFlare DocsAllegroFlare GitHub

GullRaDriel
Member #3,861
September 2003
avatar

Pfiou.

I'm fighting with movement issues.

Good luck guys.

"Code is like shit - it only smells if it is not yours"
Allegro Wiki, full of examples and articles !!

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Mark Oates
Member #1,146
March 2001
avatar

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. 8-)

--
Visit CLUBCATT.com for cat shirts, cat mugs, puzzles, art and more <-- coupon code ALLEGRO4LIFE at checkout and get $3 off any order of 3 or more items!

AllegroFlareAllegroFlare DocsAllegroFlare GitHub

Dizzy Egg
Member #10,824
March 2009
avatar

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! :-/

----------------------------------------------------
Please check out my songs:
https://soundcloud.com/dont-rob-the-machina

Thomas Fjellstrom
Member #476
June 2000
avatar

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!

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Dizzy Egg
Member #10,824
March 2009
avatar

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....! :P

----------------------------------------------------
Please check out my songs:
https://soundcloud.com/dont-rob-the-machina

SiegeLord
Member #7,827
October 2006
avatar

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:

#SelectExpand
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
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Dizzy Egg
Member #10,824
March 2009
avatar

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"}608615

----------------------------------------------------
Please check out my songs:
https://soundcloud.com/dont-rob-the-machina

Gideon Weems
Member #3,925
October 2003

Are there any caveats with directory separators and the loader functions? For example, would loading "Data/Music/Something.ogg" work on Windows?

Edit: Dizzy's game looks fun. :)

Dizzy Egg
Member #10,824
March 2009
avatar

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!

----------------------------------------------------
Please check out my songs:
https://soundcloud.com/dont-rob-the-machina

Gideon Weems
Member #3,925
October 2003

Dizzy Egg
Member #10,824
March 2009
avatar

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! :D

----------------------------------------------------
Please check out my songs:
https://soundcloud.com/dont-rob-the-machina

Gideon Weems
Member #3,925
October 2003

Phew, I'm done, too! Congrats!

I think the important thing is just to upload it before the deadline. If there are any problems, they can be sorted out after the fact.

SiegeLord
Member #7,827
October 2006
avatar

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 :o:o:o.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

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. :P I'd do that, but there's that whole time issue.

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! :o

SiegeLord
Member #7,827
October 2006
avatar

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
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Gideon Weems
Member #3,925
October 2003

:D You'd do that? Thanks!

It's all right, though, as I dug out an old laptop and converted the gzip file there. (The laptop's version of Allegro is 4.03, by the way.)

Time for bed. Here's looking forward to this week's slew of new games!

Mark Oates
Member #1,146
March 2001
avatar

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

--
Visit CLUBCATT.com for cat shirts, cat mugs, puzzles, art and more <-- coupon code ALLEGRO4LIFE at checkout and get $3 off any order of 3 or more items!

AllegroFlareAllegroFlare DocsAllegroFlare GitHub

Gassa
Member #5,298
December 2004
avatar

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
avatar

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"
Allegro Wiki, full of examples and articles !!

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
avatar

Keep an eye on the SpeedHack site. Matt will post the needed info to start the judging.

---
Febreze (and other air fresheners actually) is just below perfumes/colognes, and that's just below dead skunks in terms of smells that offend my nose.
MiquelFire.red
If anyone is of the opinion that there is no systemic racism in America, they're either blind, stupid, or racist too. ~Edgar Reynaldo

Karies
Member #8,158
December 2006
avatar

Please, post Speedhack binaries not only source code.



Go to: