RanvierMUD / ranviermud

A node.js based MUD game engine
https://ranviermud.com
MIT License
796 stars 247 forks source link

Using Visual Studio code launch.json outputs strangely to connected clients #128

Closed jjwilliams42 closed 7 years ago

jjwilliams42 commented 7 years ago

Setup:

Visual studio code with this launch.json config:

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "node",
            "request": "launch",
            "name": "Launch Program",
            "program": "${workspaceRoot}\\ranvier",
            "args": ["-v", "--respawn=1"],
            "cwd": "${workspaceRoot}"
        },
        {
            "type": "node",
            "request": "attach",
            "name": "Attach to Process",
            "port": 5858
        }
    ]
}

Hit play, login with some client (I'm currently using ZMUD, but have also tested with telnet). Output:

RanvierMUD Codebase - Version 0.4.1 Shawn Biddle - Sean O'Donohue

                         _
                        (_)
    _ __ __ _ _ ____   ___  ___ _ __
   | '__/ _` | '_ \ \ / / |/ _ \ '__|    . ' .
   | |   (_| | | | \ V /| |  __/ |   . '       ' .
   |_|  \__,_|_| |_|\_/ |_|\___|_|  |     _ __    |
                                    |    | '__|   |
   Barebones Node.js-based codebase |    | |      |
   github.com/shawncplus/ranviermud |    |_|      |
                                     ' .       . '
                                         ' . 'Welcome, what is your name?
| [1]| Login As:| [2]| | [3]|
`-> 2
[Item] A wooden chest rests open in the corner, its hinges badly rusted.[![Exits
[ 100/100 hp -- 200/200 energy
jjwilliams42 commented 7 years ago

I realize this isn't top priority, just wanted to log it for future reference.

jjwilliams42 commented 7 years ago

When running from regular terminal: node ./ranvier -v

RanvierMUD Codebase - Version 0.4.1 Shawn Biddle - Sean O'Donohue

                         _
                        (_)
    _ __ __ _ _ ____   ___  ___ _ __
   | '__/ _` | '_ \ \ / / |/ _ \ '__|    . ' .
   | |   (_| | | | \ V /| |  __/ |   . '       ' .
   |_|  \__,_|_| |_|\_/ |_|\___|_|  |     _ __    |
                                    |    | '__|   |
   Barebones Node.js-based codebase |    | |      |
   github.com/shawncplus/ranviermud |    |_|      |
                                     ' .       . '
                                         ' . '

Welcome, what is your name? 

Looks awesome, colors come through great (greens / greys). The VS Code version all text is green.

jjwilliams42 commented 7 years ago

Figured it out, you must launch into an external console, instead of VS codes internal debug console (I had no idea this was somehow linked to what the client saw). So you were right @seanohue. Add this to launch.json:

"console": "externalTerminal"

shawncplus commented 7 years ago

Looks like it was VS Code, closing issue

seanohue commented 7 years ago

Nice find, might want to add that to the documentation or README somewhere?

jjwilliams42 commented 7 years ago

Yep I'll add it. What is your preferred PR method? Fork and do PR I'm guessing?

seanohue commented 7 years ago

We don't have a fleshed out CONTRIBUTING.md yet but that's how I go about it.