Creating a Game With Notepad

Updated on April 29, 2016
You probably won't know what all of this means right now, but I'll explain it soon.
You probably won't know what all of this means right now, but I'll explain it soon.

Introduction

Did you know that the simple Notepad program on your computer is actually a very powerful programming tool? That's right, and it is also very easy to learn. In this article I'm going to show you how to make a simple game using only the Notepad program and a programming language called "Batch."

Batch is a language that runs primarily out of your Windows command prompt. Now, it's not even close to being the most powerful programming language out there, but it still let's you do enough to be extremely useful to know (at least for anyone in the computer field).

Not only is it useful, but it can also be used to create amazing text-based games! What is a text-based game you ask? It's a game (a very simple one) in which the user interacts through the use of text and choice-making.You will learn how to set up situations in which the characters will have to make choices about how they want to approach the problem.

A Few Quick Reminders

I want to go over a few quick things before we get in to the actual code. The first thing is that all of your commands should be kept on separate lines. So after you type something in, and are done with what is going to be on that line, hit the "enter" button on your keyboard to move to the next line.

The second thing I want to mention is that batch files read from top to bottom. This means that when you run a batch file, all of your code at the top will be interpreted and will run before your code at the bottom. This concept is what allows some of the things I'm going to teach you, to work. If for example you place a "echo" command and in the next line place a "cls" command, all of your text will be erased without your player getting to read it (this will make more sense later on).

If you ever have a problem and your game isn't working correctly, make sure you go back and ensure that you haven't made any of these errors.

Starting Up Notepad

Let's start by opening up Notepad:

Click on your start menu icon and go to "All Programs." A list of all the programs on your computer should appear, along with a file called "Accessories." Go in to the accessories folder and you should find Notepad, click on it to begin.

You should find Notepad in the Accessories folder.
You should find Notepad in the Accessories folder.

Code!

Now you're ready to begin typing your first lines of code, as well as learning you first commands. Commands are each of the words that we type in to the program that have a function; such as the echo, or pause commands.

@echo off, echo, echo. and pause

The first commands I'm going to teach you are very simple, however, they play an important part in the coding process (especially if you're making a game!).

@echo off - This command is used to remove all of the unnecessary text that can interfere with your game. It should always be added first; once it is added to a file, it does not have to be typed in again.

echo - echo is used to display regular text in your game. For example you can type: "echo Hello adventurer!", and the people playing your game will see is "Hello adventurer!" (So long as you typed in @echo off).

echo. - echo. (with a period) is used to create a blank line in your game. This can be useful in keeping your text uncluttered.

pause - This command is used when you want your players to take a break, and is used most often when you want to give them time to read some text. When you use this code it shows up as "Press any key to continue . . ." Your players can then press any key, when they are ready, in order to continue playing.

This is what your game should look like. Notice the long spaces between the text? This was done with the "echo." command. Also, note the pause command at work toward the bottom.
This is what your game should look like. Notice the long spaces between the text? This was done with the "echo." command. Also, note the pause command at work toward the bottom.
This is what your game should NOT look this. When you don't add "@echo off" this is what happens.
This is what your game should NOT look this. When you don't add "@echo off" this is what happens.
color 71 and "My Game" in the title bar.
color 71 and "My Game" in the title bar.

cls, exit, title, and color

Ok, this next set of commands are all really simple as well, but are nice to have.

cls - cls is a command that I use a lot. It stands for "clear screen", and what it does is remove all of the text that has been made in the command prompt window (ergo, making the screen blank). This is a good tool when you want to keep your game looking clean and in order.

exit - This does exactly what it sounds like, it closes the game. You should only use this when the characters reach the end of the game, or if you want the game to close when they die or make a wrong decision.

title - title displays whatever you type after it in the title bar of the command prompt window.

color - color is a really fun command, and can be used to liven up your game. When you add the color code, followed by a space and a specific set of numbers or letter, you can change the colors of the command prompt window. For a list of the available colors see the picture below or open up the command prompt and type in "color/?".

You can access the command prompt by going back in to the accessories folder in the start menu. It should be in the same list as Notepad.

This is what you will get if you type "color/?" in to the command prompt.
This is what you will get if you type "color/?" in to the command prompt.
This is about what you should be capable of doing at this point.
This is about what you should be capable of doing at this point.

Let's Take A Break

Let's stop for a second and look at what we have so far. I've shown you several basic commands, and have taught you how to use them. Remember that each command should go on a different line (so hit "enter" after you finish with each command). Take a look at the picture to the right, so that way you can be sure that you know about what your file should look like.

goto

The "goto" command is simple, once you get to know it. The command is used when you want a player to jump to a different section of your game, such as when they make a certain decision.

It works this way:

You enter the "goto" command on a separate line, or at the end of an "if" statement (which we will go over later). You then specify a variable which will become the name of the destination. The name can be anything you want, and consists of the word(s) you type after "goto".

To specify your destination:

Move to a new line of code, directly above where you want your player to start. Type a colon ':' followed by the name of the destination.

example of a goto command.
example of a goto command.

set /p and if

These commands are the most advanced commands that I am going to teach you. They both have to be set up a specific way and also work with several other, smaller commands in order to function correctly.

set /p variable= - This command is used when you want your player to insert a variable (a varying answer). This could be anywhere from their name to the name of a weapon or even the answer to one of the choices you have given them. Often times this variable will be referenced later, and therefore must be given a name. The name can be whatever you want it to be (but remember that you may be typing it in a lot when making your game). I think it would be easiest if I gave you some pictures showing you how to create variables.

set /p name=
set /p name=

See how I use the "echo" command to ask my player what his name is? I then go ahead and type:

set /p name=

This is where my player will type his name. "name" In this line is my variable. In a sense what we are doing is setting (set) a variable (name) to equal (=) whatever the user types.

We can reference this variable later by placing the name of the variable within two of the '%' symbols. For example:

echo Hello %name%, my name is Tom.

This will feed whatever the player typed in, back to him in the form of text.

Here is what happens when a player types in his name, then you feed that name back to him with the echo command.
Here is what happens when a player types in his name, then you feed that name back to him with the echo command.

if - this command is used when we create if/then statements. We can use it in conjunction with "set /p" in order to create choices for are players.

  1. Ask the player a question with the "echo" command. Make sure to clearly state their options.
  2. Give them the ability to enter an answer with the "set /p" command.
  3. Create "if" statements that allow the players' choices to have consequences, and that allow the story to continue.

"if" statements are used with "equ" and "neq" which mean "equals" and "doesn't equal", respectively.

This is how your statements should look:

:start

echo YES or NO?

set /p variable=

if %variable% equ YES goto situation1

if %variable% equ NO goto situation2

if %variable neq YES goto start

All of this code means that if the player types in "YES" he will be sent to "situation1"; if he types in "NO" he will be sent to "situation2"; if he types in neither "YES" or "NO" he will be sent back to the start of the question.

Remember when I said earlier that the order you write your code matters? If you typed in the "neq YES" code before the "equ NO" code, your player would never be able to make it to "situation 2".

Here is a good example of how you can use "set /p", "goto", and "if" all together.
Here is a good example of how you can use "set /p", "goto", and "if" all together.

Saving

The last thing I need to show you how to do is to save your file. Once you are all done, click the "file" button at the top of the screen, then click on "Save As." This will display a window where you can then create a name for you game and save it wherever you would like. However, you need to make sure that you save it as a Batch (.bat) file and not as a regular text file (.txt).

To do this, after you type in the name of your game add .bat behind it. You then need to go to "Save as type" and select "All Files."

Then you're done! All you have to do is hit the "save" button.

Remember, you can edit your game at any time by right clicking on the batch file and selecting "edit."

Select "All Files", then click the save button to finish.
Select "All Files", then click the save button to finish.

Conclusion

It's as easy as that! With only the few short commands that I taught you (@echo off, echo, cls, pause, color, goto, etc.) you can be on your way to making very large and complex text-based games. Always double check your code to make sure that you typed everything correctly, and if you have any questions feel free to leave a comment and I'll get back to you as soon as I can. Good luck and have fun!

Comments

    0 of 8192 characters used
    Post Comment

    • profile image

      yakubu halan 

      4 weeks ago

      please help i have done correctly as you command but it shows me

      a black page with the copy of what i did in my notepad

    • profile image

      devil sumeet 

      4 weeks ago

      continue bro u doing great nice

    • profile image

      rejoanul 

      6 weeks ago

      Wow! I didn't know I could do that . This was my first coding experience. Thanks.

    • profile image

      Robert 

      2 months ago

      Thank you very much your time and effort.

      But how can you play your game after creating it in that file type?

    • profile image

      arjun 

      3 months ago

      hi! i was sucesfull in making the game but how to make visual characters and put image,is notepad able to do so.....

    • profile image

      Daniel Ratliff 

      3 months ago

      How do I add an inventory?

    • profile image

      Baymax23 

      4 months ago

      Hello , i am new to this and i got the game to work and was trying to modify it to my needs. Which would kind of act as a troubleshooting flow. I got to a part where I need to give "player " 4 options and for those options to have at least 3 options each but when I try to test it , Game recognizes only 1st option and its 3 other paths from there. .... is there a line or code that I might be missing. Is this even possible to have with notepad ?

    • profile image

      Someone 

      4 months ago

      Cool tutorial.

    • profile image

      Yashwanth 

      5 months ago

      i wanted a similar mini block game,can you provide me with its script

    • profile image

      Guilherme 

      5 months ago

      For some reason whenever I use the command pause it always closes and I can't find what's causing it. I already tried everything.

    • profile image

      Moo 

      5 months ago

      @Person You're not using the pause command to let the user read what you're typing on echo.

    • profile image

      JOHN 

      5 months ago

      I type your code and save it but nothing appear someone tell me whats solution?

    • profile image

      chisom 

      5 months ago

      How to assemble the Game code into mobile

      application.

    • profile image

      Psalms 

      6 months ago

      How to assemble the Game code into mobile application

    • profile image

      noname 

      6 months ago

      could you continue the making the game please person

    • profile image

      Person 

      6 months ago

      nvm on that comment. i saved as a .vbs instead of .bat.

      I'm still having trouble. I made a name select screen and at the end it says YES or NO no works and takes you to the begenning but yes closes the game.

    • profile image

      Person 

      6 months ago

      Can someone help? I tried opening my game and it didn't work. An error box just came up.

      Here is the games code, can someone fix it for me?

      @echo off

      color 04

      cls

      title My game

      echo.

      echo Hello

      echo.

      echo What is your name?

      echo.

      set /p pname=

      echo.

      echo What is your best friends name?

      echo.

      set /p bfname=

      echo.

      echo Alright, choose my name

      echo.

      set /p nname=

      echo.

      echo Ok %pname%.

      echo.

      echo this is an early build.

      pause

      exit

    • profile image

      Munashe 

      7 months ago

      Thank You.

      This Helped Me So much

    • profile image

      Aniasjasas 

      7 months ago

      when i make a name and press enter it closes the game

    • profile image

      Anonymous 

      7 months ago

      it keeps closing if I press a key, even if i have text after it! Whats happening???

    • profile image

      Muizz 

      8 months ago

      Thanks very much Alex king, it's fun learning from the basics.

    • profile image

      save it as (title).bat 

      8 months ago

      save it as (title).bat

    • profile image

      Aditya mahadev nalavde 

      8 months ago

      I have creat a new game in my notpad

    • profile image

      manis 

      9 months ago

      how to make fighting game with images

    • profile image

      ASIF A 

      9 months ago

      I WAS AN CEO OF AFSAGROUP OF INDUSTRIES TO RUN AN GAME TYPE THE WHOLE CODE AND SAVE IT AS GAME.DLV AND RUN.

    • profile image

      Aditya 

      9 months ago

      Sir how will i run my game i'm not able to understand can you please tell me...?

    • profile image

      Ali 

      9 months ago

      For who does not know how to open the game:

      You must save it as a .bat

    • profile image

      Bruno 

      9 months ago

      How to open that game?

    • profile image

      Drax 

      9 months ago

      Please teach me more

    • profile image

      ponnala prakash 

      10 months ago

      i dont understand the programme

    • profile image

      Vin 

      10 months ago

      Thank you so much! You're great!

    • profile image

      niko 

      10 months ago

      how can start the game

    • profile image

      anonymous 

      10 months ago

      thank you so much this really helped me make a pretty cool game that I just love and now that you tought me I like to explore with all of this coding

    • profile image

      ben 

      11 months ago

      i am a student ,i tell my teacher that she should teach us notepad program also

      if you can continue this tutoral plssss continue

    • profile image

      lalitha 

      11 months ago

      super super super.........!

    • profile image

      otz 

      11 months ago

      super thankz

    • profile image

      ACE 

      12 months ago

      AWESOME development

    • profile image

      entah 

      12 months ago

      thanks for tutorial

    • profile image

      GamerMTD 

      12 months ago

      How can we start the game

    • profile image

      Grace 

      13 months ago

      I'm doing some work on the notepads. And I need to find the accessories folder please help me I'll be fine but you can tell me where it is please I'm. Going ok your find are you yes well I'll,say no to me

    • profile image

      hfh 

      13 months ago

      what i have to do after completing the code you gave. can i open the game . if yes then how

    • profile image

      Wisdom Pius 

      13 months ago

      Looks good

    • profile image

      Matthew C 

      14 months ago

      IF YOU DIDN'T KNOW IT ILLEGAL TO DISTRIBUTE BATCH FILES OVER THE INTERNET

      (Copy the text into notepad, save the file as (file name).bat to you desktop or wherever. Open The file, There you have it.)

      I TOOK THE CONTENTS AND POSTED THEM HERE:

      @ECHO OFF

      color 21

      :start here

      cls

      title Matthews Game

      echo.

      echo Hello Player!

      echo.

      echo What is your name?

      echo.

      set /p name=

      goto start here

      :start

      cls

      echo.

      echo Where do you want to go?

      echo.

      echo SWAMP, TOWN, or MOUNTAIN?

      echo.

      set /p where=

      echo.

      if %where% equ SWAMP goto swamp

      if %where% equ TOWN goto town

      if %where% equ MOUNTAIN goto mountain

      if %where% equ SWAMP goto start

      :swamp

      cls

      echo.

      echo ok! Let's head to the swamp!

      echo

      pause

      exit

      :town

      cls

      echo.

      echo ok! Let's head to the town!

      echo

      pause

      exit

      :mountain

      cls

      echo.

      echo ok! Let's head to the mountain!

      echo

      pause

      exit

    • profile image

      Julian 

      14 months ago

      This is amazing thank u so much

    • profile image

      Abhay Shukla 

      14 months ago

      I want to how to open this game it is open with notepad

    • profile image

      kumaresan 

      15 months ago

      how to create new game

    • profile image

      ismail s jafo 

      15 months ago

      i got an idea

      thank

    • profile image

      sparky the cat190 

      15 months ago

      paolo here is a example that builds it's data base as you talk to it to remove phrases you must edit the source code if you rename it you must change to file name where it saves new phrases to the new file name

      https://drive.google.com/file/d/0B0vnvqSWWBTTWTN2N...

    • profile image

      Paolo 

      15 months ago

      Is it possible to create an enciclopedy with this tecnique? I would like to create a file where the "game" invites you to ask for something and then answers your question. Sorry for my bad English...

    • profile image

      Code.Me 

      15 months ago

      i like pizza

    • profile image

      sparky the cat190 

      15 months ago

      your welcome i found a problem under forest that i didn't see before i posted it you should change

      if %lv% equ (greater than sign)5 goto fight6

      to

      if %lv% gtr 5 goto fight6

    • Mnooper profile image

      Mnooper 

      15 months ago

      Thanks sparky! really appreciate it

      the game works just fine, and i am continuing to edit it to make it even better rn.

      thanks again!

    • profile image

      sparky the cat190 

      15 months ago

      I don't know if you still need it or not but here is a working version of your game Mnooper

      https://drive.google.com/file/d/0B0vnvqSWWBTTdkd6Z...

      and here is a version were i added a couple things

      https://drive.google.com/file/d/0B0vnvqSWWBTTbXB0R...

    • Mnooper profile image

      Mnooper 

      15 months ago

      Update to my last comment:

      New, edited script with different problems.

      In my last script I couldn't enter :town at all.

      In the updated script, I can reach :atkshop but when i enter a weapon name the game crashes.

      Secondly, I manage to get to :battle without problems. except, when i enter FIGHT, I one-shot the enemy, something that is not meant to happen. The rest works fine, (I believe, I haven't tested the full script yet)

      here is the link to the script:

      https://pastebin.com/XRvxtqZm

      HELP

    • Mnooper profile image

      Mnooper 

      15 months ago

      I need help with my script!

      I know that you need my script in order to help, but

      1)It is over 8192 chars

      2)It has greater/lesser than symbols, which are not allowed in comments.

      so instead please follow this link:

      https://pastebin.com/hjyLV8W5

      i has my script in it

      my problem is that whenever the script reaches :battle it crashes and i dont know why.

      any help or tips? i will be checking daily.

    • Mnooper profile image

      Mnooper 

      15 months ago

      George, when you click 'Save as', rename your file to whatever you want to call it, and put .bat at the end, making sure it is saved with All Files. Hope this helps!

    • profile image

      George 

      15 months ago

      what if when I saved it it's not a .bat file ? even if i saved it with ALL FILES ??? pls answer this

    • Mnooper profile image

      Mnooper 

      15 months ago

      I have seen a lot of people complaining that this 'isn't a real game' 'a waste of time' etc.

      this is a TEXT BASED game, meaning that it only uses text to describe what is happening. If you want a game using graphics and controls, I recommend following either of the following links: https://unity3d.com/ or https://www.yoyogames.com/gamemaker

      I have also seen a lot of 'how to test??!?!!?!'. First, save your work, preferably onto your desktop, as 'My Game.bat'. Second, double click the file you just created to run it.

      A few comments say 'How to add characters' etc. you just make them up, then create dialogue as them any time in the script. You might want to change the color of the text for every different character that speaks (Note: you have to 'pause' inbetween each character talking, otherwise all the text will be the same color!)

      hopefully this helps,

      -Mnooper

    • profile image

      Ahmad 

      16 months ago

      Wonderful! Clear and simple teaching. THANK YOU SO MUCH!

      But how can I add audios and videos to notepad as I want to make a multiple choice e-test including listening parts. And kindly tell me how to make self graded ind include and save the data of the users side by side with their scores.

    • profile image

      Brian 

      16 months ago

      Thanks! Because of this tutorial i made a game, and a program inspired by notepad; doodle pad!

      thank you!

    • profile image

      genesis solomon 

      16 months ago

      can i add a song to the program on notepad if yes how

    • profile image

      muneeb 

      16 months ago

      good i like it

    • profile image

      Aniket kumar 

      17 months ago

      its good

    • profile image

      mayilen 

      17 months ago

      how do i start the game

    • profile image

      Tony 

      17 months ago

      Thanks for this how can I make more efficient program

    • profile image

      Alec M.M. 

      17 months ago

      Is it possible to make the game fullscreen?

    • profile image

      nati 

      17 months ago

      Hi.

      Can you help me after I do the code how can I test it plz. Help me

    • profile image

      Hamzat 

      17 months ago

      If i want to add hello my name is omar how do i do it

    • profile image

      Lance 

      18 months ago

      whenever I try to go to a scenario it just closes the screen. I've checked the code, its right, but it just closes the game

    • profile image

      ryan 

      18 months ago

      how to creat esecute name for standart game for PC?

    • profile image

      nandan 

      18 months ago

      awesome

    • profile image

      Mnm 

      18 months ago

      Wow, This was a very goodd tutorial on how to create a game via notepad...But when I made one, it was like, I am not able to go In the second situation even I'd I type the second option... I have written all Codes in order...Plz help

    • profile image

      Bilal 

      18 months ago

      Hey, so.

      I don't understand the %where% part.

      I made a little thing where the guy had to lie or tell the truth, and before closing, I receive a message saying "unexpected answer was given.

      At least, I think that's what it said.

    • profile image

      Ediare festus 

      18 months ago

      Is it only the notepad or cmd because i am seeing both cmd codes and notepad

    • profile image

      VIVEK 

      18 months ago

      COOL

    • profile image

      Abhishek sharma 

      18 months ago

      Can i write everything in small letter or i have to write with capital also

    • profile image

      Ethan Redfern 

      18 months ago

      I knew you could do this but I just needed to be reminded of the set /p part, but thx anyway

    • profile image

      Baozar 

      19 months ago

      Please I want to know if we can also add pictures and images. For example, can we add the picture of a mountain or a town or a swamp like in d example above??

      Thanks in advance

    • profile image

      Akash 

      19 months ago

      It's very nice to learn the programing from this site thanks for teach me Google

    • profile image

      Jambob 

      19 months ago

      Thank you I have prompt my Fred's that I will be making a game

    • profile image

      Erik 

      19 months ago

      How do you run the game after coding g it?

      Any help please

    • profile image

      Bigdyork 

      19 months ago

      I was wondering if i could use this type of coding to make an business application for collection info from clients. I would like to write it myself. As a career coach, there are a lot off things that need to be documented and used to print out the info. Can you help me?

    • profile image

      Edri Kopliku 

      20 months ago

      Very cool!!!!!! I followed your steps and I made very cool games! Thanks really much!!!

    • profile image

      lol 

      20 months ago

      IT is showing Who is not recognized as an internal or external windows batch file because i tried putting who instead of where...what shud i do?

    • profile image

      mansoor shariff 

      20 months ago

      i have just made a program but i am able to go full that is not able to run properly so now what to do...

    • profile image

      Mikael 

      21 months ago

      I couldn't get my to run properly

    • profile image

      How do I play my game? 

      21 months ago

      How do I play my game?

    • profile image

      Michael 

      21 months ago

      How do u actually run the game ?

    • profile image

      Ahmerd Sir'eed 

      22 months ago

      It was awesome. I never thought of Notepad doing this great job thanks for sharing

    • profile image

      sahil 

      22 months ago

      how to open our game?

    • profile image

      matiw 

      22 months ago

      wow nice

    • profile image

      Scott Meckley 

      23 months ago

      I'm curious if this will work in making my own dice game.

    • profile image

      Guest77718364 

      23 months ago

      There's A Cool Guy In This Website!!!!

    • profile image

      Anuj 

      23 months ago

      After writing these codes how should i run it

    • profile image

      2 years ago

      this site is gave me a knowledge of game programing in noteped

    • profile image

      Dreger 

      2 years ago

      @echo off

      :start

      cls

      title text adventure 1

      echo.

      echo by Dreger

      echo.

      pause

      echo Hello adventurer!

      echo.

      pause

      echo What is your name?

      echo.

      set /p name=

      echo.

      echo Hello %name%, my name is Dreger

      echo.

      pause

      echo This is my first game, so there may be some bugs

      echo.

      echo Are you ready?

      echo.

      set /p variable=

      echo.

      cls

      if %variable%==yes goto Chapter 1

      if %variable%==no goto start

      :Chapter 1

      echo.

      echo Chapter 1

      echo.

      echo.

      echo You wake up.

      echo.

      pause

      cls

      echo You see a computer and a bright wall in front of you. After a moment,

      echo you realize you are in your office cubical. You see on your shirt a badge.

      echo.

      echo %name%

      echo.

      :Company

      echo What company do you work for?

      echo.

      set p/ company=

      echo %company% is the company you work for?

      if %company%==yes goto Age

      if %company%==no goto Company

      :Age

      echo.

      echo How old are you?

      echo.

      set p/ age=

      echo So you are %age% years old?

      set /p dem=

      if %dem% equ yes goto Continuing

      if %dem% equ no goto :Age

      :Continuing

      echo. So you work at %company% and are %age% years old?

      set p/ regis=

      if %regis% equ yes goto Finally

      if %regis% equ no goto Company

      pause

      cls

      :Finally

      echo You see your computer screen has information about a virus that is being used to cure cancer.

      pause

      echo You read "Measles virus being engineered to cure cancer." When you scroll down a bit, you read

      echo "Virus is mutating and attacking brain cells instead of the cancer cells. The virus has recently

      echo been discovered to be airborne and is transmitted by bodily fluids."

      pause

      echo You see a bunch of comments on the article and one says "AVOID GETTING BIT AT ALL COSTS!!!"

      echo Another "Fill up your bathtubs, bottles, and everything with water. And board up your homes!"

      echo.

      pause

      cls

      :Chapter 2

      echo Chapter 2

      echo see ya tommorow

      pause

      exit

      It likes to clode automatically at "you wake up"

    • profile image

      taj 

      2 years ago

      this doesn't work and is a wast of time :(

    • profile image

      Moose_pants 

      2 years ago

      @echo off

      color 70

      :stage 00

      cls

      title ZOMBOCALYPSE

      echo.

      echo Welcome Survivor...

      echo.

      echo Please enter your name:

      echo.

      set /p name=

      echo.

      echo Welcome %name%

      pause

      :stage 01

      @echo off

      cls

      echo.

      echo

      echo.

      echo You wake up in an empty room

      echo.

      echo There is a knife on the floor, and a door to your left.

      echo.

      echo What do you want to do?

      echo.

      echo PICK UP KNIFE, or OPEN DOOR

      echo.

      set /p what=

      echo.

      if %what% equ PICK UP KNIFE goto stage 02

      if %what% equ OPEN DOOR goto stage 03

      :stage 02

      @echo off

      cls

      echo.

      echo You pick up the knife and turn towards the door

      echo.

      pause

      :stage 03

      @echo off

      cls

      echo.

      echo You open the door and a zombie springs on you!

      echo.

      echo Too bad you dont have a weapon to defend your self!

      echo.

      echo ~~~YOU HAVE DIED~~~

      echo.

      echo

      echo.

      echo Enter 'r' to restart, or 'e' to exit

      echo.

      set /p choose=

      echo.

      if %choose% equ r goto stage 00

      if %choose% equ e exit

      pause

      for some reason that script automatically closes after I do the first choice. do you know why?

    • profile image

      Moose_pants 

      2 years ago

      Alex, i dont know if you still check theses messages, but i was wondering if you could help me out with my scripting with notepad++. i found an error that i cant solve...

    • profile image

      Sumit 

      2 years ago

      hey alexander king how games like FIFA 17 are made ?

    working

    This website uses cookies

    As a user in the EEA, your approval is needed on a few things. To provide a better website experience, owlcation.com uses cookies (and other similar technologies) and may collect, process, and share personal data. Please choose which areas of our service you consent to our doing so.

    For more information on managing or withdrawing consents and how we handle data, visit our Privacy Policy at: https://owlcation.com/privacy-policy#gdpr

    Show Details
    Necessary
    HubPages Device IDThis is used to identify particular browsers or devices when the access the service, and is used for security reasons.
    LoginThis is necessary to sign in to the HubPages Service.
    Google RecaptchaThis is used to prevent bots and spam. (Privacy Policy)
    AkismetThis is used to detect comment spam. (Privacy Policy)
    HubPages Google AnalyticsThis is used to provide data on traffic to our website, all personally identifyable data is anonymized. (Privacy Policy)
    HubPages Traffic PixelThis is used to collect data on traffic to articles and other pages on our site. Unless you are signed in to a HubPages account, all personally identifiable information is anonymized.
    Amazon Web ServicesThis is a cloud services platform that we used to host our service. (Privacy Policy)
    CloudflareThis is a cloud CDN service that we use to efficiently deliver files required for our service to operate such as javascript, cascading style sheets, images, and videos. (Privacy Policy)
    Google Hosted LibrariesJavascript software libraries such as jQuery are loaded at endpoints on the googleapis.com or gstatic.com domains, for performance and efficiency reasons. (Privacy Policy)
    Features
    Google Custom SearchThis is feature allows you to search the site. (Privacy Policy)
    Google MapsSome articles have Google Maps embedded in them. (Privacy Policy)
    Google ChartsThis is used to display charts and graphs on articles and the author center. (Privacy Policy)
    Google AdSense Host APIThis service allows you to sign up for or associate a Google AdSense account with HubPages, so that you can earn money from ads on your articles. No data is shared unless you engage with this feature. (Privacy Policy)
    Google YouTubeSome articles have YouTube videos embedded in them. (Privacy Policy)
    VimeoSome articles have Vimeo videos embedded in them. (Privacy Policy)
    PaypalThis is used for a registered author who enrolls in the HubPages Earnings program and requests to be paid via PayPal. No data is shared with Paypal unless you engage with this feature. (Privacy Policy)
    Facebook LoginYou can use this to streamline signing up for, or signing in to your Hubpages account. No data is shared with Facebook unless you engage with this feature. (Privacy Policy)
    MavenThis supports the Maven widget and search functionality. (Privacy Policy)
    Marketing
    Google AdSenseThis is an ad network. (Privacy Policy)
    Google DoubleClickGoogle provides ad serving technology and runs an ad network. (Privacy Policy)
    Index ExchangeThis is an ad network. (Privacy Policy)
    SovrnThis is an ad network. (Privacy Policy)
    Facebook AdsThis is an ad network. (Privacy Policy)
    Amazon Unified Ad MarketplaceThis is an ad network. (Privacy Policy)
    AppNexusThis is an ad network. (Privacy Policy)
    OpenxThis is an ad network. (Privacy Policy)
    Rubicon ProjectThis is an ad network. (Privacy Policy)
    TripleLiftThis is an ad network. (Privacy Policy)
    Say MediaWe partner with Say Media to deliver ad campaigns on our sites. (Privacy Policy)
    Remarketing PixelsWe may use remarketing pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to advertise the HubPages Service to people that have visited our sites.
    Conversion Tracking PixelsWe may use conversion tracking pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to identify when an advertisement has successfully resulted in the desired action, such as signing up for the HubPages Service or publishing an article on the HubPages Service.
    Statistics
    Author Google AnalyticsThis is used to provide traffic data and reports to the authors of articles on the HubPages Service. (Privacy Policy)
    ComscoreComScore is a media measurement and analytics company providing marketing data and analytics to enterprises, media and advertising agencies, and publishers. Non-consent will result in ComScore only processing obfuscated personal data. (Privacy Policy)
    Amazon Tracking PixelSome articles display amazon products as part of the Amazon Affiliate program, this pixel provides traffic statistics for those products (Privacy Policy)