How to Make HTML Gamesby James HighlandUpdated September 28, 2017
Outline a "choose each step" style of interactive fiction. One way to use the limited programming abilities of HTML is to string a collection of independent HTML "chapter" web pages together in a "choose your own adventure" type of experience. Write a story with several critical plot points and choose alternate outcomes based on the decisions by the reader.
Open a text editor. Type the first "chapter" of your story.
Add two or more links at the end of the chapter to offer choices to the reader. Format each link as "Choice A" for the first choice, "Choice B" for the second choice, etc. Type the full description for each plot choice in the areas labeled as "Choice A" or "Choice B."
Save the file as "index.html."
Create a new text file. Type the content associated with the first choice you provided the reader.
Save the file as "1.html."
Create a new text file. Type the content associated with the second choice you provided the reader.
Save the file as "2.html."
Create more chapters and plot points if desired. The end of each chapter can provide the same HTML code for selecting choices. New text files are created for each choice provided. Simply increment the HTML file names with "3.html," "4.html," etc. to create multiple chapters.
Double-click "index.html" to begin the interactive HTML experience. It will open in a web browser and present the first chapter and set of choices. Each click will automatically open the other HTML file corresponding to that selection.
Locate a board game script online. Many are available for free (see "References").
Create a new text document.
Copy and paste the HTML code form the board game script into the text document.
Save the HTML file using any file name you wish. Use the ".html" file extension.
Double click the ".html" file you saved to begin playing the game.
- Ciaran Griffin/Lifesize/Getty Images