Blog

Feb 22

2018

The Fielder’s Choice — Pitch your way to the top of the major leagues!

Posted by: Rachel E. Towers | Comments (1)

We’re proud to announce that The Fielder’s Choice, the latest in our popular “Choice of Games” line of multiple-choice interactive-fiction games, is now available for Steam, iOS, and Android. It’s 25% off until March 1st!

Grab a glove and pitch your way to the top of the major leagues! Baseball season is back and you’re on the mound. Starting your career as a rookie pitcher, you’ll develop your repertoire and navigate clubhouse politics in the big leagues. Over eight seasons, you’ll use your talent and charisma to win on—and off—the field.

The Fielder’s Choice is a 115,000-word interactive baseball novel by Nathaniel Edwards. It’s entirely text-based—without graphics or sound effects—and fueled by the vast, unstoppable power of your imagination.

Your talented arm will take you places you’ve never seen, and introduce you to some of the most driven athletes on the planet. Do you have the massive dedication to succeed in the big leagues, or will you resort to a little bit of cheating? Will you be baseball’s biggest stat geek or the master of hustle and grit? Will you develop an on-field persona that terrifies hitters or a cuddly exterior that lulls them to sleep? Will you go down in history as a Hall of Fame ace or a live arm that fizzled on the big stage? When your lifelong baseball dreams come true, someone else may have to lose everything they’ve ever worked toward.

• Play as male, female, or non-binary; gay or straight
• Play as left- or right-handed
• Choose your pitching style and develop the perfect repertoire to rack up strikeouts
• Perfect a fastball, slider, or curveball
• Find friends, foes, or potential lifelong partners among your teammates
• Pitch in the United States, Japan, or unlock the opportunity to explore a new frontier for baseball
• Use statistical analysis to perfect your game, or #RiseAndGrind to out-hustle your opponents
• Discover the quirky secret behind baseball’s most successful agent

What pitch will you throw when the game is on the line? In that moment, it’s the Fielder’s Choice.

We hope you enjoy playing The Fielder’s Choice. We encourage you to tell your friends about it, and recommend the game on StumbleUpon, Facebook, Twitter, and other sites. Don’t forget: our initial download rate determines our ranking on the App Store. The more times you download in the first week, the better our games will rank.

Feb 20

2018

Author Interview: Nathaniel Edwards, “The Fielder’s Choice”

Posted by: Mary Duffy | Comments (0)

Grab a glove and pitch your way to the top of the major leagues! Baseball season is back and you’re on the mound. Starting your career as a rookie pitcher, you’ll develop your repertoire and navigate clubhouse politics in the big leagues. Over eight seasons, you’ll use your talent and charisma to win on–and off–the field.

The Fielder’s Choice is a 115,000-word interactive baseball novel, by Nathaniel Edwards. I sat down with Nate to talk about sports, interactive fiction, and his adorable history on the field. The Fielder’s Choice releases this Thursday, February 22nd. 

Tell me a little about your background with baseball. Did you play, growing up? Do you follow any teams now?

When I was a baby, my favorite pacifier had a baseball on it. Somehow or other my parents lost it one day and I would never take another pacifier after that.

I played Little League for a few years, filling the oh-so-valuable role of light-hitting corner outfielder. But really I’ve just been an Atlanta Braves fan for as long as I can remember. For a long time when I was a kid, I wouldn’t leave the house without a Braves hat on and chewing gum in my mouth (That’s gum that baseball players are chewing, right? Couldn’t be tobacco.)

What was the most challenging thing about writing this game?

I had never written anything at this kind of novel-length scale before, so keeping the story organized throughout was a new challenge for me. And then when the story is interactive and two players might get very different versions of the story, there are even more organization problems and continuity errors to worry about. I’m very thankful for the beta testers and editors who are able to catch when I’ve, say, introduced the same character twice, or written that a character threw the ball all the way from first base to…first base again.

How did you find ChoiceScript was for meeting the needs of your fairly complex pitching sim?

I got along very well with ChoiceScript. I got used to it quicker than other IF languages like Inform or Twine. I like a language where I can learn every tool that’s available to me so I can then know how to be creative with the code without constantly worrying that I’m missing out on a function that would make everything ten times easier, and wasting my time looking things up. And thankfully no sport has better statistical information than baseball, so it’s easy to implement realistic odds for everything that happens on the field.

This is really only the second sports game Choice of Games has done, the other being Slammed, about wrestling. What made you want to create a piece of interactive fiction slash pitching sim?

The first things I ever programmed were little choose-your-own-adventures for my TI-83 calculator in middle school. The most complicated thing I made was a soccer management “sim,” so you could say I’ve been making sports-themed interactive fiction games since I was fourteen.

Baseball is my favorite sport, so I knew I wouldn’t get sick of writing and thinking about it for the year it took to put this game together. And there’s been a recent trend of putting strong story modes in sports simulation games like Madden and FIFA, though a modern baseball game hasn’t pulled that off yet. If you don’t mind going back a few console generations, MLB Power Pros has a cartoonish and silly but mechanics-rich story mode that was an inspiration for this game. And on the off-chance you can speak Japanese, that series is still going as Jikkyou Powerful Pro Yakyuu, though it hasn’t been localized to English since 2008. I don’t speak enough Japanese to dig into the story modes very far, but I import those games whenever a new one comes, they’re excellent.

What are you working on next?

Well I’ve got a chicken sandwich sitting next to me I’d like to work on as soon as I’m done writing this answer, but I’d love to write something for IFComp this year. And I have more ideas for Choice of Games if you’ll still have me after that chicken sandwich joke.

Short answer, Bernard Pivot Style Questionnaire

Favorite word.

Gli (one of the Italian words for “the,” pronounced like “lyee”)

Favorite color.

#E32636 Alizarin Crimson

Profession other than your own you would like to attempt?

Seaplane pilot.

Profession you would never want to attempt?

Call center worker.

Can you explain the infield fly rule?

This is a tender subject for Braves fans, I’m afraid. Basically if there are runners on first and second (or the bases are loaded) then any fly ball that should easily be caught by an infielder is automatically an out, whether anybody caught the ball or not. This rule exists because otherwise the defense could easily turn a double or triple play on this kind of fly ball, because the runners don’t know until the ball is caught whether they need to be at their base or at the next base to be safe. So the defense could intentionally drop it and throw them out.

Unfortunately for the Braves, the rule came into effect in an exceptional situation where it benefits the defense instead of the offense. The shortstop accidentally didn’t catch a fly ball way out in left field, so the runners all advanced and the batter was safe. Except, the umpires decided he should have easily caught it, so that’s an infield fly and the batter is out. And this was in a decisive moment in a winner-take-all playoff game. So the fans did the logical thing and threw a bunch of garbage on the field to make their displeasure known. Ah, memories.

The infield fly rule is tricky and complicated for sure, like trigonometry. But the balk rule is like quantum physics.

Feb 09

2018

New Hosted Game! The Great Tournament 2 by Philip Kempton

Posted by: Rachel E. Towers | Comments (6)

Hosted Games has a new game for you to play!

In this sequel to The Great Tournament, continue your quest to defend the kingdom of Magincia. Play as a Knight, Lord, or Prince in this medieval fantasy where every choice you make affects the story. Lead armies in battle against powerful foes or use diplomacy to resolve conflicts. It’s 25% off until February 16th!

The Great Tournament 2 is a 300,000 word interactive low fantasy novel by Philip Kempton, where your choices control the story. It’s entirely text-based—without graphics or sound effects—and fueled by the vast, unstoppable power of your imagination.

• Character generation and random events ensures no one game is the same.
• Play as a devoted knight, honorable lord, or ruthless tyrant.
• Multiple storylines with over a dozen different endings.
• Use diplomacy or war to resolve global conflicts.
• Raise and train an army to defend the kingdom.
• Conqueror territories and expand your kingdom.
• Manage village and kingdom finances.
• Fight waves of barbarian armies in Survival Mode.

Philip Kempton developed this game using ChoiceScript, a simple programming language for writing multiple-choice interactive novels like these. Writing games with ChoiceScript is easy and fun, even for authors with no programming experience. Write your own game and Hosted Games will publish it for you, giving you a share of the revenue your game produces.

Feb 02

2018

Choice of Games Contest for Interactive Novels: Submissions Closed

Posted by: Mary Duffy | Comments (1)

The Choice of Games Contest for Interactive Novels submission deadline has come and gone! We want to thank everyone for participating. We received 25 entries, which is a wonderful result for our first contest.  Here is the official list of entries:

180 Files: The Aegis Project
A Scoundrel’s Choice
Critical Mass: The Black Vein
Critical Mass: The Bridge
Dragon Racer
Gladiator: Road to the Colosseum
Isolation: Deep Dive
Missing Wings
Night Shift
Nuclear Powered Toaster
Ouroboros Reset
Pathways
Quarterlife
Robin Hood’s Unusual Tales
Tale of Two Cranes
The Aegis Saga
The Butler Did It
The Grim and I
The Last Wizard
The Lawless Ones
The Magician’s Burden
The Trial of Souls
The Twelve Trials
WEAK
Wonders, Horrors, and Miracles

While judging will not be complete for some time, we expect to begin our first round of review next week, and we’ll have a better sense of how long it will take to judge the contest in full, in a few weeks’ time. We are a small staff, and have a limited amount of time for publishing games, keeping the lights on, and reading contest entries, but after our initial review we will have a better sense of how long it will be before we can announce the winners.

Once again, congratulations to all the entrants. Writing a full game in ChoiceScript is a stunning achievement, and we hope you will find a way to celebrate this weekend.

Feb 01

2018

New Hosted Game! Comrade or Czar by Albnoob

Posted by: Rachel E. Towers | Comments (6)

Hosted Games has a new game for you to play!

Are you prepared to lead the Revolution Of 1917? It’s the fall of the Czars! How will you build The Motherland!? It’s 25% off until February 8th!

Comrade or Czar is a 60,000 word interactive novel by Albnoob, where your choices control the story. It’s entirely text-based—without graphics or sound effects—and fueled by the vast, unstoppable power of your imagination.

• Lead armies to conquer the world!
• Build and reform Russia!
• Embrace Communism or stomp it out!
• Lead your side to victory!

Albnoob developed this game using ChoiceScript, a simple programming language for writing multiple-choice interactive novels like these. Writing games with ChoiceScript is easy and fun, even for authors with no programming experience. Write your own game and Hosted Games will publish it for you, giving you a share of the revenue your game produces.

Jan 25

2018

Undercover Agent — Think fast. Lie faster. And don’t blow your cover.

Posted by: Rachel E. Towers | Comments (0)

We’re proud to announce that Undercover Agent, the latest in our popular “Choice of Games” line of multiple-choice interactive-fiction games, is now available for Steam, iOS, and Android. It’s 25% off until February 1st!

Think fast and lie faster! When you go undercover to retrieve a deadly new bio-weapon, can you pull off the mission and escape with your life?

Undercover Agent is an interactive novel by Naomi Laeuchli. It’s entirely text-based–135,000 words, without graphics or sound effects–and fueled by the vast, unstoppable power of your imagination.

You are the top operative at the DTU (Domestic Terrorist Unit), a covert agency that specializes in investigating terrorist groups on US soil. As Silas Bishop’s administrative assistant, you are in a prime position to spy on his business and search for the deadly weapon his scientists have engineered. But word has leaked there’s a mole, and you’re running out of time.

Can you depend on your computer hacking skills to get you out of a tight spot or will you count on your brawn? Would you rather sneak where you shouldn’t be found or bluff your way in with pure charisma and charm? And what about those friends you’ve made while undercover? Can they be trusted, or would you rather just use them? Cover your tracks, delay the mole hunt, and plot your escape.

• Rescue your best friend or leave him to his fate
• Avoid detection or kill those who suspect you
• Find love with your handler or even your enemy’s son
• Frame your coworkers or protect them
• Plant bugs, hack computers, crawl through vents, and use your charms
• Bribe, torture, or threaten information from targets
• Go on the run or earn a promotion
• Expose the mole in your own agency or join forces
• Retrieve the weapon, destroy it, or sell it

We hope you enjoy playing Undercover Agent. We encourage you to tell your friends about it, and recommend the game on StumbleUpon, Facebook, Twitter, and other sites. Don’t forget: our initial download rate determines our ranking on the App Store. The more times you download in the first week, the better our games will rank.

Jan 22

2018

How to Edit Yourself

Posted by: Mary Duffy | Comments (0)

As part of our support for the Choice of Games Contest for Interactive Novels, we will be posting an irregular series of blog posts discussing important design and writing criteria for games. We hope that these can both provide guidance for people participating in the Contest and also help people understand how we think about questions of game design and some best practices. These don’t modify the evaluation criteria for the Contest, and (except as noted) participants are not required to conform to our recommendations–but it’s probably a good idea to listen when judges tell you what they’re looking for.

If these topics interest you, be sure to sign up for our contest mailing list below! We’ll post more of our thoughts on game design leading up to the contest deadline on January 31, 2018.

In our previous series of posts on how we judge a good game for the Contest, the we wrote the following about the Prose Styling category, which represents 10% of the overall score:

Your writing should attempt to be as word-perfect as possible: that means correct spelling, grammar, and usage. While prose styling beyond those elements is subjective (How good is this writing? Does it engage me and do I want to keep reading?) we expect to see evidence that you’ve worked to submit clean copy to us.

Writing should conform to our Style Guide both in terms of text (second person games should use first person options) and punctuation (no smart quotes, correct em-dashes, etc.)

Games which are beautifully written, or that deeply engage the player with their prose, are likely to score higher in this category. Games which are boring to read, or that that contain odd, confusing, or difficult writing are likely to score lower. Games which are unintelligible, which lack proper punctuation, or that are otherwise very poorly written may receive a 0 in Prose.

To expand further on this idea, I’d like to talk a little bit about how to edit yourself, and polish your prose.

The most methodical way to edit for spelling, grammar, good usage and style is to read your prose aloud to yourself, and pore over each sentence, looking for correct punctuation and good sentence structure as you go. As you read, ask yourself whether the sentence sounds good. Does it make sense? Reading aloud will bring to light infelicities like ambiguous antecedents (“Wait, who?”), using the same word twice in succession (“Oh, I started the last paragraph with ‘suddenly’”), options written in second person rather than first (“That should be ‘I!’”), and others.

When you read aloud you can hear where commas go and where they don’t. Reading aloud, you’ll see that your semicolons are connecting two incomplete sentences rather than two separate, related ideas which are both complete sentences. Do you always start sentences with conjunctions? Do you have a lot of sentences that are fragments? There are solutions for that. (Add a clause to the previous complete sentence with a comma or an em-dash.)

While I strenuously recommend the first technique as a way to improve your prose, there is another way to polish. Do a final edit against our Style Guide by using find and replace. Sublime Text, for instance, has a very robust F+R function. Want to make sure all your ellipses are unicode and flush with text? Search for non-unicode ones. Need to find em-dashes that aren’t flush with the text? Search for “[space]–[space].” Do you use the word “realize” or “suddenly,” or the phrase “and then” to exhaustion? Find them, replace them. Is all your *page_break custom text in headline case? Just search for every *page_break. Do you always misspell certain words? If you’re not already using the Spell Check function in Sublime Text, for instance, find and replace them.

While it’s difficult to teach someone how to write prose that is engaging and beautiful, there is a lot of good advice about fiction writing. Kurt Vonnegut’s dictum that each sentence should either reveal character or advance the plot is particularly good. You can read more of his advice here.

Jan 19

2018

How to Get the Most out of Automated Testing—Part 2

Posted by: Rachel E. Towers | Comments (0)

As part of our support for the Choice of Games Contest for Interactive Novels, we will be posting an irregular series of blog posts discussing important design and writing criteria for games. We hope that these can both provide guidance for people participating in the Contest and also help people understand how we think about questions of game design and some best practices. These don’t modify the evaluation criteria for the Contest, and (except as noted) participants are not required to conform to our recommendations–but it’s probably a good idea to listen when judges tell you what they’re looking for.

If these topics interest you, be sure to sign up for our contest mailing list below! We’ll post more of our thoughts on game design leading up to the contest deadline on January 31, 2018.

In our previous blog post, we explained how to use randomtest for debugging, and included some examples, particularly with choice_randomtest. Here we’re going to continue to show how to exercise some of the more esoteric kinds of bugs, then we’re going to include a bit on how to use randomtest to balance our game.

Now, if you have any errors that quicktest or randomtest are able to catch, the tools will run until they find them, then stop and say what the error is. These errors usually say what exactly the problem is, but if you need more detailed help with one, our forum has a category dedicated to already answered questions, or you can post your own questions or problems in the same place if they haven’t already been asked.

There is, however, one relatively rare error for which randomtest won’t display an error message: when randomtest gets caught in an infinite loop. Of course, randomtest does still detect this kind of bug, but since randomtest has no way to determine what is a reasonable amount of time to spend going through a loop, it just continues to run until it is forced to stop. Debugging these kinds of problems can be difficult, but once again automated tools come in handy. Simply make sure “Show choices selected during game” is selected. In most cases you should now see a long string of the same choice(s) being made over and over again, which will tell you right about where the game gets caught in the loop. If it’s difficult to understand though, you can also recreate the playthrough by following the options made (which should reproduce the error in game). Occasionally we won’t see a loop though (and instead options will just suddenly stop), and so we can turn on “Show full text during game” to see if the loop is shown in the text.

Now that our game not only passes randomtest, but is also well on its way to being optimized, we can move on to using some of the features of randomtest for game balancing. One thing we commonly use randomtest for is to simulate a large number of playthroughs. We do this by running a number of ‘seeds’, or playthroughs of the full game made by randomly selecting options when each choice comes up. We have already mentioned line coverage a little in this guide, but now we’re going to actually look at it. To do so, all we have to do is make sure that we tick the box that says “Show line coverage statistics after test” when running the HTML version of randomtest, then, at the bottom of the output, it will display a set of lines that look something like this (This example is taken from the example game when you download ChoiceScript):

variables 10000: *set leadership 10
variables 10000: *set strength 10
variables 10000:
variables 10000: What do you prefer?
variables 10000: *choice
variables 10000: #Leadership
variables 5000: *set leadership +10
variables 5000: *goto action
variables 10000: #Strength
variables 5000: *set strength +10
variables 5000:
variables 10000: *label action
variables 10000: What will you do today?
variables 10000: *choice
variables 10000: #Run for class president
variables 5000: *if leadership > 15
variables 2506: You win the election.
variables 2506: *finish
variables 2494: You lose the election.
variables 2494: *finish
variables 10000: #Lift weights
variables 5000: *if strength > 15
variables 2506: You lift the weights.
variables 2506: *finish
variables 2494: You drop the weights and hurt yourself badly. You never recover.
variables 2494:
variables 2494: *goto_scene death

Looking at this, we see two different types of choices in a very simple form. First, we have What do you prefer?, which is an Establishing Choice (more on establishing choices can be found here), while second, we have What will you do today?, which is Testing Choice (more about types of choices can be be read here). Combined, these two choices are one of the simplest examples of how we use delayed branching. First we choose to either be strong, or we choose to be a leader, then when faced with an option about what we’re going to do, if we pick the one that properly reflects our skill set, we succeed, while if try to do something we have no skill in, we fail.

Having run randomtest, we can see how this actually plays out. Randomtest will select whether the PC specializes in Strength or Leadership, then will randomly select which skill they are going to attempt to use. This means that randomtest has about a 50/50 chance of matching the PC’s preferred skill to the test, and looking at the output, we can see that’s the case. Each of the *ifs are hit 5,000 times (out of 10,000 runs), and each of the successes are displayed a little over 2,500 times. Of course a real game is more complex than this, and once we add a few more Establishing Choices, a couple more variables, and change everything to fairmath, we’re going to lose track of what the ranges our our stats are going to be.

So here are a few rules of thumb to keep in mind. First, if a player is given X stats to choose from, a test with a 1/X success rate for that stat is usually moderately difficult. For example in the above test we had two stats, so a success rate of 1/2 is moderately difficult. If we were to add a third variable (and options) then a success rate of 1/3 would be roughly equivalent. At about double this level of difficulty (again, measuring by how many people actually succeed on the test), any player that puts in any significant effort into raising the appropriate stats should be able to succeed, while at about half of it, and a player has to very specifically raise that stat to succeed at that test.

In addition to that, there is the consideration of the actual number of successes. Any line that is hit around a 100 times in 10,000 seeds, the default number of seeds run, is very difficult. That’s 1% of random players ending up with the right choices. Any lines that are hit around 10 times in the same number of seeds, are exceedingly difficult to reach, and should only be used for are very specific situations, such as singular lines covering rare scenarios, or very rare, special goals, which should virtually always be signposted with an achievement.

Occasionally though we’ll have lines that are never hit. When that happens we have a problem, because we’re unable to confirm whether or not they are at all reachable. Sometimes this is as easy to fix as tweaking some numbers up or down (by giving higher stats to player, or by making the difficulties lower), but occasionally we might find that’s not possible. For example we might be writing a heroic fantasy, and have a scene specifically for clerics that carry swords, but found that it never fires. For this we might insert choice_randomtest into our code (remembering to remove it once we’re done testing), forcing the game to only play clerics that carry swords (of course, remembering in the process that clerics are forbidden from using swords).

There are a couple other ways in which we can use randomtest too. For example, randomtest is how we determine playthrough length. To do this, we run some seeds with the “Show full text during game” option selected, which then shows the word count near the bottom when it’s finished. For a 100,000 word game, we generally expect the average playthrough to be around 20% of the game, or 20,000 words, but as a game’s total word count gets longer, actual playthrough tends to be a smaller percent of the game, although we don’t recommend going below 10% of the total length (otherwise so much of the game is in specific playthroughs, that it will feel short regardless of the total length).

This is of course, not an exhaustive list of uses for our testing tools; we might also use various other tricks, like a series of *ifs with *comments to tell us how many people reach a certain set of code with certain stats in randomtest, or the *bug command, which is documented here, to make quicktest pass, or get more information from randomtest. Maybe you’ll even come up with your own!

Jan 16

2018

Author Interview: Naomi Laeuchli, “Undercover Agent”

Posted by: Mary Duffy | Comments (0)

Your mission: go undercover at an evil organization and retrieve a deadly new bio-weapon. But word has leaked there’s a mole, and you’re running out of time to pull off your mission and escape with your life.

You are the top operative at the DTU (Domestic Terrorist Unit), a covert agency that specializes in investigating terrorist groups on US soil. Now put in place as Silas Bishop’s administrative assistant, you are in a prime position to spy on his business and search for the deadly weapon his scientists have engineered. Undercover Agent is a 135,000 word interactive novel by Naomi Laeuchli, releasing Thursday, January 25th. I sat down with Naomi for a short interview. 

What’s your background as a writer?

Since I was six years old, I’ve been writing. I was homeschooled, and something we had to do every day for school was write for half an hour. We could write anything we wanted we just had to write. I even spent a year writing fanfiction for a virtual pet site’s newsletter (it never did get accept). Writing was my favorite part of school, and at some point I realized I was doing it for fun as well.

When I was nineteen I got my first freelance writing job and have been doing it ever since. I’ve written about dentistry, garage doors, and diamond cuts, written reviews and created personality quizzes. During my time off, I wrote a four book romantic suspense series called Holly(Woods) and posted it online in web fiction format (though I’m now releasing it through Amazon).

Currently I’m lead game reviewer for the quarterly magazine Casual Game Insider.

What were some of the challenges of writing in ChoiceScript for you?

Not being able to write it in Microsoft Word! It made proofreading a lot more difficult.

Do you read much interactive fiction? Any favorites from the COG catalogue or otherwise?

I read it both on and off COG. My favorite non-COG one is Long Live the Queen. My favorite COG books are probably A Midsummer Night’s Choice (I adore the setting) and Choice of Alexandria (again, I think the setting is quite unique and I really enjoy that about it). Though I will always have a soft spot for Choice of Zombies, which is the first one I read and how I first discovered Choice of Games. I was nineteen at the time, and I remember thinking it would be amazing to write one of these, but they’d never have me!

What are you working on next?

I’m currently writing a werewolf novel, about a group of teens in a small town who killed a werewolf when they were kids, suffered some pretty bad consequences from it, and are now beginning to suspect there’s a new wolf in town.

Short answer, Bernard Pivot-style Questionnaire:

Favorite color.

Red.

Favorite word.

Felicity.

Profession other than your own you’d like to attempt.

Flight attendant or Queen.

Profession you would never want to attempt.

Bullfighter.

James Bond or George Smiley?

James Bond.

Jan 12

2018

How to Get the Most out of Automated Testing—Part 1

Posted by: Rachel E. Towers | Comments (0)

As part of our support for the Choice of Games Contest for Interactive Novels, we will be posting an irregular series of blog posts discussing important design and writing criteria for games. We hope that these can both provide guidance for people participating in the Contest and also help people understand how we think about questions of game design and some best practices. These don’t modify the evaluation criteria for the Contest, and (except as noted) participants are not required to conform to our recommendations–but it’s probably a good idea to listen when judges tell you what they’re looking for.

If these topics interest you, be sure to sign up for our contest mailing list below! We’ll post more of our thoughts on game design leading up to the contest deadline on January 31, 2018.

Coding in ChoiceScript is relatively simple, but that does not mean it’s always easy. In addition to writing a compelling story with a number of branches and making sure that the story flows naturally no matter which choices are made, you must also add a level of game design—of tension and uncertainty—to give a sense of accomplishment to successes and of replayability in finding more. This means considerations for things such as game balance must be made. If the game is too difficult, it narrows the options available and eliminates possibilities, while if it’s too easy, second and third playthroughs can lack a sense of tension. This is why we test our games. While testing by hand can be a useful tool for shorter games, or to quickly check something, the longer a game becomes, the more tedious and less useful testing by hand is. This is of course where automated tools come in.

There are a few different versions of the testings tools included in ChoiceScript, but for our purposes the html version is the easiest to use. All you need to do to run it is open up the folder you have your copy of ChoiceScript in, and open the html version of the tool in a web browser. (Like everything related to ChoiceScript development, we recommend you use Firefox.) If you would prefer to use the command line version, instructions on running that can be found here.

Now, if you have any errors that quicktest or randomtest are able to catch, the tools will run until they find them, then stop and say what the error is. These errors usually specify what exactly the problem is, but if you need more detailed help with one, our forum has a category dedicated to coding problems, with a number of questions already answered.

Of course, sometimes we know exactly what the problem is, but because of the limits of randomtest, it’s impossible for it to make a reasonable choice. Say, for example, we want to ask a player to input a password they learned earlier in the game. This is a barebones example of what we might use:

What is the password? (Hint: It’s the name of a fish.)
*input_text answer
*if answer = “swordfish”
	*goto correct_answer
*else
	*goto wrong_answer

When we think about how randomtest would run this, we can easily see the problem. Randomtest obviously has no way of actually understanding the question! (As a quick aside for the curious, when presented with *input_text, randomtest always says “blah blah”.)

For these situations we have a special variable called choice_randomtest. This variable never has to be created or set, it simply has to be tested like any other variable, but instead of a value based on player it choice, it simply returns true when the game is run by randomtest, and false when played normally. This will let us create special code to handle situations such as the above password. Of course we can make randomtest test always pass by simply checking *if (answer = “swordfish”) or (choice_randomtest), but let’s do something a little more complex, and have randomtest know the answer only some of the time. To do that, we’ll need to create a temporary variable, randomize it, then use that to set the answer. That would look something like this:

What is the password? (Hint: It’s the name of a fish.)
*input_text answer
*if choice_randomtest
	*temp coin 0
	*rand coin 1 2
	*if coin = 1
		*set answer “swordfish”
*if answer = “swordfish”
	*goto correct_answer
*else
	*goto wrong_answer

We now see that randomtest “guesses” the answer with a coin flip, returning the correct answer half the time, and failing the other half (with “blah blah” as its guess). We can of course tweak things even more, and make this much more complex (maybe it’s a really hard puzzle and randomtest should get it one out of ten times), but this is a good indication of how choice_randomtest can be used to reflect actual game play where randomtest otherwise wouldn’t.

That brings us to another common use for choice_randomtest. Some games include complex looping choices, such as requiring a player to confirm a selection, or there is an option which gives a player extra information, but doesn’t otherwise change the game. In randomtest, these kinds of choices add time to the playthrough (making randomtest take longer to run), and playthrough word count to the total, but don’t really accomplish anything. (This is also a small part of what we mean by coding efficiency.) For example, here is a simple loop where a player has to confirm a choice. (The confirmation is in a subroutine so we can more easily see how it all works together.)

*label take_a_shortcut
Which shortcut do you take?
*choice
	#Go through the rose bushes.
		It’s filled with thorns.
		*gosub confirm
		*goto rose_path
	#Climb the wall
		It looks very high. A fall might hurt.
		*gosub confirm
		*goto wall_path
	#Wade through the river
		It is running very fast and you can be swept away.
		*gosub confirm
		*goto river_path
	#Give up on 
		*goto give_up
*label confirm
Are you certain this is the path you want to take?
*choice
	#Yes
		*return
	#No
		*goto obstacle

Looking at this, we can see that when making a choice, randomtest would normally select any given choice about 25% of the time, but when given an opt-out, that one option, the easy path, suddenly becomes a lot more common. For example, if you run this through randomtest, it will give up about 40% of the time, close to double what would happen if there weren’t a confirmation, and almost certainly a lot more than a real player would (because a real player is more likely to assess the risks and take the path where they are most likely to succeed). But with one little change we can make it possible for randomtest to not opt out.

*label confirm
Do you continue?
*choice
	#Yes
		*goto obstacle
	*if (not(choice_randomtest)) #No
		*goto take_a_shortcut

In this case, we’ll see that when randomtest makes a choice, it no longer attempts to back out. This returns our run percentage back to reasonable 25% all around. This also has a side effect of speeding up randomtest. Again, we might want to fine tune this for more specific circumstances, but the general idea remains the same.

Looking at this, we see that we can force randomtest to arbitrarily make any decision and run any code. Sometimes we might use this to test specific possibilities in a game by inserting choice_randomtest into our code (and removing it once we’re done testing). For example, say we have a spy game, and while out on mission the player only has room for one hidden tool, and must make the important choice of whether bringing along a lockpicks, a pistol, or a disguise kit, and we lock and unlock certain paths based on what’s selected. Of course we want a player to be able to succeed no matter which tool they pick, and to be certain of that we might need to test what happens with each tool. So we would lock the other ones by an *if not(choice_randomtest), then running randomtest.

Of course, this has to be done with some care, as if randomtest makes decisions a player wouldn’t (or especially one that a player couldn’t) it becomes useless and detrimental to testing. Bad information can be worse than no information at all.

Subscribe by E-mail