How to start making a new game from scratch?


#1

I have absolutely no experience in coding at all. So please think of that when I ask this question because it’s going to look incredibly stupid. These choice games are incredibly fun to do so I wanted to try making one myself. I’ve looked over the commands and techniques and I seem to understand it, except my biggest difficulty so far is… actually starting the game.

Whenever I try to substitute my own words over the startup.txt page I always get flagged for an error. I know that indentation is important, and I’ve been keeping it consistent. I really don’t know what I’m doing wrong, and I’m pretty sure it’s just a simple mistake that I’m making that’s preventing me from going any further. -_-

So my question is, how do you start a game completely from scratch? What do you have to put in for the first scene so that there aren’t any script errors? I know that it’s probably a broad question, and I can specify if you need to. I’d really appreciate if you could help. Or, if there’s another thread that answers my question if you could direct me to it. Thanks!


#2

I take it you’ve read over everything on choiceofgames.com

Have you also looked at the wiki? http://choicescriptdev.wikia.com/wiki/A_Basic_Tutorial

Have you looked at the code of other games to see how they do things?

And I’d suggest using a text editor, like Notepad++ because it really makes the indentations a lot easier to keep track of.

What error are you getting?


#3

I’m looking at the wiki right now, and it’s extremely helpful! A lot of the errors that I used to get have since disappeared and I’ve fixed them.

I haven’t looked at the code of other games, only the sample game. Where can you see them?

An example of an error I would get is: It is illegal to fall out of a *choice statement. I’m still not sure what it means.


#4

Congrats on fixing your own errors.

The illegal to fall out statement means that every section of a *choice statement needs a *goto or a *finish after it.

So the following won’t work and will give the illegal statement

*choice
    #Choice 1
        Text
    #Choice 2
        Text

And this will

*choice
    #Choice 1
        Text
        *go choice1
    #Choice 2
        Text
        *goto choice2

Make sense?

You can see the code for most of the games on the website. I generally suggest having a look at Dragon, since it’s a nice and simple game.

You’ll find the files for Dragon at https://www.choiceofgames.com/dragon/scenes/ Ignore the .json and .js files in the folder since you don’t need to worry about those and just look at the .txt ones. I’d suggest starting at https://www.choiceofgames.com/dragon/scenes/startup.txt and then using the scenes list to tell you the order of the files to go to next (so https://www.choiceofgames.com/dragon/scenes/lair.txt next.)

If it doesn’t make any sense to you and doesn’t help though, don’t worry. I just found that looking at other games and seeing everything in actual effect worked best for me and helping me learn.

[Tool] ChoiceScript Development Environment is really useful too.


#5

Ah, that makes more sense. Thank you for your help. I think I have a better understanding of choice script now, especially the startup.txt which is what I was having the most issues with. The wiki cleared up a lot of things I was having trouble with.