ARM ANGLE DECODER (Robot manager)

incrazyboyy - Adventure level - from Android
PlayEdit11 players liked this.Log in to like this level.

If someone already tried to get the angle of adventure bot's weapon, he will get rubbish out.

It took me some time, but I finally managed to "decrypt" it. So now everyone can get the angle! Please credit me if you use it :)

Views: 1240 Downloads: 335 Unique objects: 1 Total objects: 30

Discuss this level

Log in to comment on this level.
  • incrazyboyy: @zardOz: thank you, I'm very happy that you like my work! :)
  • zardOz2: @pajlada: thanksp... @incrazyboyy: I am thouroghly impressed that you were able to decode it!
  • pajlada: The robot arm angle spewed out is the internal angle we use. It's dependant on the direction of the robot, but I understand this might not be desired :D
    So as a heads up, the arm angle output will change :)
  • zardOz2: @anarki2004: robot as the CF code,
    function init() Bot=world:get_entity_by_id(5) end
    function step()
    x,y=Bot:get_position()
    xx,yy=game:get_cursor()
    angleCalc=(math.atan2(yy-y,xx-x)/(math.pi*2))
    if angleCalc<0 then
    aim=1-math.abs(angleCalc) else
    aim=angleCalc
    end
    this:write(0,aim)
  • zardOz2: @incrazyboyy: I think Out0 is broken... I should be sending a standard Gyro signal.
  • zardOz2: @pajlada: im not sure what kind of angle signal that it coming from Out0 but whatever it is as you can see it's not very helpful lol! Also it sends non 0.0-1.0 from Out0... not sure about Out1
  • anarki20043: I was trying to come up with something like this on PC. If I could find a way to merge an adventure bot with the cursor finder it would be done.
  • incrazyboyy: @sdac: why it doesnt work correctly on pc?
  • incrazyboyy: @shantanuaryan67: yep, it's perfect for mechs
  • JOELwindows7: @incrazyboyy: np
  • shantanuaryan67: @incrazyboyy: I was planning to make a robo army like the one in iron man 2
  • incrazyboyy: @shantanuaryan67: well now you can use it!
    @JOELwindows7: Thx
  • JOELwindows7: Awesome!!!
  • shantanuaryan67: I too tried to make something like this but failed.
  • TechZ2124: Wow looks very interesring. I have no really ideas for this but I'll probably have as the Robot Manager and all those Robots controllers objects are just awesome. Make a LUA version must take some time too, for now this thing looks good enough ;)
  • incrazyboyy: @TechZ: thank you! But you know, i'm a lua beginner - I already tried to port it but failed :(
    You can derivative it and make a lua version! It is not much electronic, the difficult thing was to invert, snap, divide the value until it's clear! It took me 2 hours to figure that out, but now i know everything about the output, so just ask me if you are interested :)
  • TechZ2124: Cooooool thing, a LUA version would be better and would take less place but that's a great start and very useful thing. May use that, thanks !

LEVEL ID: 10177