Author Topic: Command Shortcutting  (Read 13138 times)

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: Command Shortcutting
« Reply #30 on: April 09, 2015, 01:53:52 PM »
Yeah, that's what I was thinking. To be honest, I think the subject of alternate variable names is irrelevant, at the moment, since this has only arisen due to "obscure" variable names.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Re: Command Shortcutting
« Reply #31 on: April 09, 2015, 02:11:55 PM »
I do know about def, but its nicer with the sometimes limited space of commands to reserve that for extra value storage

You can def to a memory location def'd by something else.  So what I'm saying is if you don't like how the in/out pairs are labelled you can invent your own labels for them.

Quote
plus as i've stated before, you need to know what the original command does to be able to use def to make an alternative!

That's true no matter how many command alternatives there are.  Lets say you see random instead of rand.  Well you know it's supposed to produce something random, but what and how?  You don't even know if it's a binary, unary or nullary(?) command.  Certainly all sysvars are like that, in terms of what they actually do.  Like most things in life you have to RTFM.

If you remember what the sysvar you want is but don't remember what it's called, that's a good opportunity to make your own.  Or just copy+paste it from somewhere else you've used it before.

Quote
you encompass a system to accept alternative languages and DB is nicely opensource. Now opensource games get mods, or opensource programs get little plugins to add extra compatibility or extra features...



http://svn.darwinbots.com/Darwinbots2/

Quote
then an extra folder would be good then you can store .txt files in there and then you can have your alternatives in there

What a great idea!  Let me propose the syntax to define the set of alternatives to look like this:

Code: [Select]
def alternative original

Then you just need some way to copy+paste the contents of one of these text files in to the bot you're writing.  Well, not copy+paste, since you want any changes you make in your alternatives file to be automatically reflected in any bot you write.  So something that lets you specify where the text file lives on disk and the program can automatically copy+paste it in there for you when you load your bot in the program.

How does that sound?
« Last Edit: April 09, 2015, 02:15:32 PM by Numsgil »

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: Command Shortcutting
« Reply #32 on: April 09, 2015, 02:19:41 PM »
Quote
then an extra folder would be good then you can store .txt files in there and then you can have your alternatives in there

What a great idea!  Let me propose the syntax to define the set of alternatives to look like this:

Code: [Select]
def alternative original

Then you just need some way to copy+paste the contents of one of these text files in to the bot you're writing.  Well, not copy+paste, since you want any changes you make in your alternatives file to be automatically reflected in any bot you write.  So something that lets you specify where the text file lives on disk and the program can automatically copy+paste it in there for you when you load your bot in the program.

How does that sound?

Sharing that bot would become difficult, wouldn't it?
« Last Edit: April 09, 2015, 02:25:42 PM by Panda »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Re: Command Shortcutting
« Reply #33 on: April 09, 2015, 02:25:14 PM »
Yeah, that's true.  We'd need something that aggregated those text files and your bot code together in to a single txt file probably.

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: Command Shortcutting
« Reply #34 on: April 09, 2015, 02:26:45 PM »
That is something that could be completed by the IDE before it is shared, perhaps "export to single file" functionality.
« Last Edit: April 09, 2015, 02:33:32 PM by Panda »

Offline spike43884

  • Bot Overlord
  • ****
  • Posts: 656
    • View Profile
Re: Command Shortcutting
« Reply #35 on: April 09, 2015, 03:42:57 PM »
I do know about def, but its nicer with the sometimes limited space of commands to reserve that for extra value storage

You can def to a memory location def'd by something else.  So what I'm saying is if you don't like how the in/out pairs are labelled you can invent your own labels for them.

Quote
plus as i've stated before, you need to know what the original command does to be able to use def to make an alternative!

That's true no matter how many command alternatives there are.  Lets say you see random instead of rand.  Well you know it's supposed to produce something random, but what and how?  You don't even know if it's a binary, unary or nullary(?) command.  Certainly all sysvars are like that, in terms of what they actually do.  Like most things in life you have to RTFM.

If you remember what the sysvar you want is but don't remember what it's called, that's a good opportunity to make your own.  Or just copy+paste it from somewhere else you've used it before.

Quote
you encompass a system to accept alternative languages and DB is nicely opensource. Now opensource games get mods, or opensource programs get little plugins to add extra compatibility or extra features...



http://svn.darwinbots.com/Darwinbots2/

Quote
then an extra folder would be good then you can store .txt files in there and then you can have your alternatives in there

What a great idea!  Let me propose the syntax to define the set of alternatives to look like this:

Code: [Select]
def alternative original

Then you just need some way to copy+paste the contents of one of these text files in to the bot you're writing.  Well, not copy+paste, since you want any changes you make in your alternatives file to be automatically reflected in any bot you write.  So something that lets you specify where the text file lives on disk and the program can automatically copy+paste it in there for you when you load your bot in the program.

How does that sound?

I am pleased. A compromise atlast, Thanks to the fact that DB is opensource (YES, I SAID IT AGAIN :3) A good few of those should crop up, possibly a section for the DB3 forums called "Alternate Command Sets".
:) Yep, im happy! Just like how we can install a new font to word easily :3
Autism can allow so much joy, and at the same time sadness to be seen. Our world is weird, and full of contradiction everywhere, yet somehow at moments seems to come together, and make near perfect sense.