• How do I implement ^A codes when Door is using IO redicrection?

    From Xucaen@VERT/TIMEPORT to All on Thu Nov 26 02:46:23 2015
    I want to implement some color codes in my little door game. I tried using ANSI codes but they don't show up when running from Synchronet (I am using IO redirection and telnetting in using SyncTerm). So now I want to try using the Control-A codes for color.

    First off, I don't know if I am entering them correctly. For example, I defined red like this:

    const std::string red = "^AR";


    so, for example, when I display something I would do:

    cout << red << "this is a test" << endl;


    but I'm not seeing red in the output.

    How do I get color to be displayed when running the game as a door in Synchronet using IO redirection?

    Thanks!

    ---
    ■ Synchronet ■ The Time Portal - timeport.synchro.net:2112 - Celebrating the past from the futu
  • From Digital Man@VERT to Xucaen on Thu Nov 26 01:38:50 2015
    Re: How do I implement ^A codes when Door is using IO redicrection?
    By: Xucaen to All on Wed Nov 25 2015 09:46 pm

    I want to implement some color codes in my little door game. I tried using ANSI codes but they don't show up when running from Synchronet (I am using IO redirection and telnetting in using SyncTerm).

    Then you weren't sending proper ANSI escape sequences.

    So now I want to try using the Control-A codes for color.

    That won't work unless you have something converting them to ANSI escape sequences (e.g. a door kit, like XSDK).

    First off, I don't know if I am entering them correctly. For example, I defined red like this:

    const std::string red = "^AR";


    so, for example, when I display something I would do:

    cout << red << "this is a test" << endl;

    That would three characters to the remote terminal, '^', 'A', and 'R'.

    but I'm not seeing red in the output.

    I would be surprised if you did. :-)

    How do I get color to be displayed when running the game as a door in Synchronet using IO redirection?

    Send ANSI escape sequences or use a door development kit (e.g. Synchronet's XSDK has a Ctrl-A code to ANSI expansion ability).

    The one exception is that Synchronet supports the conversion of WWIV color codes (prefixed with an ASCII 3 character), optionally, but I wouldn't recommend that as they are very limited in ability.

    digital man

    Synchronet "Real Fact" #25:
    The Synchronet Web Server was written predominantly by Stephen Hurd (Deuce). Norco, CA WX: 49.6°F, 68.0% humidity, 0 mph E wind, 0.00 inches rain/24hrs

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ telnet://vert.synchro.net
  • From Xucaen@VERT/TIMEPORT to Digital Man on Sat Nov 28 00:31:48 2015
    Re: How do I implement ^A codes when Door is using IO redicrection?
    By: Digital Man to Xucaen on Wed Nov 25 2015 08:38 pm

    Re: How do I implement ^A codes when Door is using IO redicrection?
    By: Xucaen to All on Wed Nov 25 2015 09:46 pm

    I want to implement some color codes in my little door game. I tried
    using ANSI codes but they don't show up when running from Synchronet (I
    am using IO redirection and telnetting in using SyncTerm).

    Then you weren't sending proper ANSI escape sequences.


    Forgive me for replying to messages out of order. I've been bouncing between the web interface, Multimail, Bluewave, and the actual bbs telnet. At some point I need to just settle on one and stick with it. ;-)


    You are correct - I wasn't sending ansi codes. I was checking the comm type and if it was 0, I was using stdout and not sending ansi codes.

    But I have it all worked out now, I didn't want to leav you hanging. :)

    Take care and thanks for the help!

    ... "To live between a rock and a hard place, in between time"

    ---
    ■ Synchronet ■ The Time Portal - timeport.synchro.net:2112 - Celebrating the past from the futu