Thứ Bảy, Tháng Mười 1, 2022
- Quảng cáo -
HomePOSTCreate Your Own Adventure Game (HTML)

Create Your Own Adventure Game (HTML)

Now you have what you need to get started. First come up with a story.
Open up the template.
In the title section give it a title. This is what displays on the tab and on the blue bar across the top of a webpage.
Adjust your body style if you want to your liking
Give it a heading
After the <p> tag type in your story or scene. Then edit the link tag to be one of the choices. This requires some explaining.

Now it says:
<p>
<a href=”http://www.w3schools.com”>This is a link</a>
</p>

To illustrate, I’ll use the example I gave in the intro:

Once upon a time there was a small city in which all the citizens were obsorbed in the local weather forcast.The plain looking weatherman was speaking into the camera with a concerned expression, announcing the approaching storm.Though the storm was only a category one hurricane, the entire town panicked! Every last small minded, easliy scared citizen lost their mind….literally! Enter Terry, Mind Wrangler Extraordinaire!

                         Set traps to catch the minds
                         Use the lasso you find conveniently nearby
                         pull out a pipe and play some music to tame the minds    

This is what your code should look like using this example:

<p>
Once upon a time there was a small city in which all the citizens were
 obsorbed in the local weather forcast.The plain looking weatherman was
 speaking into the camera with a concerned expression, announcing the
approaching storm.Though the storm was only a category one hurricane,
the entire town panicked! Every last small minded, easliy scared citizen
lost their mind….literally! Enter Terry, Mind Wrangler Extraordinaire!

<br>
<br><a href=”http://www.traps.html”>Set traps to catch the minds</a>
<br>

<br><a href=”http://www.lasso.html”>Use the lasso you find conveniently nearby</a>
<br>

<br><a href=”http://www.music.html”>pull out a pipe and play some music to tame the minds</a>
<br>
</p>

***note the <br> tag just puts in an empty line to have space between the choices****

Understanding what you see

To make your choices into links you must first type in the choice in the place of This is a Link on the template. These will be the words that you click on to go to the next page. ex: my choice was set traps to catch the minds so at this step in changing the template it would look like this:

<a href=”http://www.w3schools.com”>Set traps to catch the minds</a>

This now has my choice but it still links to w3schools. I need it to link to the next page in the story. So now I have to decide what I will name the document that will have the next part of the story for this choice. I chose to title it “traps” So when I write this part of the story in Notepad, when I save it (as we did the template) I will name it “traps” so when I save it as a webpage it will be called “traps.html” Thus the webpage that I need the link to go to will be http://www.traps.html. So now I need to replace  http://www.w3schools.com with http://www.traps.html.
Now my code will read:
<a href=”http://www.traps.html”>Set traps to catch the minds</a>

You must do this for every choice you have. Just copy the entire link code and paste it as many times as you need. EX: I have 3 choices so I will copy and paste twice so that my code now looks like this:

<a href=”http://www.traps.html”>Set traps to catch the minds</a>
<a href=”http://www.traps.html”>Set traps to catch the minds</a>
<a href=”http://www.traps.html”>Set traps to catch the minds</a>

Then just replace the information with the information you need for your other choices so now the code would be:

<a href=”http://www.traps.html”>Set traps to catch the minds</a>
<a href=”http://www.lasso.html”>Use the lasso you find conveniently nearby</a>
<a href=”http://www.music.html”>pull out a pipe and play some music to tame the minds</a>

****IMPORTANT**** when you write the pages for each choice you MUST title them EXACTLY what you put in the webpage link or the link will not work. EX: mine is traps. If I save it as trapped instead, the link will not work.

SAVING

Now we must save this starting page. Click File, Save As, make sure the correct folder is selected, enter a title in the file name box. Mine is called Mind Scramble. Hit save. Then do it again.. click file, save as, and add .html to the end of the title and hit save. Go to your desktop and open the folder and check to make sure you now have 2 copies, one text and and one webpage. Double click the webpage to open it and check it for correctness. Make style and spelling changes if you need to by opening the text version, making changes, and saving again both ways.

Now you have your first page, you now need to make a page for each of the choices. Open up the template again and repeat this step using the new information for the next part of the story. Then save it as we did before making sure to use the exact name you planned. Then you will need to make a new page for every new choice on each of the new pages… it gets quite large.

This is my code for my page “traps”:
<html>

<head>
<title>Mind Scramble</title>
</head>

<body style=”background-color:red;text-align:center;font-size:30px;”>

<h1 style=”font-family:arial;color:navy;font-size:40px;”>Mind Scramble</h1>

<p>
Terry begins to set up traps all around the town. But what should he use as bait?

<br>
<br><a href=”C:\Documents and Settings\megan\Desktop\adventure\coffee.html”>coffee</a>
<br>

<br><a href=”C:\Documents and Settings\megan\Desktop\adventure\playboy.html”>playboy magazines</a>
<br>

<br><a href=”C:\Documents and Settings\megan\Desktop\adventure\bologna.html”>bologna</a>
</p>

</body>
</html>

*****NOTE**** You will notice that the webpages in the links are much longer than in the begining page. You may need to use the longer version to get the links to work. This just the exact place on your computer where the file is saved. If you know already you can type it in yourself. Mine is in my Documents and Settings folder, then in my user account called megan, then on the desktop, in a folder called adventure, then the name of the page I’m wanting to link like “coffe”. If you dont know this, simply open the webpage you are wanting to link and copy the url at the top of the page. Then paste the url in link area.****

My new choices are coffee, playboy, and bologna. So now I will need to make a page for each of these choices as well as a page for each of the previous choices I havent made yet.. the lasso one and the playing the pipe one.

Đánh giá post
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments