Author Topic: Touch senses ain't workin. RESOLVED (NO BUG)  (Read 3947 times)

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Touch senses ain't workin. RESOLVED (NO BUG)
« on: March 25, 2008, 08:27:25 PM »
Have been testing with vision both enabled and disabled with Alga Minimalis, Animal Minimalis and R Fisannis for comparison. With vision disabled I see no indication it is doing anything when bots bump into each other. You can test by placing a lot of algas around any of the other bots. Here's a sim:

Uaaah!  
« Last Edit: March 26, 2008, 01:21:55 PM by EricL »
The internet is corrupt and controlled by criminally minded people.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Touch senses ain't workin. RESOLVED (NO BUG)
« Reply #1 on: March 25, 2008, 09:12:44 PM »
Looks like it is working fine to me.  The refvars get populated when bots touch.  What exactly do you think isn't working?
Many beers....

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Touch senses ain't workin. RESOLVED (NO BUG)
« Reply #2 on: March 26, 2008, 01:01:25 PM »
Well, when I start a sim with these bots with vision turned on they will shoot at the veggies when they come into view, but if I start with vision turned off they will never shoot even if they are surrounded with veggies bumping into them. For instance Animal Minimalis will constantly spin around until a veggie comes into view, then it will stop spinning and start shooting, with vision turned on. With vision turned off it will just keep on spinning, totally unaware of the crowd of veggies around it.
The internet is corrupt and controlled by criminally minded people.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Touch senses ain't workin. RESOLVED (NO BUG)
« Reply #3 on: March 26, 2008, 01:21:23 PM »
Well of course.   All their genes are conditioned on the value of *.eye5.  If you turn off their vision, you can't expect any gene with that condition to fire even if they bump into something and the refvars get populated.  

If you want blind bots to actually do something, don't condition their genes on eye values...
Many beers....

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Touch senses ain't workin. RESOLVED (NO BUG)
« Reply #4 on: March 26, 2008, 05:03:04 PM »
I see.  Well... I don't know how you have implemented the touch senses exactly. I was thinking you had just wired it to the eyes in some way. Does that mean you have a new sysvar for touch?
The internet is corrupt and controlled by criminally minded people.

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Touch senses ain't workin. RESOLVED (NO BUG)
« Reply #5 on: March 26, 2008, 05:38:09 PM »
Simply put; How would somebody write a simple hunter that uses touch references instead of eye references?
The internet is corrupt and controlled by criminally minded people.

Offline Commander Keen

  • Bot Builder
  • **
  • Posts: 91
    • View Profile
Touch senses ain't workin. RESOLVED (NO BUG)
« Reply #6 on: March 26, 2008, 05:55:24 PM »
There are some sysvars that change when you hit something. hitup hitdn hitsx and hitdx I think, it was something like that.

EDIT: Checked the wiki, there are 5 sysvars: hit, hitup, hitsx, hitdx and hitdn.
« Last Edit: March 26, 2008, 06:02:48 PM by Commander Keen »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Touch senses ain't workin. RESOLVED (NO BUG)
« Reply #7 on: March 26, 2008, 06:32:04 PM »
Take animal minimalis and try removing lines that compares *.eye5 to anything.  The resultant bot won't be prefect, but it should be able to feebly feed itself rather stupidly.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Touch senses ain't workin. RESOLVED (NO BUG)
« Reply #8 on: March 26, 2008, 08:21:47 PM »
As this topic explains in detail, what I did is simply to populate the refvars when bots touch.

Try this.  It should cause the bot to face and shoot at whatever it touches.

cond
*.refxpos 0 >
start
*.refxpos *.refypos angle .setaim store
-1 .shoot store
stop
Many beers....

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Touch senses ain't workin. RESOLVED (NO BUG)
« Reply #9 on: March 27, 2008, 07:16:53 AM »
Yep, it sure works. Awesome to look at. Thanks for clearing it out, folks.  
The internet is corrupt and controlled by criminally minded people.