How to Make Text Based Games

Text-based games, also known as "interactive fiction" (I.F.) games, have come a long way since the days of Zork and Hitchhiker's Guide to the Galaxy. Though no longer commercially viable, an energetic fan community exists around their continued development. There are three major, custom I.F. development platforms, all of them free: TADS, HUGO and Inform, with Inform being the most popular, and the one used in this tutorial.

Things You'll Need

  • Computer
  • Inform 7
Show More

Instructions

    • 1

      Choose an Inform version. There are two major versions of Inform available: 6 and 7. The difference between them is dramatic. Version 6 offers a more traditional, object-oriented programming syntax, whereas version 7 attempts something much more ambitious: game development in plain, 'natural language' English (see References 1). Each has their strengths and weaknesses, but this tutorial will assume that you use version 7.

    • 2

      Define the title and author of the text-based game. This is actually very simple in Inform 7. Write the following in the Inform 7 window:

      "A Game" by "Amber Rollins"
      The story headline is "A Tutorial By Amber Rollins".

    • 3

      Create some rooms to explore. The syntax for creating a room is very simple: The name of the room, followed by "is a room." And next the description of the room that should be shown to the player. Add the following to the Inform game:

      The Ling Room is a room. "A small living room with a roaring fireplace, a computer, and an office chair."
      The Kitchen is a room. "A cozy kitchen."

      Game play will begin in the Living Room, since that is the first room defined in the story.

    • 4

      Connect the rooms. You've defined two rooms, but you need to connect them, so the computer knows their relation to each other on the map. Add this to your game:

      The Living Room is east of the Kitchen.

    • 5

      Create objects. It's good practice in an I.F. game that every noun mentioned in your game that refers to a tangible object should be defined in your game. The code so far has mentioned a fireplace, a computer and an office chair. You'll need to define all of those in your game file, because nothing is more jarring to the experience than saying "examine computer" and being told that the player doesn't see the computer (even though it was described to them as in the room).

      A computer is in the Living Room. The description is "A shiny new MacBook Pro." Understand "MacBook Pro" as the computer. Understand "macbook" as the computer.
      A fireplace is in the Living Room. The description is "A roaring fire is going."
      An office chair is in the Living Room. The office chair is a chair. The description is "It looks comfortable." Understand "chair" as the office chair.

      A few things have happened here. The compiler was told to "understand" chair to mean office chair, and this is a way to define synonyms for the game. You've also defined the office chair as being a "chair", because chair is an object already understood by the Inform language as an object that can be sat in.

      You now have a basic, functioning text based game.

Tips & Warnings

  • Use 'Inform English', not 'Real English'. Inform 7 attempts to let you program in plain English, but there are significant limits to that. There is still a defined syntax for the language that must be followed. For example, in the above example, the phrase "Understand "chair" as the office chair" is used. This could also be expressed "Chair is a synonym for office chair." Even though this is valid English, the compiler will not understand.

Related Searches:

References

Resources

Comments

You May Also Like

  • How to Create Text Based Browser Games

    Gaming graphics have certainly improved greatly since the days of text only games and Pong. However, there is more to gaming than...

  • How to Make Your Own Text-Based Game

    Creating an entertaining and coherent text-based game is more challenging than it first appears. In order to create a world for your...

  • How to Create Browser-Based HTML Games

    Use HTML form elements to create simple user interfaces for your game. You can make buttons, text fields, checkboxes, menus, and radio...

  • How to Build a Text Based Website Game

    Hyperlinks make the Web what it is, but they have more creative uses than just directing a surfer to another web page....

  • The History of Text-Based Games

    Many of the earliest computer games rely on text-based interfaces for their gameplay. Some of these games have become classics, and people...

  • List of Text Based Games

    List of Text Based Games. Text based games include the roguelike RPG subgenre, which emphasizes real consequences for player death such as...

  • How to Make a Board Game

    With a little creative thinking and the materials in your own house, you could make your own board games. Just follow these...

  • How to Create a Story-Based Role-Playing Game

    Role-playing games (RPGs) are extremely popular, since they allow participants to be transported to another place, to live another life and to...

  • Text Based Mmorpg Games List

    Text Based Mmorpg Games List. Text-based Massive Multiplayer Online Role Playing Games (MMORPGs) are also known as MUDs, Multi-User Dungeons. The first...

  • How Can I Make a Web-Based Game?

    Making a Web-based game is something many people can do, even without a lot of development experience. There are many different techniques...

  • How to Make Room Escape Games

    Room Escape (or Escape the Room) games are adventure-based games that are usually designed on Adobe Flash for the browser. They also...

  • How to Make Games in PowerPoint

    PowerPoint is presentation software created by Microsoft. The software's primary use is for business presentations. Users create text, graphs, charts and ...

  • Text-Based Game Ideas

    Text-Based Game Ideas. Texting has become a standard form of communication, but it also has other uses, such as game play for...

  • How to Play Yahoo! Text Twist

    Text Twist and Super Text Twist were developed for computerized gaming by GameHouse. They involve spelling words from a certain set of...

  • How to Make Your Own Free Adventure Games

    Most of us who were playing computer games in the '90s remember that decade as the heyday of graphic adventure games. Sierra...

  • How To Make a Free RPG Game

    RPGs are a genre of video games that has roots in traditional American table-top games such as Dungeons and Dragons. RPGs commonly...

  • How to Create Your Own Browser Based RPG for Free

    Creating a browser based RPG (Role-Playing Game) is a long process. But it can be simple if you take necessary precautions before...

  • How to Make Your Own MMORPG

    Creating a Massively Multiplayer Online Role Playing Game--or MMORPG--can bring joy and satisfaction to those who approach it with care and consideration...

Related Ads

Featured