Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Roboarm

edited December 2011 in Code Sharing Posts: 447

http://ruilov.posterous.com/roboarm

The idea is to program the robotic arm to move the blocks to the right place (shown on top). It's based on robozzle http://robozzle.com/ which is a really cool programming game

There's 8 levels (fair warning: levels 7 and 8 are meant to be hard) but still lots of stuff to do.

Would love to hear if anyone has suggestions on how to modify the rules to make levels more interesting, or ideas for new levels.

Comments

  • We need a thumbs up/like on this forum :)

  • Posts: 76

    I like the game. My daughter,7 years old, would love to play the game because she used to play the Bubble Ball on iPhone. Thank you for the fantastic game.

  • SimeonSimeon Admin Mod
    edited December 2011 Posts: 5,424

    This is really fun. And hard! One of the puzzles looks like Tower of Hanoi?

    I finally solved level 5. I can't believe how long it took me :)

    Roboarm

  • Posts: 447

    Simon that is one crazy solution, i'm still trying to understand how it works. Sorry it took you so long.

    There's another solution which would sort out any combination of red and green blocks in the central pile.

    Spoiler below:
    F1: down,f2 if red, f3 if green, f1
    F2: left,down,right
    F3: right,down,left

  • Posts: 384

    Ha ha @Simeon, you came up with another solution... :) I did it the easy way. I managed level 7 but stuck on some of the higher and lower ones. @ruilov, are the coloured boxes that appear in the program register meant to be clues? I couldn't get them back...

  • Posts: 447

    Fred, no it's a bug in that it doesn't reset the background color of the register when you move from one level to the next. I'll fix it, give me a second.

    I'm thinking of adding a "conditional on not holding anything" button as it may make things a little more interesting

  • edited December 2011 Posts: 447

    Fixed here: http://ruilov.posterous.com/roboarm2

    Also added another green box to level 5

    Edit: gah, now it's really fixed

    Edit2: added a couple more levels. The last few should be challenging but have a logic to them. In level 12 you count the number of reds to decide how many times to move each blue to the right. (but if you find a hack around them please post)

  • edited December 2011 Posts: 273

    This is amazing ruilov! I really love programming games and have been tinkering away on one myself... but with nowhere near the same degree of panache!

  • SimeonSimeon Admin Mod
    edited December 2011 Posts: 5,424

    What other solutions are there for level 6? I got the following but feel it's not the intended one:

    Edit: Stuck on level 9, @ruilov, help me out :)

    Roboarm Level 6

  • This is really great. One of my other favorites is worth a look. Check out lightbot 2.0.

    http://armorgames.com/play/6061/light-bot-20

    For more ideas.

  • edited December 2011 Posts: 447

    @simon, I had another solution in mind, but my wife found that one too, which is shorter and elegant. You can condense it into a 6 register function, so that's why I made level 7 (I think)

    Level 9, is the one where you sort two piles? It's kind of the same as sorting one pile, but you don't move the blocks all the way to their end place at first.

    As for levels after that you need to discover the concept of a function stack. Note that functions do return and the instruction pointer goes back to where it was when the function was called.

    @alvelda, cool let's see what I can steal from that :)

  • Posts: 2,161

    I really like this, but I find that I get what seem like "ghost" effects. Sometimes I can pick up things that aren't there yet (like yellow boxes) and sometimes it seems as though there's a hidden extra box in the routine (I had one where I'd programmed five right moves and it did six, or something like that). I also don't like the fact that it puts the move in every box that the touch passes over - I'd prefer it if it only did it where the touch ended. Otherwise, it's hard to change just one move in the middle.

  • BortelsBortels Mod
    Posts: 1,557

    I'm having ui issues -how do I add a function? I need f2.

  • Posts: 447

    Andrew, sorry for the bugs, ghost effects are not intended. Touch end makes sense, thanks for the suggestion

    Bortels, you can't add new functions, have to use only the spaces available. That is, unless you're trying to make a new level in editor mode.

  • BortelsBortels Mod
    Posts: 1,557

    I must be missing something.

    Level 2 - I need to grab the block, move it over 3, then drop it. But I only have 4 instructions - so I can grab, move, move, move -but not drop.

    I wanted f2 so I could f2=move.move.move, then f1 would be grab,f2,drop.

    I must be missing something simple. I Also don't get what the colors are for (I assume later levels)

  • BortelsBortels Mod
    Posts: 1,557

    By the way -- awesome game, even if I don't get it all yet. You've got the who's-who of Codea people playing, including Simeon. :-) you've hit an itch we all need to scratch (programming giant robots!)

  • Posts: 447

    Bortels, in level 2 you need to call f1 recursively

    Yes the colors are for later levels, if you add color it will only execute that move if you're holding a block of that color. i think you only need on level 5 and beyond

  • BortelsBortels Mod
    Posts: 1,557

    Call f1 recurs.... Aieeee, the dreaded goto!!! :-)

    But that is an endless loop - the robot arm should crash thru the right side of the factory and rampage the countryside, oh, the horror... M00hahahahaaaa...

  • Posts: 447

    Bortels, it's compliant with 5.2 :)

    But actually, it's not a goto, it's a function call which returns when the function is done (obviously in this level it never returns since it just loops)

  • Posts: 447

    Answer key, but looking at it takes away the fun

    D = down, L = left, R = right
    Levels numbers correspond to the ones in roboarm2.codea
    
    Level 1:
    F1: D,R,D
    
    Level 2:
    F1: D,R,D,F1
    
    Level 3:
    F1: D,R,D,L,F1
    
    Level 4: 
    brute force solution: 
    F1: D,F2,D,F3,F1
    F2: R,R,R,R,R
    F3: L,L,L,L,L
    
    shorter solution:
    F1: F2,F2,F2,F2,F2
    F2: F3,F3,F3,F3,R
    F3: D,R,D,L
    
    Level 5:
    F1: D,R,R if red,D,L,F1
    
    Level 6:
    F1: D,F2 if red,F3 if green,F1
    F2: L,D,R
    F3: R,D,L
    
    Level 7:
    F1: F4,R,F4
    F2: D,R,D,L
    F3: F2,F2
    F4: F3,F3
    
    Level 8: (same solution as level 5)
    F1: D,R,R if red,D,L,F1
    
    Level 9:
    F1: F2,R,F2,L,F1
    F2: D,F3 if blue,F4 if yellow
    F3: L,D,R
    F4: R,D,L
    
    Level 10:
    F1: F3,D
    F2: D,F3
    F3: R,D,F2 if blue,L
    
    Level 11:
    F1: F3,D,F1
    F2: D,F3
    F3: R,D,F2 if blue,L
    
    Level 12:
    F1: F2,F1
    F2: D,F3 if red,R
    F3: R,D,L,F2
    
  • SimeonSimeon Admin Mod
    Posts: 5,424

    Actually level 10 was the one I was stuck on - you moved it in the second update. @Dylan managed to figure it out yesterday though.

  • Posts: 8

    Sorry for the super necro-post, but does @ruilov still have the source for this? Posterous is dead and I wasn't able to download the file using the wayback machine.

  • Posts: 300

    Cargobot is a very similar game, and the code comes with Codea.

  • Posts: 8

    I am aware of that, but the code is much more complex (I assume) and I want to try to port the game to another platform. Also, I'd like to play the original version :)

  • Posts: 257

    you have Roboarm source in my website : gregory.thomas.free.fr
    then assistant personnel

  • Posts: 2,043

    @Ivoah, @Crumble, this is Cargo Bot, in its earlier iterations.

  • Posts: 8

    @JakAttak I know, I just want to be able to play the original

Sign In or Register to comment.