Author Topic: Implementing Sound  (Read 7899 times)

Offline rsucoop

  • Bot Destroyer
  • ***
  • Posts: 166
    • View Profile
Implementing Sound
« Reply #15 on: April 18, 2008, 10:39:30 AM »
Ok, how about the sound waves haev to hit their bodies, and that lets them decifer the information in that wave; which could be a turn command, or a refvar, or a 'hey im in heat' system. And I say dont allow writing to memeory through sound, leave it to the hearing bot.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Implementing Sound
« Reply #16 on: April 18, 2008, 12:06:23 PM »
The only thing we have today that has a propagation delay are shots.  We could do something here leveraging shots...

Imagine a new "sound" shot type.  It propagates out from the shooter in a half circle at regular shot speed, it's range is limited and controllable via .shootval.  One diffrence between it and other shot types is that the shooter's speed does not impact the shot's speed.  The speed of sound is constant.   Another is it can't be seen (other shots types will be visible soon) or maybe it can.  Any bot the wave crosses before it dissipates completely is impacted.

What it does when it impacts is a matter of discussion.  Perhaps there are a handful of sound in/out pairs.  The shooter sets them before firing the sound, the shot impact sets them in the impacted bot.

What happens when a bot is impacted by multple sound shots in a single cycle is TBD.  Perhaps each shot has a shooter-settable power that dissipates as a function of range.  The "loudest" sound impacted a bot wins...

The .hit sysvars already provide a means for impacted bots to directionalize shots.

If shapes are specified to reflect shots, then they reflect sound shots, allowing for echo-location.

I'd have to impliment some new code to do circle-circle intersection for this shot type for impact detection and there will be a perfromance impact if this becomes heaviliy used, but I would say this option is doable in the mid term.
Many beers....

Offline rsucoop

  • Bot Destroyer
  • ***
  • Posts: 166
    • View Profile
Implementing Sound
« Reply #17 on: April 18, 2008, 12:51:43 PM »
Quote from: EricL
The only thing we have today that has a propagation delay are shots.  We could do something here leveraging shots...

Imagine a new "sound" shot type.  It propagates out from the shooter in a half circle at regular shot speed, it's range is limited and controllable via .shootval.  One diffrence between it and other shot types is that the shooter's speed does not impact the shot's speed.  The speed of sound is constant.   Another is it can't be seen (other shots types will be visible soon) or maybe it can.  Any bot the wave crosses before it dissipates completely is impacted.

What it does when it impacts is a matter of discussion.  Perhaps there are a handful of sound in/out pairs.  The shooter sets them before firing the sound, the shot impact sets them in the impacted bot.

What happens when a bot is impacted by multple sound shots in a single cycle is TBD.  Perhaps each shot has a shooter-settable power that dissipates as a function of range.  The "loudest" sound impacted a bot wins...

The .hit sysvars already provide a means for impacted bots to directionalize shots.

If shapes are specified to reflect shots, then they reflect sound shots, allowing for echo-location.

I'd have to impliment some new code to do circle-circle intersection for this shot type for impact detection and there will be a perfromance impact if this becomes heaviliy used, but I would say this option is doable in the mid term.

What if we did this for multiple shots? We create a sound buffer, which collects all information about a shot right after it impacts the bot, the bots ear goes 1+(1 for each other sound). THen the bot could randomly, or intelligently, sellect a sound its heering and try to interprut it. The only problem would be speed of simulation from that, it would give the bot the ability to hear only commands from a friend, or onyl calls from a mate, or something along that; a sort of ability to decifer its environment. I think we did this with the tin/tout system, only we didnt need 36000 vars

Offline rsucoop

  • Bot Destroyer
  • ***
  • Posts: 166
    • View Profile
Implementing Sound
« Reply #18 on: April 20, 2008, 07:10:59 PM »
Could this be used in 2.4x+?

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Implementing Sound
« Reply #19 on: April 20, 2008, 07:21:47 PM »
Quote from: rsucoop
Could this be used in 2.4x+?
If you are asking whether this coudl be implimented on the 2.4x code base, the answer is yes.  All it takes is time and effort...
Many beers....

Offline rsucoop

  • Bot Destroyer
  • ***
  • Posts: 166
    • View Profile
Implementing Sound
« Reply #20 on: April 20, 2008, 11:10:00 PM »
Quote from: EricL
Quote from: rsucoop
Could this be used in 2.4x+?
If you are asking whether this coudl be implimented on the 2.4x code base, the answer is yes.  All it takes is time and effort...

well what do I have to do?

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Implementing Sound
« Reply #21 on: April 21, 2008, 01:44:46 AM »
Quote from: rsucoop
well what do I have to do?
Either wait a few months and I'll get around to it or download the source and start partying...
Many beers....

Offline rsucoop

  • Bot Destroyer
  • ***
  • Posts: 166
    • View Profile
Implementing Sound
« Reply #22 on: April 21, 2008, 05:05:20 PM »
Quote from: EricL
Quote from: rsucoop
well what do I have to do?
Either wait a few months and I'll get around to it or download the source and start partying...

Ok, but I only know Basic, and html, so unless you can guarantee that I can amend the code in Basic or HTML, I dont think I could be muthc help. Also sound should be able to be disabled so if it does cause performance issues, it can easily be removed, or added for that extra bit of environmental realism.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Implementing Sound
« Reply #23 on: April 21, 2008, 05:37:13 PM »
The current code is written in Visual Basic.  It's a MS variant of basic.  Assuming you have the fundamental programming background, you won't have any problems tinkering with the code.
« Last Edit: April 21, 2008, 05:37:56 PM by Numsgil »