[SH09] Garbage Quest
Jakub Wasilewski

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

kenmasters1976

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

torhu

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

Matthew Leverton

SSE or SSE2?

torhu

non-any-SSE :)

Victor Williams Stafusa da Silva

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

Matthew Leverton

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

torhu

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

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

Fishcake

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

Jeff & torhu, does this version work any better?

torhu

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

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

Jakub Wasilewski

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.

Matthew Leverton

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

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.

Matthew Leverton

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

Thomas Fjellstrom

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

Victor Williams Stafusa da Silva

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

Rodrigo Monteiro

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

Jeff Bernard

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.

Inphernic

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

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

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.

Thomas Fjellstrom
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).

torhu

EDIT: Thomas and Matthew, I've moved my last reply about DLL files to a new thread, in case we want to continue the discussion. Hope you don't mind.

Jakub Wasilewski

I'd like to get thread a bit back on track, and ask the following questions to everyone who played/finished the game:

1) How complete where the tutorial levels? Did you find something missing from them or insufficiently explained?
2) Which levels did you find the hardest and why? Or maybe they were all too easy?
3) Which level did you like the most?
4) Would you play an extended, touched-up Garbage Quest? :)

torhu said:

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

Well, quite likely. I'd definitely like to expand the project a bit, and add some new creatures and obstacles to the game - and along with that, more levels. 14 levels is really on the short side, but I think that creating 14 workable levels in the timeframe of Speedhack is still respectable :).

In the meantime, you can make some levels of your own! You can launch the game with a '-editor' switch. That will open the simple editor I used - it's crappy, but hey, Speedhack. Left mouse button places stuff, right mouse button removes stuff, mouse wheel toggles various tiles. "S" saves to levels/edit.lv, "L" loads levels/edit.lv, "P" allows you to test-drive the level. After you're done, you can replace one of the original levels, or even add new ones (if you keep to consecutive numbers) - level 15 will get covered by level "??" once its unlocked, though, cause that's hardcoded :).

Matthew Leverton

I played through about half of the levels. The game has promise... more so than most SH games. However, the only hard part of the game was the control. Exaggerated jumping is okay, but currently it's just ridiculous to make some pinpoint jumps.

The game reminds me of one of my C64 favorites:

video

MiquelFire

The only not letting me play this game is the jumping. Really annoying, and makes me fail more than other mistakes I could make (Tend to over jump platforms, and one level had a gap you needed to jump over, and if you fell in, you had to restart. Thing was, going above on the platforms once you clear, you could over jump one and fall in said gap)

Fishcake

1) The tutorial levels are complete to me.
2) Level 13 is the hardest level for me. It took me quite a while to figure out how to get all the bags into the chest. And a LOT of restarts. :D
3) Level 10!
4) Yes, I would love that. 14 levels aren't enough. :P

The game is quite fun when you just want to go through all the levels. But when you want to unlock points, it gets pretty annoying. It's quite hard to collect all the floating thingy (what are those?) in one jump. ::)

bamccaig

GCC on my 64-bit Linux system doesn't like you casting pointers to int... :( Anybody know of an easy solution? ???

** EDIT **

As expected, replacing [almost] ALL instances of int with long fixed those errors. I'm not sure if that will have consequences in your code. Nevertheless, I don't have A4.9 + pkg-config configured properly because when it gets to the linking stage it blows up.

Onewing

All the binaries I've tried in this thread (3 to be exact) have failed, straight to the "encountered a problem and needs to close" error at startup. :-/

Fishcake

I got all the unlock points. What do I do now? ;D

Matthew Leverton

I like that if the frame rate skips, you can jump through walls. But mostly you just get "crushed by a hunk of wall." :-/

Jakub Wasilewski

Well, yeah, the frameskip settings are definitely out of wack for this game. Well, what do you know, didn't have time to test them properly :).

Fishcake said:

I got all the unlock points. What do I do now?

Make a T-shirt with "I got all the unlock points and all I got is this lousy T-shirt", I suppose. Other than that, you can wait for me to get my act together and release an extended version :).

Albin Engström

A solid game.

The only thing to complain about is the jumping and the graphical requirments, and the alpha blending when a level is cleared kills my poor little cpu.

james_lohr

A cool little game. I completed all 14 levels, but didn't manage to unlock the ?? level. The only thing I don't like is that the horizontal component of the jumping velocity; it is a bit uncontrollable at times.

torhu

I agree about the horizontal velocity. Level 7 is hard both because that, and because of the throwing being a real bitch to get right. I've got a gold crown for all the other levels, though. :D I also love the music, it's perfect for the game.

EDIT: Maybe it would help if you didn't get instant top speed when turning in the air. A little bit of acceleration, so it's easier to make small adjustments. Maybe some ground friction when landing, too. :)

Jakub Wasilewski

So, I finally got round to fixing all the obvious bugs and problems in the competition version. The fixed version is attached, and features the following changes:

  • no more deathwalking

  • the baddies should no longer be able to push the bags into walls

  • the jump physics are tweaked - hopefully for the better

So, if you're frustrated by the jumping in the original, you might want to get this one.

--------

torhu said:

Level 7 is hard both because that, and because of the throwing being a real bitch to get right.

Unfortunately, you seem to have stumbled upon an alternative, harder way to solve the puzzle. The intended way involves only two throws total, and the jumps should also be easy. Of course, perhaps I'm mistaken and the intended way is hard.

Hint:

you can still jump while carrying a bag - not very high, but far enough across

The real problem with some of the levels is there are unintended ways of clearing them (based on game physics peculiarities, usually), but there simply wasn't enough time to test it all - not to mention to get more sensible physics working ;).

whirpp

this is one of the best games in Speedhack 2009, the old controls was very hard especially in final round . I am very happy to try the fixed version. ;)

torhu

Seems you've included the wrong dll files, but I got it working with some files I had lying around.

Anyway, level 7 is a lot easier when doing what you suggested. :o

EDIT: There is still the bug where sometimes the bags or green monsters will just hang in the air instead of falling to the ground when I'm trying to drop them.

Jakub Wasilewski
torhu said:

There is still the bug where sometimes the bags or green monsters will just hang in the air instead of falling to the ground when I'm trying to drop them.

Right! I forgot about this one... let's see what we can do about it.

By the way, I'm looking for feedback on the new jump physics. Are they better/worse/the same, etc.?

bamccaig

Finally found time to try it. The jumping seems better in the *-fix1 version, but the controls are still not intuitive. I think it would be better to keep movement together (i.e., up for jump). It might even be best to use FPS controls. WASD for movement (optionally space to jump) and E or F for an action key. The current controls feel awkward to me. I'd try them out that way myself to see if it works as well as I imagine it would, but I'm too exhausted to bother... :-/

That said, it's still a very nice and polished game. I like the help notices and the intelligent game design with respect to them (albeit, I could swear the second level requires you to double-jump before the notice is accessible...).

Neil Walker

Distribution doesn't work at all for the 'fixed up' version:

First up it wants all the dll's to be prefixed with 'lib' and the ttf dll is missing.

If you download the compo entry all the dll's are there so mix and match and it might just work for you.

Nice game though :)

bamccaig

Yeah, I too had to copy all DLLs from the original to get the fix to work. Forgot about that.

Stefan Hendriks

Actually quite a nice game! Too bad the 'fixed' version does not contain all DLL's. So I had to get first the 'normal' version (the competition version), and then overwrite it with the new version to get it working.

Really like the game, feels solid. Looks good. Quite fun!

I've both tried the old and the new version, and I must say that this jumping is really improved in the fixed version, way less frustration ;)

Good work!

Jakub Wasilewski

Distribution doesn't work at all for the 'fixed up' version

Thanks for the heads up! I've uploaded a new, hopefully working archive and linked to it from the original post. The A5 DLLs are a chore to get to work properly.

bamccaig said:

It might even be best to use FPS controls. WASD for movement (optionally space to jump) and E or F for an action key. The current controls feel awkward to me. I'd try them out that way myself to see if it works as well as I imagine it would, but I'm too exhausted to bother...

Well, FPS controls are just what you said - FPS controls. A great many 2d platformers use the scheme I use, and people playing games in the genre are quite used to it, I think. The original problem was with the way the controls worked, not with the individual key assignments, I think.

Anyway, if you want to tweak it to see if the FPS scheme is workable, all it takes is changing src/misc/Controls.h to match your preferences. You can't make up jump though - it's needed for the throws.

Quote:

albeit, I could swear the second level requires you to double-jump before the notice is accessible...

I'm not sure what you are refering to. The second level actually doesn't require you to use double jump - all the jumps there are short. The technique is presented on the first level, and the long jump there can certainly be cleared without double-jumping. It's possible I fscked the physics up, so the length of your jump depends on frame-rate - but I don't think that should be the case.

bamccaig

You can't make up jump though - it's needed for the throws.

E for high throws and F for low throws. ;) Might require some deeper modifications to the code than you expected, but it's certainly possible.

I'm not sure what you are refering to. The second level actually doesn't require you to use double jump - all the jumps there are short. The technique is presented on the first level, and the long jump there can certainly be cleared without double-jumping. It's possible I fscked the physics up, so the length of your jump depends on frame-rate - but I don't think that should be the case.

I'm not sure what level it was, but I remember trying to figure out how to clear a large gap and through experimentation figured out there was double-jumping. I could swear I remember finding a help bubble explaining double-jumping after that point in the level. It's possible I'm wrong though. I'm in Linux so I can't check on that just now.

Thread #600901. Printed from Allegro.cc