Guinea Pigs Wanted!

I think that lvl 9 is probably possible as is, but it is REALLY hard. I think I may have spent a total of an hour of play time just on this level, and haven’t beaten it.

Its not supposed to be that hard, yet. Maybe at around level 149?

I will change the ‘drop’ in location of the guards to above the two towers and see if that makes a difference. In this way, you can lure the guards up the ladder and burn them on the ‘roof’ of the castle. When they drop in, you can then clear the level … hopefully!

OK … hopefully the Level 9 issue is fixed with these changes:

New Features / Fixes / Fudges

  • If an enemy / guard cannot move directly towards you they will move in an appropriate direction towards you for a random number of moves. If they have randomly started climbing a ladder they will do so until they hit the end of the ladder or reach a point in the ladder where they have reached a ladder, rail or a solid platform. On level 9, this will mean they will climb to the top of the ladders even when you drop down on to the castle roof and are lower than them.
  • Changed the drop in location on level 9 to have enemies respawn in the towers only.
  • Changed the intro music - thanks @Vampirics - to repeat when you return to the front screen and every 2 seconds.
  • Allowed the player to run across the enemies heads as per the original.

To Do

  • Sort out the ‘Men’ count after a restore.
    I cannot reproduce this one!
  • Sort out the trapped man as per @ThaddeusSM
    I cannot reproduce this one either!

The new HEX can be found here >
Source code can be found here >

Edit: If you want to play Level 9 directly, edit the file called Level and find the lines below:

const uint8_t *levels[] =    { nullptr, /*test,*/ 
                               level1, level2, level3, level4, level5, level6, level7, level8, level9, level10, 
                               level11, level12, level13, level14, level15, level16, level17, level18, level19, level20, 
                               level21, level22, level23, level24, level25, level26, level27, level28, level29, level30,
                               level31, level32, level33, level34, level35, level36, level37, level38, level39, level40,

Remove the comments around /test so the line looks like this:

const uint8_t *levels[] =    { nullptr, test, 
                               level1, level2, level3, level4, level5, level6, level7, level8, level9, level10, 
                               level11, level12, level13, level14, level15, level16, level17, level18, level19, level20, 
                               level21, level22, level23, level24, level25, level26, level27, level28, level29, level30,
                               level31, level32, level33, level34, level35, level36, level37, level38, level39, level40,

Compile and upload to your machine. To play it, you will have to ‘reset’ the game at the menu which means you lose your level details.

If you are up to Level 9 already, do nothing and simply download the .HEX file and play!

1 Like

Played on the new version:

  • It seems to be easier to lure the enemies now. still need to work on beatnik the level though.
  • When you die, the sound seems to loop until you get back in the game (wasn’t doing it before, maybe it’s intentional?)
  • I think that i got more then 1 life back when completing a level, like got to 10 lives as soon as i completed 1 level.
  • The magic gold bug is still there sometimes. I don’t know if it helps but it happened to me a couple times, i get all the gold displayed at the bottom but i can still see a couple gold blocks right in front of me. I wish i could help more to find out what’s causing that but it seems so random…
1 Like

Still no luck. Same issue. This was my fourth try on level 9 after updating to 0.98.

Also, may I suggest adding the serial setup to your code so people can take direct screenshots from @crait’s Arduboy manager? He has a really easy guide on how to do this, it adds like 2 lines of code total.
Edit: In just in case you don’t already know how to do that (which I am sure you do) here is the link: Screen Mirroring Guide / How To Screenshot Your Game

1 Like

You don’t mean your sound? If its the death sound then no, that’s not intentional.

Ooops … it must add them in the loop.

Yes, the fact that it is random doesn’t help solve it! @pharap noticed it too and I have seen it only once.

Do the guards ever get close to the solid block? You know you can run over their heads??

They do get close to the solid block; but every time I line up the character to walk on his head I fall through and die.

I have also tried luring them up to the top tower and trapping them, but that hasn’t seemed to work either. They come, but I always get stuck and die XD

Edit: hey! I got lucky this time. I finished it, but I think the only reason I did was because I did it really fast.


  • Men Counter wrapping round after Dying. (Lives Checker)

Wow … but it sounds like no one else will be able to do that. How do we fix the level itself?

Now you have something to do code-wise. You get a extra man at the end of each level (up to 10 men but I must have put the code in a spot where it is repeated many times.

Just a Quick question which files use the Queue.h file?

I examined the enemy movement code to try to see if I could find any clues, but it’s hard to keep track of everything.

As far as I could see the gold related stuff itself isn’t causing an issue, but it’s hard to tell how it interacts with other parts.

Could be an issue in the level loading.

Perhaps you should count the gold after the level is fully loaded instead of trying to do it as you unpack the level?

LodeRunner.ino uses it to queue the holes that need to be filled in.
Why, do you want to know how it works or what it does?

(I’m the one who wrote Queue.h by the way. Sometimes I loan data structures to @filmote.)

The main LodeRunner.ino file. It is used to store the ‘burning bricks’ on a ‘first burnt, first to regenerate’ basis.

if (arduboy.everyXFrames(2)) {
      for (uint8_t y = 0; y < level.getHeight(); y++) {

        for (uint8_t x = 0; x < level.getWidth() * 2; x++) {

          LevelElement element = (LevelElement)level.getLevelData(x, y);
          switch (element) {

            case LevelElement::Brick_1 ... LevelElement::Brick_4:
              element++; //<<<<<<<<<
              level.setLevelData(x, y, element);






This is the one place I could possibly see it occuring within a game without loading being an error.

I rip them from the web initially then when I see they are bloated and poor performers, I ask @pharap for a better one!

1 Like

So what that code is doing is polling the board for any holes that are being dug. Element in this case is a LevelElement item that is at position x / y. If the element is a Brick_1 / 2 / 3 or 4, it increases it to the next image (with Brick_1 being the start of digging and Brick_4 being the hole is almost complete and the next element, Brick_Transition, being fully dug).

This should not relate to the gold or men lives issues. (famous last words, * should *)

A more concise version of @filmote’s explanation:

LevelElement is defined as thus:

enum class LevelElement : uint8_t {

  Blank,       // 0
  Brick,       // 1
  Solid,       // 2
  Ladder,      // 3
  Rail,        // 4
  FallThrough, // 5
  Gold,        // 6
  Brick_1,     // 7
  Brick_2,     // 8
  Brick_3,     // 9
  Brick_4,     // 10
  Brick_Transition,  // 11
  Brick_Close_1,  // 12
  Brick_Close_2,  // 13
  Brick_Close_3,  // 14
  Brick_Close_4,  // 15

case LevelElement::Brick_1 ... LevelElement::Brick_4: is a compiler extension (i.e. not standard C++, it won’t work on other compilers) that basically means if(element >= LevelElement::Brick_1 && element <= LevelElement::Brick_4).
The next value after Brick_4 is Brick_Transition, so element++; will only cause element to be something from Brick_2 to Brick_Transition.

1 Like

Thanks for expanding … I am on a customer site right now so can quickly thump out messages but probably should look like I am working.

Which Levels use RLE and Grid?

Actually I just realised that technically your prefix ++ implementation should be returning LevelElement & instead of LevelElement, but that’s probably not affecting anything.

It’s a good thing your hobby looks a lot like your job or you’d probably have been sacked by now.
If your hobby was art it would be a lot more obvious that your paintings weren’t what you were supposed to be doing.

Better safe than sorry?