Writing a CoG game on Linux

Hi!
I’m thinking about doing a side project with choice script. Alas, I hate windows and don’t have a mac. Has any of you used choice script on Linux? I tried searching the forum, ended up installing vs with choice script extention, but it doesn’t seem to work as expected.

Node.js can be downloaded for Linux, so you should be able to run choicescript. The only thing you absolutely need to code is a text editor, and you should have a selection of those as well.

2 Likes

Don’t I need the Choice Script source code too? There’s this bit in introduction to choice script:

Next, download the ChoiceScript source from GitHub. It’s a zip file, a “compressed folder” with all of its files smooshed together into a single file.

You’ll need to extract the entire zip file. Note that, on Windows, if you double click on a zip file, it will open the compressed folder, making it look like a regular folder. You’ll need to click the “Extract” button and then “Extract All” to use ChoiceScript.

Once you’ve extracted the zip file, you’ll need to launch the ChoiceScript server.

    Windows: Double-click on run-server.bat. Windows hides the part of the file name after the dot, so run-server.bat looks like run-server.
        The first time you run it, Windows will pop up the Windows Defender SmartScreen (“Windows protected your PC”). Click “More Info” and then “Run anyway.”
    Mac: Double-click on serve.command.
        The first time you run serve.command on a Mac, double-clicking won’t work. (“Apple could not verify ‘serve.command’ is free of malware that may harm your Mac or compromise your privacy.”) Go to System Settings and search for “Gatekeeper.” On that settings page, it will say, “‘serve.command’ was blocked to protect your Mac.” There’s a button there, “Open Anyway.” From then on, double-clicking will work.

Obviously, but I assumed you have it already if you’re trying to run it in the first place.

Technically you don’t need it to write, only to run the game you’ve written. (It’s just txt files. I’ve written a game on my phone. Wouldn’t recommend that one, but that’s beside the point.)

In which way didn’t the VSCode extension work as expected?

4 Likes

Honestly, the vscode extension is all you need. It works like a charm for me, so I don’t know your problem with it.
The only thing I use a VM with Windows is to do randomtest in 100k or bigger batches x 5 or 6 at a time to do it quicker, but it is not needed at all.

2 Likes

But the point is you shouldn’t need VM with Windows from what I see. Node should work on Linux natively.

2 Likes

So how do you run randomtest.bat on Linux?

Take the actual command from it and use commandline. Or convert it to a shell script, whichever.

2 Likes

Holy s$*# it works :open_mouth: Does that mean I can ditch Windows forever now? :face_holding_back_tears:

1 Like

I don’t believe in writing IF without testing so I’d say I need the ability to run the game badly :wink:
I have Choice Script downloaded, can’t exactly run it, because it’s made for windows and mac, I guess I’m asking about that then; I hoped I wouldn’t have to run it if I had VS with the extension, but the extension doesn’t seem to recognize the syntax; I paste the sample code and nothing is highlighted.

As demonstrated above, it is not done for Windows and Mac. It is done for Node, which also runs on Linux. The commandline scripts are made only for Windows and Mac, but you can take the commands from them and put them on commandline (or a shell script) yourself.

Ok, now I get it, thanks!