• Multi-node games with OpenDoors

    From Nightfox to All on Sat Feb 26 19:12:54 2011
    Hi all -

    Lately I've been casually working on a door game written in C++ using OpenDoors, and I'm wondering if OpenDoors provides any functions to help with multi-node playability, such as exchanging data between instances of the program running on multiple nodes? I was looking for this in the documentation for OpenDoors, but the only thing it talks about regarding multi-node doors is concurrent file access.

    If not, I suppose I could probably come up with a way, but I have a feeling it might be a little klunky if OpenDoors doesn't provide an easier way to do it.

    Nightfox
  • From John Guillory@VERT/MAINLINE to Nightfox on Sun Feb 27 21:50:50 2011
    Re: Multi-node games with OpenDoors
    By: Nightfox to All on Sat Feb 26 2011 07:12 pm

    OpenDoors, and I'm wondering if OpenDoors provides any functions to help with multi-node playability, such as exchanging data between instances of the program running on multiple nodes? I was looking for this in the documentation for OpenDoors, but the only thing it talks about regarding multi-node doors is concurrent file access.
    OpenDoors probides access to the communication between the user and your
    program and provides a convient way to send data to both the local screen
    and the remote screen at the same time, the storage and other aspects of
    the door are up to you. What you will need to do is either create 1 data
    file for all nodes, use file sharing to open the file. Define a standard
    record for each node. When a node goes in the door, it seeks to that position and writes its information there. Eg.

    TYPE NodeRec = RECORD
    UserName : String[50];
    Action : String[50];
    Message : String[50];
    Online : Boolean;
    END;

    Then, to send a message to say node # 3, you'd open the file, seek to record #3, read the record into a variable. Change Message to the message you want to send the user and then seek back to record #3, write the record out. In your game, when your user is waiting at a menu and not doing anything else, check for message being not '' and if it's not '', then you output the message to the user and reset the message to '' and re-write it back to the file... Again, using file sharing....



    ---
    ■ Synchronet ■ Roach Guts - roachguts.com
  • From Nightfox to John Guillory on Sun Feb 27 22:42:54 2011
    Re: Multi-node games with OpenDoors
    By: John Guillory to Nightfox on Sun Feb 27 2011 21:50:50

    the door are up to you. What you will need to do is either create 1 data
    file for all nodes, use file sharing to open the file. Define a standard
    record for each node. When a node goes in the door, it seeks to that position and writes its information there. Eg.

    TYPE NodeRec = RECORD
    UserName : String[50];
    Action : String[50];
    Message : String[50];
    Online : Boolean;
    END;

    Then, to send a message to say node # 3, you'd open the file, seek to record #3, read the record into a variable. Change Message to the message you want send the user and then seek back to record #3, write the record out. In you game, when your user is waiting at a menu and not doing anything else, check for message being not '' and if it's not '', then you output the message to

    Thanks for your reply. This should get me pointed in a direction to go for inter-node interaction.

    Nightfox
  • From Digital Man@VERT to Nightfox on Mon Feb 28 15:47:33 2011
    Re: Multi-node games with OpenDoors
    By: Nightfox to All on Sat Feb 26 2011 07:12 pm

    Hi all -

    Lately I've been casually working on a door game written in C++ using OpenDoors, and I'm wondering if OpenDoors provides any functions to help with multi-node playability, such as exchanging data between instances of the program running on multiple nodes? I was looking for this in the documentation for OpenDoors, but the only thing it talks about regarding multi-node doors is concurrent file access.

    I don't recall OpenDoors including any functions to facilitate sharing data between nodes.

    digital man

    Snapple "Real Fact" #161:
    The first TV network kids show in the U.S. was "Captain Kangaroo."

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ telnet://vert.synchro.net
  • From Nightfox to Digital Man on Mon Feb 28 17:05:39 2011
    Re: Multi-node games with OpenDoors
    By: Digital Man to Nightfox on Mon Feb 28 2011 15:47:33

    I don't recall OpenDoors including any functions to facilitate sharing data between nodes.

    Thanks for the reply.
  • From Tracker1@VERT/TRN to Nightfox on Mon Mar 21 00:59:15 2011
    On 2/26/2011 8:12 PM, Nightfox wrote:
    Lately I've been casually working on a door game written in C++ using OpenDoors, and I'm wondering if OpenDoors provides any functions to help with multi-node playability, such as exchanging data between instances of the program running on multiple nodes? I was looking for this in the documentation
    for OpenDoors, but the only thing it talks about regarding multi-node doors is
    concurrent file access.

    If not, I suppose I could probably come up with a way, but I have a feeling it
    might be a little klunky if OpenDoors doesn't provide an easier way to do it.

    Fastest solution is to probably use sqlite (having a queue table for each node)... it will serialize a lot of the data between nodes, if you aren't doing anything too big, the simpler solution is probably greater than the chance of a performance impact... (on less than 20 simultaneous users at least, which most bbses won't see).

    You could also look at Firebird embedded, which would allow for scale to a separate (out of proc) dbms server.

    --
    Michael J. Ryan - http://tracker1.info/

    ---
    ■ Synchronet ■ Roughneck BBS - telnet://roughneckbbs.com - www.roughneckbbs.com
  • From Nightfox to Tracker1 on Mon Mar 21 07:51:08 2011
    Re: Re: Multi-node games with OpenDoors
    By: Tracker1 to Nightfox on Mon Mar 21 2011 00:59:15

    Fastest solution is to probably use sqlite (having a queue table for each node)... it will serialize a lot of the data between nodes, if you aren't

    That's an interesting idea.. Not sure that I'd want to require database software for a BBS door game though..

    Nightfox
  • From Tracker1@VERT/TRN to Nightfox on Tue Mar 29 15:36:10 2011
    On 3/21/2011 7:51 AM, Nightfox wrote:
    Fastest solution is to probably use sqlite (having a queue table for each
    node)... it will serialize a lot of the data between nodes, if you aren't

    That's an interesting idea.. Not sure that I'd want to require database software for a BBS door game though..

    Just a .dll/.so file for sqlite etc... not really an entire software as such. If you're storing more than 4 files for your data, than a light db would probably work out better in terms of being able to maintain... not to mention better portability to/from versions and other applications.

    --
    Michael J. Ryan - http://tracker1.info/

    ---
    ■ Synchronet ■ Roughneck BBS - telnet://roughneckbbs.com - www.roughneckbbs.com