Allegro.cc - Online Community

Allegro.cc Forums » The Depot » Haiku Game - A Musical Instrument

This thread is locked; no one can reply to it. rss feed Print
Haiku Game - A Musical Instrument
Mark Oates
Member #1,146
March 2001
avatar

Gufah?!

Alright, I wanted to create an app that demonstrated the animation possibilities of my framework (also inspired by the haiku thread). Since the turret game was pretty dry, colorless, and not developed, I wanted to create something that had more life. This is what I came up with. I hope you enjoy it! :)

Screenshot

{"name":"600075","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/d\/2\/d2d2ddc4b4dbf5acf82af2a5330cfaad.png","w":794,"h":491,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/d\/2\/d2d2ddc4b4dbf5acf82af2a5330cfaad"}600075
{"name":"600076","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/2\/3\/236b0434fa63cda374bc8e728092d06d.png","w":802,"h":500,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/2\/3\/236b0434fa63cda374bc8e728092d06d"}600076

Download

Instructions

  • Click elements at the bottom to select your current element.

  • Click to place any number of elements anywhere on the board.

  • Remove elements from the board with right-click.

  • Have fun! Make cool patterns! :)

  • Quit by pressing the x in your window.

Issues

  1. There should be no gameplay issues. However, it will sometimes crash on exit. And haven't figured that out yet. It's something to do with an al_destroy_bitmap();

  2. Playback is currently limited to 32 samples at a time.

  3. Sorry, Download is 12MB, mostly a bunch of small wav files (couldn't get ogg/vorbis to work and just wanted to get the game out the door!)

  4. Windows only (so far)

Questions

  • Does it work?

  • Are there any major speed issues, or timing stutters?

  • Post your screenshot!

  • I had originally thought to include a quick, short achievements based system to get all 4 elements. Essentially, the purpose being to make the later elements more "cool" once you achieve them and use them. Is it needed? What do you think?

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

AllegroFlare [clubcatt.com]AllegroFlare Docs [www.allegroflare.org]AllegroFlare GitHub [github.com]

Paul whoknows
Member #5,081
September 2004
avatar

Loading screen was displayed, then the menu appeared(first screenshot you post), and then game got frozen, tried to choose an element but nothing happened, tried to exit the game by pressing x with no good results, had to kill the application.

____

"The unlimited potential has been replaced by the concrete reality of what I programmed today." - Jordan Mechner.

Mark Oates
Member #1,146
March 2001
avatar

does the cursor change to a hand when you hover over an element?

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

AllegroFlare [clubcatt.com]AllegroFlare Docs [www.allegroflare.org]AllegroFlare GitHub [github.com]

Paul whoknows
Member #5,081
September 2004
avatar

Yes, but it takes a while, could it be that the game is just running extremly slow?

____

"The unlimited potential has been replaced by the concrete reality of what I programmed today." - Jordan Mechner.

Mark Oates
Member #1,146
March 2001
avatar

That's probably it. Does the title animation play smoothly?

My best guess is something specific to your computer that I didn't account for, similar to Felix. :-/ I don't think there's a quick fix for it at the moment.

What does your processor/memory speed look like?

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

AllegroFlare [clubcatt.com]AllegroFlare Docs [www.allegroflare.org]AllegroFlare GitHub [github.com]

Timorg
Member #2,028
March 2002

It worked flawlessly for me, (no crash on exit.)

A way to improve it would be to be able to serialise the board to a string, so that you can cut and paste other peoples setup, that way we could post our creations here, and people could just cut and paste it into the program to hear it.

It makes me think of public art, put it up on on a touch screen, with a large display for everyone else to see, some big speakers, then let the public at it. (Most likely committing crimes against music.)

____________________________________________________________________________________________
"c is much better than c++ if you don't need OOP simply because it's smaller and requires less load time." - alethiophile
OMG my sides are hurting from laughing so hard... :D

Paul whoknows
Member #5,081
September 2004
avatar

I didn`t see any title animation at all, just a still image, like the first screenshot you posted.
Tested in this hardware: P4 2400Mhz, 1 GB ram, FX5700LE(128MB).

____

"The unlimited potential has been replaced by the concrete reality of what I programmed today." - Jordan Mechner.

Dario ff
Member #10,065
August 2008
avatar

It works, really smooth, even on my sister´s computer with an Onboard Geforce 6100 and AMD sempron 2.1 GHZ. The animations are beautiful IMO :)

There was a crash when I quitted though, but nothing that needed the task manager.

Oh, there´s now way to win this game? :'( I won´t be able to beat another of your mini-games then Mark.

EDIT: A nice option could be the feature to save the melody.

TranslatorHack 2010, a human translation chain in a.cc.
My games: [GiftCraft] - [Blocky Rhythm[SH2011]] - [Elven Revolution] - [Dune Smasher!]

Mark Oates
Member #1,146
March 2001
avatar

Paul: It looks like you have enough hardware to me. The game only takes about 2MB of graphics, and possibly another 2 of offscreen memory. I'll try some different programs in the future and see if I can find where the problem is. In the mean time... :-/

dario ff said:

Oh, there´s now way to win this game? :'( I won´t be able to beat another of your mini-games then Mark.

Here, just copy this photoshoped screenshot:
{"name":"600078","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/c\/6\/c69f93a29f501f822b8efef485f69dee.png","w":401,"h":250,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/c\/6\/c69f93a29f501f822b8efef485f69dee"}600078
;)

[edit: new screenshot]

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

AllegroFlare [clubcatt.com]AllegroFlare Docs [www.allegroflare.org]AllegroFlare GitHub [github.com]

Dario ff
Member #10,065
August 2008
avatar

I won!
{"name":"600078","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/c\/6\/c69f93a29f501f822b8efef485f69dee.png","w":401,"h":250,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/c\/6\/c69f93a29f501f822b8efef485f69dee"}600078
;D

TranslatorHack 2010, a human translation chain in a.cc.
My games: [GiftCraft] - [Blocky Rhythm[SH2011]] - [Elven Revolution] - [Dune Smasher!]

Mark Oates
Member #1,146
March 2001
avatar

If you wanna spice it up, it's possible to replace some of the wav files with different sounds.

more screenshots, people! ;D

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

AllegroFlare [clubcatt.com]AllegroFlare Docs [www.allegroflare.org]AllegroFlare GitHub [github.com]

Matthew Leverton
Supreme Loser
January 1999
avatar

Mark, see your other thread for performance related suggestions.

--
RTFM | Follow Me on Google+ [plus.google.com] | I know 10 people

Trent Gamblin
Member #261
April 2000
avatar

Works fine here, nice use of the technology, didn't make a good song so no screenshot.

Mark Oates
Member #1,146
March 2001
avatar

for performance related suggestions

right ;)

You know, I could just use punctuation from the original, leaving out the comma and adding an extra apostrophe at the end.
{"name":"600086","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/0\/5\/05f927302029a36badf717f32d871538.jpg","w":400,"h":300,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/0\/5\/05f927302029a36badf717f32d871538"}600086
Wouldn't that be more accurate?

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

AllegroFlare [clubcatt.com]AllegroFlare Docs [www.allegroflare.org]AllegroFlare GitHub [github.com]

Anomie
Member #9,403
January 2008
avatar

Beautiful! I did have issues with some sounds not playing (usually when under heavy load). I also saw that while under stress, the pause when placing a piece in a new position was noticeable (I assume it was loading the audio on first use).

{"name":"600087","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/b\/1\/b1b43d35576270cef21dc98b7972b975.jpg","w":1024,"h":600,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/b\/1\/b1b43d35576270cef21dc98b7972b975"}600087
{"name":"600088","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/e\/6\/e69de976fa342131584b7365d61a10d3.jpg","w":1024,"h":600,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/e\/6\/e69de976fa342131584b7365d61a10d3"}600088

Animations were nice and smooth, and the background coloring added a lot. :)

______________
I am the Lorax. I speak for the trees. I speak for the trees for the trees have no tongues.

Mark Oates
Member #1,146
March 2001
avatar

Anomie said:

I did have issues with some sounds not playing (usually when under heavy load)

The sample limit is set to 32, so that's to be expected.

Quote:

the pause when placing a piece in a new position was noticeable

Ah, it appears that I forgot to preload the fire sounds (good thing there's the backup, eh? ;)). Could you check for me and see if it's just the Fire sounds?

Also, would you try this exe instead? It uses al_reserve_samples(128) instead of 32 so there should be no drop-outs. Also, I preloaded the fire sound in it, so that's fixed.

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

AllegroFlare [clubcatt.com]AllegroFlare Docs [www.allegroflare.org]AllegroFlare GitHub [github.com]

Peter Wang
Member #23
April 2000

Fun! Worked perfectly here. If I had to make a suggestion, the wind sound is a bit inconsequential so maybe you could replace it with something else.

Random doodle:
{"name":"600109","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/6\/e\/6e4e4daab3c61b8ed9f073cd5ad6937b.jpg","w":1030,"h":625,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/6\/e\/6e4e4daab3c61b8ed9f073cd5ad6937b"}600109

EDIT: well, not quite perfectly if I do this. The sound starts to crackle, possibly due to Allegro.
{"name":"600110","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/9\/59cb105b00d2f0c35dfd8f3b7144c504.jpg","w":1030,"h":625,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/9\/59cb105b00d2f0c35dfd8f3b7144c504"}600110

Anomie
Member #9,403
January 2008
avatar

The 128 sample exe fixed the dropped samples, but performance suffered and the audio would stutter under a relatively light load. Trimming silence from the samples fixed the stuttering, but a full board still gives choppy animations which seems like a bit of a problem. I didn't check to see if it did this in the original, but I'm on a netbook so it could just be the onboard graphics being worse than I thought.

I've uploaded a 5.5MB 7z archive with trimmed samples and both execs. I've also removed the *.ilk and *.pdb files, as well as the 'unused' directory. I'm not sure why they were in there, but the program seems to work fine without them. ???

Linky [tatman.uuuq.com] to my server because dial-upz won't allow me to attach the file here before my login times out. :'(

______________
I am the Lorax. I speak for the trees. I speak for the trees for the trees have no tongues.

kazzmir
Member #1,786
December 2001
avatar

Really beautiful, thanks.

I'm on windows 7.
The x button never closed the window for me.

If I had to make a suggestion, the wind sound is a bit inconsequential so maybe you could replace it with something else.

+1

Quote:

EDIT: well, not quite perfectly if I do this. The sound starts to crackle, possibly due to Allegro.

Same for me.

I tried both the Haiku and Haiku128_samples exes. Sound was better with the 128 one, less drop-offs.

You should really develop this!

Mark Oates
Member #1,146
March 2001
avatar

the wind sound is a bit inconsequential so maybe you could replace it with something else.

Ah my young student, you must give wind room to breathe, otherwise it has nowhere to go. ;) Each sound has it's own personality. Complementing them aesthetically isn't a given.

{"name":"600116","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/1\/f1c3c5ef7b47d64383eed6960daf5513.png","w":800,"h":494,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/1\/f1c3c5ef7b47d64383eed6960daf5513"}600116

kazzmir said:

The x button never closed the window for me.

OK. I've fixed this for future stuff. This is the classic "events getting backed up" syndrome.

Anomie said:

Trimming silence from the samples fixed the stuttering

That's one way to do it. There are long soft reverb trails on each of the samples; I wanted them to fully breathe so I left them in. Another way to fix it is to limit the number of tokens on the board. But I found that more annoying than the dropouts.

The right way to fix it is to use dry samples and run them through a reverb processor in real-time. There would be no stutters, probably not even for a fully stacked board and only 16 reserved samples. But I haven't even begun looking into sound processing yet.

kazzmir said:

Really beautiful, thanks.

Thank you.

Anomie said:

I've also removed the *.ilk and *.pdb files, as well as the 'unused' directory. I'm not sure why they were in there, but the program seems to work fine without them. ???

haha, yea. The whole reason I put that stuff in the "unused" folder was to take it out before release. ahhh....

more screenshots!

{"name":"600117","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/a\/d\/adfd4d09056376c8f43e31cac99f94ee.png","w":1083,"h":675,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/a\/d\/adfd4d09056376c8f43e31cac99f94ee"}600117

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

AllegroFlare [clubcatt.com]AllegroFlare Docs [www.allegroflare.org]AllegroFlare GitHub [github.com]

Matthew Leverton
Supreme Loser
January 1999
avatar

Each sound has it's own personality

{"name":"600118","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/c\/7\/c77800a73e75ee37b963ac8b88adb65b.png","w":1018,"h":593,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/c\/7\/c77800a73e75ee37b963ac8b88adb65b"}600118

You could probably turn this into an iPhone game and rip a bunch of suckers off 99 cents at a time.

--
RTFM | Follow Me on Google+ [plus.google.com] | I know 10 people

Fishcake
Member #8,704
June 2007
avatar

Cool! After seeing some of the "win" screenshots posted here, I actually tried to figure out how to win the game before realizing those screenshots are Photoshoped. :P

Matthew Leverton
Supreme Loser
January 1999
avatar

So can it do this yet:

video

???

--
RTFM | Follow Me on Google+ [plus.google.com] | I know 10 people

Mark Oates
Member #1,146
March 2001
avatar

So can it do this yet:

That would be the next iteration, I suppose. ;)

I do have another composition program called FullScore. It's the real workhorse. 8-) It's finally stable enough that I was able to use it to compose the music for the latest trailer I worked on:

video

Using it, I was able to write everyhing in almost a 10th of the time. Everything is only 1 or 2 keystrokes or mouse clicks away. I'd post screenshots of the program and all that stuff but I'm a hotel room.

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

AllegroFlare [clubcatt.com]AllegroFlare Docs [www.allegroflare.org]AllegroFlare GitHub [github.com]

Go to: