+ Reply to Thread
Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 33

Thread: BotOS - A open project!

  1. #21
    Wire Sofaking Tasuit's Avatar
    Join Date
    Jan 2009
    Location
    Sønderjylland, Denmark
    Posts
    582
    Blog Entries
    9

    Default Re: BotOS - A open project!

    So far, yes
    Rich: Yes this is based of our roleplay on the server, so you can build different things with the modules, but on build it would just be spawning.

    Creator of the Unofficial servers

  2. #22
    Wire Sofaking BlackholeWM's Avatar
    Join Date
    Dec 2008
    Posts
    805

    Default Re: BotOS - A open project!

    Could you add thrust outputs to the bot, and could you modify the variables to control them?

    If you did this:

    Code:
    name BotOS Build 0002
    @inputs IOBus:vector GBus:wirelink
    @outputs Bus1 ForwardThrust LeftThrust RightThrust
    @persist A B C D
    @trigger all
    runOnTick(1)
    #runOnTick(1) is always useful.
    #Basic Data Allocation for screen#
    # GBus = Screen
    # IOBus = First Module
    # Bus1 = IOBus Output
    ######################
    GBus:writeCell(2042,9)
    GBus:writeString("Build 0001",20,0)
    ######################
    ######################
    #Here comes the first subroutine#
    if (IOBus:w()) {SetVariableProgram=1}
    if (SetVariableProgram) {
        GBus:writeString("Writing Thrust Variables",0,1)
        A = IOBus:x()
        B = IOBus:y()
        C = IOBus:z()
        if (IOBus:w() == 1 & SetVariableProgram == 1) {Bus1=1, GBus:writeString("Done, Waiting for Respond",0,2)}
        if (Bus1==1 & IOBus:w() ==0 ) {SetVariableProgram=0, GBus:writeCell(2041,1), Bus = 0}
    }
    ForwardThrust = A
    LeftThrust = B
    RightThrust = C
    Then a dance module could be:

    Code:
    name BotOS Dance Module
    @inputs Bus1 Active
    @outputs IOBus:vector
    @persist Time
    @trigger all
    interval(1000)
    if(Active & clk()) {
    Time += 1
    if(Time == 1) {
    IOBus = vec4(1,1,-1,1)
    }
    if(Time == 2 & Bus1) {
    IOBus = vec4(-1,-1,1,1)
    }
    if(Time > 2 & Bus1) {
    Time = 1
    }
    }
    else{ IOBus = vec4()
    Time = 0 }
    Or something similar.

    I know the main chip's thrust outputs could simply constantly update to match the input but as you said this will be customizable, and maybe people will have a need for the more complex method.

  3. #23
    Wire Sofaking BlackholeWM's Avatar
    Join Date
    Dec 2008
    Posts
    805

    Default Re: BotOS - A open project!

    Has this been dumped already?

  4. #24
    Wire Sofaking Tasuit's Avatar
    Join Date
    Jan 2009
    Location
    Sønderjylland, Denmark
    Posts
    582
    Blog Entries
    9

    Default Re: BotOS - A open project!

    This has not been dumped, but as i mentioned in the first post i was going to sweden for a week, and i am now back to work..

    Creator of the Unofficial servers

  5. #25
    Wire Sofaking Asphid's Avatar
    Join Date
    Oct 2008
    Location
    In a house.
    Posts
    1,023

    Default Re: BotOS - A open project!

    Every time I see this thread, I get a little freaked out. My last name is Botos. It's Hungarian =D
    <Anticept>Will sex for food.
    <Beer>peanus, I like that
    <nath2008uk>I must play with black peanus
    <Jat Goodwin>i like the underage one
    <Black Phoenix>He's a good pedo

  6. #26
    Wire Sofaking Tasuit's Avatar
    Join Date
    Jan 2009
    Location
    Sønderjylland, Denmark
    Posts
    582
    Blog Entries
    9

    Default Re: BotOS - A open project!

    Oh shit, what a coincidence!.
    Well, i have been thinking about changing the name
    But let me just finnish it first ^^

    Creator of the Unofficial servers

  7. #27
    Wirererer Eirath245's Avatar
    Join Date
    Feb 2008
    Location
    England
    Posts
    208

    Default Re: BotOS - A open project!

    An alternative (and possibly less confusing) way of emulating subroutines would be to have a single string variable "Current Subroutine".

    This way, instead of being

    Code:
    if(something){somesubroutine = 1}
    else {anothersubroutine = 1}
    
    if(somesubroutine) {dosomething}
    if(anothersubroutine = 1) {dosomethingelse}
    You could do:

    Code:
    if(something) {CurrentSubroutine = "Something"}
    else {Current Subroutine = "SomethingElse"}
    
    if(CurrentSubroutine = "Something") {DoSomething}
    if(CurrentSubroutine = "SomethingElse") {DoSomethingElse}
    Which (at least to me) is less confusing, and prevents you being overwhelmed with variables.

    You could also use it to debug, by simply saying:

    Code:
    #debugging subroutine
    GBus:writeString("CurSubroutine: " + CurrentSubroutine,?,?)
    Writing the current subroutine being executed onto the screen.
    Last edited by Eirath245; 07-07-2009 at 05:35 AM.

  8. #28
    Wire Sofaking Tasuit's Avatar
    Join Date
    Jan 2009
    Location
    Sønderjylland, Denmark
    Posts
    582
    Blog Entries
    9

    Default Re: BotOS - A open project!

    What your doing is flipswitch variables, they seem a little less confused.
    I will try and implent the string idea, but the current subrotuin method is the easiest in my opinion

    Creator of the Unofficial servers

  9. #29
    Lifetime Supporter rich_27's Avatar
    Join Date
    Aug 2007
    Location
    findByUser("rich_27"):pos()
    Posts
    224

    Default Re: BotOS - A open project!

    Why not just use:
    if(Something){SRout=1}
    elseif(SomethingElse){SRout=2}
    else{SRout=3}

    if(SRout==2){code}

    etc...
    Then you wouldn't have to bother with strings.

  10. #30
    Wire Sofaking Tasuit's Avatar
    Join Date
    Jan 2009
    Location
    Sønderjylland, Denmark
    Posts
    582
    Blog Entries
    9

    Default Re: BotOS - A open project!

    Rich, Because with strings we can debug it much easier

    Creator of the Unofficial servers

+ Reply to Thread
Page 3 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. Olympus Technologies open testing
    By Lyinginbedmon in forum Installation and Malfunctions Support
    Replies: 75
    Last Post: 02-19-2010, 04:12 AM
  2. Replies: 2
    Last Post: 03-29-2009, 11:14 AM
  3. Easiest way to make a Fort with Buttons to open door on both sides
    By Kamrua in forum Installation and Malfunctions Support
    Replies: 21
    Last Post: 01-02-2009, 10:17 AM
  4. Replies: 3
    Last Post: 08-23-2008, 07:13 PM
  5. SVN: Error: Can't Open 'C:/WINNIT/TEMP/report.tmp' Access denied.
    By turck3 in forum Installation and Malfunctions Support
    Replies: 1
    Last Post: 07-26-2007, 03:57 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots