
*comment NEW TO CHOICESCRIPT? CLICK 'Run this project' TO START TUTORIAL

[b]Lesson #1[/b] - [b][i]Projects & Scene Files[/i][/b]

When you [i]'Create a new project'[/i] (using the button for this purpose located at the top-left of the screen), the IDE will create the new project with the two files required by [i]every[/i] Choice Game: [i]startup[/i] and [i]choicescript_stats[/i]. A third file, [i]global[/i], will also be created for IDE-specific use.

[i][b]~~Exercise #1[/b] - Create a New Project for yourself now, and name it [b]Test Project[/b].[/i]

The two compulsory files will be explained in full later in the Tutorial. The [i]global[/i] IDE file serves a specific development purpose and is covered within the IDE's general [i]Help[/i] documentation, but is not something we need concern ourselves with at this particular stage.

[i]Note that you can sort your IDE Projects into a different order by dragging a Project's header bar using your mouse. Try that now, by dragging the new Test Project above the Tutorial.[/i]

A Choice Game may also contain any number of additional [i]Scene[/i] files. Within the IDE, you add brand new Scene files to an existing Project simply by clicking on the [b]+[/b][i]plus[/i] symbol located on that Project's header bar, and then [i]double-click[/i] the new ('Untitled') scene file to rename it. 

Unlike the compulsory files, you are free to name your actual Scene files whatever you like: it is equally common to use descriptive names such as "dungeon" as it is to use sequential names like "chapter03". Scene names must be unique and should never contain spaces (use under_scores instead if needed). Note that the actual players of your game will not themselves ever see any mention of your individual file names during the normal course of play.

[i][b]~~Exercise #2[/b] - Now add a new Scene file to [b]Test Project[/b] and then rename it [b]scene01[/b][/i].

*page_break

As you add more Scene files, space may become tight with multiple projects open, so it's worth noting that you can temporarily [i]hide[/i] (or reveal) any project's entire file list simply by double-clicking the project header bar. Go ahead and try that now, before continuing.

Scene files will contain your story narrative as well as the actual [i]scripting[/i] (also called "the code") required to turn this into a Choice Game. Although you may if you like begin your story in the [i]Startup[/i] file, it's often a good idea to use that file only for its own particular purposes (discussed in the next Lesson) and begin your actual story narrative in the first proper [i]Scene[/i] file.

While there is no hard and fast rule about how many different Scene files in total you should use for your game, as a general guideline it's not often a good idea to exceed about 2,500 lines of code and narrative in any [i]single[/i] file (or roughly 250KB in size), so just use as many different Scene files as you need to keep each one below this size. Although CS itself is in fact capable of handling much larger files than this, very large individual files may result in noticeable loading lag for some players of your game on the web, ruining their immersion in the story for no good reason.

[i][b]~~Exercise #3[/b] - Now add two more new Scene files to [b]Test Project[/b] and then rename them [b]scene02[/b] and [b]scene03[/b] respectively[/i].

The [i]global[/i] file aside, your Test Project should now comprise the five files we will use during this Tutorial in creation of an actual  working mini-game: namely [i]startup[/i], [i]choicescript_stats[/i], and three [i]scene[/i] files.

As it will not be needed for the purpose of this tutorial, for now just [i]click & drag[/i] the [b]global[/b] file to the bottom of the files list for this project. The IDE will remember the actual file order of each project from one session to the next. 

*finish Lesson #2 - [i]The Startup File[/i]









