Bots and Simulations > DNA - General

Out of interest...

<< < (3/18) > >>

Ulciscor:
When I am done with exams etc. I will have a stab at writing a list of all the DNA commands and variables and examples, post it up, let people look it over and comment then redo it. Lather, rinse, repeat and a rather good help file should be made.

Numsgil:
Go ahead and do it via the wiki at Darwinbots.com.  That should become the Main help compendium.

PurpleYouko:

--- Quote ---Could we just load an external txt file into the help file? I'm guessing here but since we can load dna and view it, we should be able to do the same for the help.
--- End quote ---

It could be set up that way but you would have to be incredibly careful to get all the formatting just so.
When you display into a scrolling textbox like the one we use for the help file, you have to use all sorts of weird and wonderful formatting controls to keep the line spacings and lengths right. (well not that many format controls really)

Here is a small chunk of the code that generates the help file.


--- Code: ---    Help.text = ""
    Help.text = Help.text + vbTab + vbTab + vbTab + vbTab + "DarwinBots V2.32beta DNA" + vbCrLf
    Help.text = Help.text + "" + vbCrLf
    Help.text = Help.text + vbTab + "This is a very brief listing of all the DNA commands and how they work" + vbCrLf
    Help.text = Help.text + vbTab + "Just to keep it interesting it is told from a robot's eye view. HeHe!" + vbCrLf
    Help.text = Help.text + "" + vbCrLf
    Help.text = Help.text + "First here is a reminder of the mathematical operators" + vbCrLf
    Help.text = Help.text + "These can only be used in the Action step of the DNA. (after START)" + vbCrLf
    Help.text = Help.text + "" + vbCrLf
    Help.text = Help.text + "add" + vbTab + "-----" + vbTab + "Adds the top two values on the stack and leaves the result on the stack" + vbCrLf
    Help.text = Help.text + vbTab + vbTab + "The original two numbers are removed." + vbCrLf
    Help.text = Help.text + vbTab + "Syntax." + vbTab + "(15 25 add) will add 15 to 25 and leave 40 on the stack" + vbCrLf
    Help.text = Help.text + "" + vbCrLf
    
    Help.text = Help.text + "sub" + vbTab + "-----" + vbTab + "Subtracts the top value on the stack from the second value on the stack." + vbCrLf
    Help.text = Help.text + vbTab + vbTab + "The result is left on the stack and the original two numbers are removed." + vbCrLf
    Help.text = Help.text + vbTab + "Syntax." + vbTab + "(15 25 sub) will subtract 25 from 15 and leave -10 on the stack" + vbCrLf
    Help.text = Help.text + "" + vbCrLf
--- End code ---

Please remember that this file is about 300 lines long and growing all the time.

Ulciscor:
Would it not be easier to make an HTML help file and then use a browser component and navigate to the help file? It would be easier to do the formatting with tables etc. You could also have the possibility of linking to an online help file which could be changed frequently. But if they didn't want to have to connect to the internet the local file could be used. Or something like that anyway.

PurpleYouko:
Quite possibly so. I just haven't had time to play with it.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version