2017-11-17 00:55:45

I've been messing around with ChoiceScript, the engine you use to make a choiceofgames type game, and its really simple to get into. I am making a sort of road trip game on it, something simpler to help me get into it, but I had an idea about what to do after that. It's actually a project I started on, then scrapped because I realized the way I was doing things was shitty. The story goes you've recently lost your vision, and you have to try to do certain things. You have three senses you can train, hearing, smell and tactile, which help you more easily do things. Because you are recently blinded, you tend to dip towards depression, so you need to balance your mood, or when your character gets too low, he'll commit suicide. I had the part in the apartment done, and the floor where he lived on and started with the elevator, that stuff taught me a bit about how things work in ChoiceScript, but I realized I could do it better, and I'm not a fixer, I'm a scrapper, so I scrapped it, but I want to return to it at some point. The ChoiceScript engine is free to download, and you can host your own game on your own server with that. You can test local copies of your games on your machine if you have firefox installed, it will not work with Chrome, don't know about edge/ IE / any others, I hate any browser that isn't Chrome.

Anyway, it isn't hard to delve in at all, and the syntax is really easy to follow, it does use indents for tracking code blocks similar to how python does, so you do need to be wary of that, indent too far, or not enough and you'll get errors.

A startup file and one scene might look something like this

========startup.txt========
*title My Game
*author ironcross32
*scene_list
  startup
  chapter1
*create name "player"

========scene1.txt========
*label getinfo
Hey friend! Welcome to this game, before we can get started, just pop your name in the box and hit the Next button.
*input_text name
OK, fella, your name is $!{name}, did I get that right?
*choice
  #Yeah, that's right
    *goto start
  #Nah, that ain't it!
    *goto getinfo
*comment the choice above asks the player if they entered their name correctly, if they choose yes, we jump to the start of the game, if no, we start over from the beginning.
*label start
*comment this is where the game actually begins
*page_break
So, $!{name}, you're sitting on the couch watching TV, what do you wanna do now?
*fake_choice
  #Keep watching TV
    Yeah that could be good, but don't you wanna do something else?
  #Get your fat ass up and get some junk food to make you more fat
    Hmm, you got some chips in the cupboard, mmmm yeah, nothing like watching TV and scarfing down some tadie chips!
  #Take a nap
    God, don't you ever do anything, fine... You lay your bulgy buns down, which flop over the side of the couch, and fall fast asleep.
OK, after that thrilling bit of activity, wanna do something else?
*choice
  #Yeah, let me do something else
    *goto start
  #Nah, I don't really feel like it
    *ending





OK, so all the commands are preceded by an asterisk, like *choice. The hash mark symbol indicates one of the options in that choice. So the choice is at indent level 0, no indent, the options are at the first indent level, and the code for those options is one further. They don't care whether you use spaces or tabs as long as you keep it consistent, you can't jump more than 1 level in or out at a time or it'll throw a fit. In the startup file, *title and *author are self explanatory. *scene_list is where every scene in the game goes, including startup. Each item is indented one level and on the next line, *create creates a permanent variable and initializes it to some value that you'll probably change at some point, but its initialized just the same. The difference between *choice and *fake_choice is *fake_choice doesn't accept code in it, only text. *label is a reference which is used by *goto to jump around the scene. *page_break ends the screen, giving you a next button, so whatever follows that is on another screen. *comment just like comments in other language, lets the author make notes to himself or anyone who might be collaborating with them. The funky braces and exclamation mark around the name variable does two things, whenever you see ${varname}, that indicates you want to display the contents of that variable in that position in the text. If there's an exclamation point between the $ and the left brace, it means capitalize the first letter no matter how it was input, so names always show up correct, two exclamations would capitalize the entire contents of the string. Displaying variables with numeric values, such as integers and floats can be done in that same way, though of course you can't use the exclamation to capitalize them. *ending just gives a final set of options to play again, rate it, etc. etc. etc.

Anyway, yeah, this was a longwinded post, but ChoiceScript is really really easy to dig into. It doesn't really feel like coding. You do have access to stuff like conditionals, it would work like this:
*if (lives_left <1)
  *goto_scene death

There's a lot of information available on the wiki, tutorials as well as reference material on all the commands, its pretty fun to write for too.

Facts with Tom MacDonald, Adam Calhoun, and Dax
End racism
End division
Become united

2017-11-17 04:21:11

I was wondering if choicescript is powerful enough to build an open world?

I've always been interested in open worlds, most of them for us unfortunately are muds.

2017-11-17 16:59:45

You could, I think, create several aspects that, if done well, would project the illusion of an open world game, but its not designed for that, and you would have to do a lot more work in creating variables for first time through a place, etc. and have a bunch of labels in each scene for that to work.

Facts with Tom MacDonald, Adam Calhoun, and Dax
End racism
End division
Become united

2017-11-18 02:56:27

How can I turn my .txt file into an html file so I can open my game with my choices in my Firefox browser?

Feel free to follow me on Twitter @thecoolgamer4 and subscribe to my Youtube channel

2017-11-18 10:42:58

You don't have to, there's an html file in /web that you run, that loads up the text files and all that jazz. You can work on the game, and then when you make changes and save, you just refresh the browser and it loads up a fresh copy.

Facts with Tom MacDonald, Adam Calhoun, and Dax
End racism
End division
Become united

2017-11-18 20:53:45

I have been writing in choice script for over 5 months now and it is really easy and fun to get into. I went with a more mainstream esk type of plot though, but in the below blog post I talk about some software and some tips and tricks.

https://blindjournalist.wordpress.com/2 … aby-steps/

Journalist and gamer

2017-11-19 02:13:57

I use notepad++ for doing the coding, I have auto indent off, it drives me nuts because I always am losing track of the position, so I do the indents myself. The syntax is really easy I've found, and aside from a couple little oddities, I like it.

Facts with Tom MacDonald, Adam Calhoun, and Dax
End racism
End division
Become united