Author Topic: help....again  (Read 17690 times)

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
help....again
« Reply #45 on: October 11, 2005, 02:35:41 PM »
Have a look at my ant-bots in the "interesting behaviour" section of the beastiary.
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline MrMound

  • Bot Destroyer
  • ***
  • Posts: 156
    • View Profile
help....again
« Reply #46 on: October 11, 2005, 02:36:42 PM »
[CODE]
cond
*.roboage 3 <
start
0 0 angle .setaim store
stop[CODE]
so this would make my robot go to 0 0 when he was born?
(I just want to make sure this is right because its a key gene in my bot)
cooperation is working together to achive a common goal
mrmound

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
help....again
« Reply #47 on: October 11, 2005, 02:38:17 PM »
It won't make him GO to 0,0.

It will make him FACE the coords 0,0 (top left corner I think)
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
help....again
« Reply #48 on: October 11, 2005, 02:46:55 PM »
Yes, you'll need to use the distance operator (dist I think) to see when you actually reach 0,0.

Offline MrMound

  • Bot Destroyer
  • ***
  • Posts: 156
    • View Profile
help....again
« Reply #49 on: October 11, 2005, 02:48:56 PM »
cond
*.roboage 3 <
start
0 0 angle .setaim store
50 .up
stop

so his will make him go to 00
cooperation is working together to achive a common goal
mrmound

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
help....again
« Reply #50 on: October 11, 2005, 02:51:28 PM »
Move towards it yes.  But he could be way at (a billion, a billion) and so 50 .up might not be enough.

I'd do something like:

cond
0 0 dist 200 >
start
0 0 angle .setaim store
10 .up store
stop

feel free to change 200 with whatever other sort of radius you want to use.  Remember that most bots have a radius of like 60, so the closest a bot can ever really get to 0,0 would be like (60,60).

Offline MrMound

  • Bot Destroyer
  • ***
  • Posts: 156
    • View Profile
help....again
« Reply #51 on: October 11, 2005, 02:58:07 PM »
all right thaks guys hopfully this will make my bot work better
cooperation is working together to achive a common goal
mrmound

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
help....again
« Reply #52 on: October 11, 2005, 02:59:51 PM »
A more energy efficient method might be:

cond
0 0 dist 200 >
start
0 0 angle .setaim store
10 .velup sub 0 floor .up store
stop

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
help....again
« Reply #53 on: October 11, 2005, 03:02:56 PM »
Thats only if you run it in 2.4

for others try

Quote
cond
start
0 0 angle .setaim store
0 0 dist N div .up store
stop
end

If you know a good number for "N" now..., it problebly won't work anyway. I have no idea how to make a robot not over shoot its target location.
« Last Edit: October 12, 2005, 02:35:25 PM by Botsareus »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
help....again
« Reply #54 on: October 11, 2005, 06:11:27 PM »
Actually that gene would work in anything post 2.36 I beleive.

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
help....again
« Reply #55 on: October 12, 2005, 09:13:15 AM »
It could be a little expensive though.

Quote
0 0 dist 10 div .up store
This will accelerate toward the coords at a rate of 1/10 of the distance per cycle. This will be pretty much maxed out acceleration in a lot of cases. You might want to put a ceiling on that.
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D