Code center > Darwinbots3

Command Shortcutting

<< < (7/8) > >>

Panda:
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.

Numsgil:

--- Quote from: spike43884 on April 09, 2015, 10:08:19 AM ---I do know about def, but its nicer with the sometimes limited space of commands to reserve that for extra value storage

--- End quote ---

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!
--- End quote ---

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...
--- End quote ---



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

--- End quote ---

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


--- Code: ---def alternative original

--- End code ---

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?

Panda:

--- Quote from: Numsgil on April 09, 2015, 02:11:55 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

--- End quote ---

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


--- Code: ---def alternative original

--- End code ---

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?

--- End quote ---

Sharing that bot would become difficult, wouldn't it?

Numsgil:
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.

Panda:
That is something that could be completed by the IDE before it is shared, perhaps "export to single file" functionality.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version