Allegro.cc - Online Community

Allegro.cc Forums » The Depot » [SH09] Garbage Quest

This thread is locked; no one can reply to it. rss feed Print
 1   2 
[SH09] Garbage Quest
Jakub Wasilewski
Member #3,653
June 2003
avatar

Garbage Quest

This speedhack entry is a puzzle-platformer type. It's got 14 levels, 6 unlockable themes, and a surprise for those persistent enough to complete all the levels.

Oh, and it's fun, too! :)

Download Windows binary (fixed fixed version) - this one was fixed after the competition - it includes fixes to jump physics and some bugfixes.
Download Windows binary (competition version).

{"name":"598987","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/d\/5\/d56e5e84a8d24a2bc8a6e69cec68d539.png","w":797,"h":600,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/d\/5\/d56e5e84a8d24a2bc8a6e69cec68d539"}598987 {"name":"598988","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/a\/5\/a5a839c3361f9a539a96c3d064b1c6b3.png","w":796,"h":598,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/a\/5\/a5a839c3361f9a539a96c3d064b1c6b3"}598988 {"name":"598989","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/9\/8\/9829813efbf10553e26b0b308bccc058.png","w":798,"h":598,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/9\/8\/9829813efbf10553e26b0b308bccc058"}598989

Post your comment! :)

EDIT: Fixed binary...

---------------------------
[ ChristmasHack! | My games ] :::: One CSS to style them all, One Javascript to script them, / One HTML to bring them all and in the browser bind them / In the Land of Fantasy where Standards mean something.

kenmasters1976
Member #8,794
July 2007

Nice game. It's simple but very complete. Jumping is a bit tricky. I've only cleared Level 6 until now.

torhu
Member #2,727
September 2002
avatar

Uh, anyone got a non-SSE build? :-/

Matthew Leverton
Supreme Loser
January 1999
avatar

torhu
Member #2,727
September 2002
avatar

Victor Williams Stafusa da Silva
Member #4,212
January 2004
avatar

All that I got was a black screen with the music playing. Looks like some sort of portability issue. :(

[The attack of the space bugs - Speedhack 2005] [Rambananas - Speedhack 2006] [Make clean - Speedhack 2009] [The source god - TINS 2010]

Matthew Leverton
Supreme Loser
January 1999
avatar

torhu, want kind of chip do you have that doesn't support SSE ... a Dorito®?

torhu
Member #2,727
September 2002
avatar

An Athlon Thunderbird. ;D

Guess I'll have the same issue with all 4.9-based games if SSE is on by default...

Jeff Bernard
Member #6,698
December 2005
avatar

Crashes immediately for me. I posted something similar in SiegeLord's thread--anyway, anything special I need for running Allegro 5 games?

--
I thought I was wrong once, but I was mistaken.

Fishcake
Member #8,704
June 2007
avatar

I really love your game! The music, the gameplay, the graphics, everything is just too good. ;D I tried it using Wine on Ubuntu 8.10. Although the game runs, the texts are not being displayed properly. But still, I'm able to finish the game! :D The last few levels are quite tough. I unlocked the last level, the one question mark on it, and I didn't know what to do there, because I couldn't read the text. Something about unlock points... :-/ I wish I can make games like this. Studying your source code. :-X

Matthew Leverton
Supreme Loser
January 1999
avatar

Jeff & torhu, does this version work any better?

torhu
Member #2,727
September 2002
avatar

Thanks, that works.

I think these were the offending files. Could use your non-SSE files to run other 4.9-based games too.

  • liba5_primitives-4.9.12.dll

  • libkcm_audio-4.9.12.dll

  • liba5_ttf-4.9.12.dll

  • liba5_font-4.9.12.dll

  • liballegro-4.9.12.dll

And nice game, I'll play a bit more tomorrow. :)

Matthew Leverton
Supreme Loser
January 1999
avatar

It is extremely irritating to get A5 binaries to play nicely on Windows. It's basically a black art. :P

Jakub Wasilewski
Member #3,653
June 2003
avatar

Fishcake:

You could always build yourself a native Linux version. The game compiles cleanly under Linux, and under Ubuntu you can get away with sudo apt-getting all the dependencies except for Allegro 4.9.12 itself. Glad you like it, though!

Anyway,

not to ruin your game or anything, but the ?? level is basically a victory screen - the text only encourages you to beat all the time attack challenges on the levels.

Fishcake said:

Studying your source code.

Oh my :-X.

Matthew:

What special trick did you do with your binary? Anyway, maybe I should link to your version instead in the OP, because it works on my system too.

---------------------------
[ ChristmasHack! | My games ] :::: One CSS to style them all, One Javascript to script them, / One HTML to bring them all and in the browser bind them / In the Land of Fantasy where Standards mean something.

Matthew Leverton
Supreme Loser
January 1999
avatar

I'm still experimenting... I wouldn't link to it yet. The reason it worked for Torhu is that I disabled SSE (-DWANT_ALLOW_SSE=off) when compiling Allegro.

One annoying aspect with Allegro 4.9 is that if I build a monster version that includes everything, then every game is likely to have fake DLL dependencies. For instance, your game uses Ogg, but even though mine doesn't, as soon as my game links to acodec.lib, then it requires the Ogg DLLs to run... even though it doesn't use them.

If I don't do that, then I have to compile a new version of Allegro for every game. But then all the DLLs and LIBs have the same names, so that is even a worse mess. :P

Edit:

There's something minor that causes MSVC to break:

#SelectExpand
1std::string SPrintF::format(const std::string &fmt, ...)
2{ 3 if (!buffer) 4 buffer = new char[bufSize]; 5 6 va_list varArg; 7 8 va_start(varArg, fmt);
9 int charCount = vsnprintf(buffer, bufSize, fmt.c_str(), varArg) + 1;
10 va_end(varArg); 11 12 if (charCount > bufSize) 13 { 14 if (buffer) 15 delete buffer; 16 bufSize = charCount; 17 buffer = new char[bufSize]; 18 } 19 20 return buffer; 21}

Passing by reference invalidates the address passed to vsnprintf, causing the string to be corrupted. Removing the pass-by-reference fixes the problem.

Latest Binary

Garbage Quest.zip

I think the above binary is as compact as I can make it. It requires the MSVC 2008 SP1 Runtime.

Jakub Wasilewski
Member #3,653
June 2003
avatar

For instance, your game uses Ogg

No it doesn't :). But as you said, any reference to acodec causes a dependency on everything you compiled support for in, including lovely things like some FLAC DLLs.

---------------------------
[ ChristmasHack! | My games ] :::: One CSS to style them all, One Javascript to script them, / One HTML to bring them all and in the browser bind them / In the Land of Fantasy where Standards mean something.

Matthew Leverton
Supreme Loser
January 1999
avatar

Erhm, I meant the other way around. Mine used ogg, but yours didn't.

Thomas Fjellstrom
Member #476
June 2000
avatar

If I don't do that, then I have to compile a new version of Allegro for every game. But then all the DLLs and LIBs have the same names, so that is even a worse mess. :P

And thats why you don't attempt to make a monster dll.

That said, it might be better to have acodec dlopen its dependencies. But then you couldn't static link them...

--
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

Victor Williams Stafusa da Silva
Member #4,212
January 2004
avatar

I tried the last version posted by Matthew. I still get just a black screen with music. :(

[The attack of the space bugs - Speedhack 2005] [Rambananas - Speedhack 2006] [Make clean - Speedhack 2009] [The source god - TINS 2010]

Rodrigo Monteiro
Member #4,373
February 2004
avatar

Very nice and polished entry... some genuinely interesting levels, and the unlockable content is also pretty cool. Thumbs up!

_____________________________
a.k.a amz, a.k.a. ArchMage ZeratuL
[Aegisub] - [TINS05: Lord of the Stars] [SH05: Bunkermaster] [SH07: Fury of the Sky God] [TINS08: All Yar Base Arr Belong To Us (with codnik)] [SH09: Xtreme Programming: The Literal Game]

Jeff Bernard
Member #6,698
December 2005
avatar

I tried the last version posted by Matthew. I still get just a black screen with music.

That's more than I get. It still crashes right away for me.

--
I thought I was wrong once, but I was mistaken.

Inphernic
Member #1,111
March 2001

Really nice, but the controls get frustrating. The hardest thing in this game. ;) For example, level 10, the upper black vanishing platform.

If you don't correct the landing, momentum takes you to the force field, and if you correct, you hit the platform, drop the garbage bag and don't have enough time to pick it up.

Or jumping off ledges - it's too easy to get too close to a ledge and when you think you're making a full jump, you actually just started dropping and end up making a shorter double jump.

torhu
Member #2,727
September 2002
avatar

How about some more maps for gquest, 14 left me a bit unsatisfied? 8-)

That said, it might be better to have acodec dlopen its dependencies. But then you couldn't static link them...

I suppose you could still do that if the function pointers have the same names as the functions, since the syntax for calling them would still be the same. Only need to recompile.

On Windows, a simpler option could be delay-loading. The linker just replaces functions from the DLL with thunks that call LoadLibrary and GetProcAddress upon first call of the function. You can also call the __HrLoadAllImportsForDll function if you want all symbols resolved right now, but then it's not just linker switches anymore.

Maybe delay-loading could be a solution for 'official' precompiled binaries, at least. If the user never calls any ogg loading functions, no attempt will be made to load ogg/vorbis dll files, etc.

Rodrigo Monteiro
Member #4,373
February 2004
avatar

Sorry for the off-topic post, but on ML's post above (the one with the source), buffer is being allocated with new[] and deallocated with delete, instead of delete[]. That's undefined behavior.

_____________________________
a.k.a amz, a.k.a. ArchMage ZeratuL
[Aegisub] - [TINS05: Lord of the Stars] [SH05: Bunkermaster] [SH07: Fury of the Sky God] [TINS08: All Yar Base Arr Belong To Us (with codnik)] [SH09: Xtreme Programming: The Literal Game]

Thomas Fjellstrom
Member #476
June 2000
avatar

torhu said:

On Windows, a simpler option could be delay-loading

I thought thats how regular DLLs worked tbh. Otherwise why do they all have thunked methods in the .a/.lib file?

Seriously, I thought thats how they worked the whole time :o (ie: the dll isn't opened till the first use, and possibly even each symbol isn't loaded till its first use).

--
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

 1   2 


Go to: