STEMAcademiaAgriculture & FarmingHumanitiesSocial Sciences

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

      kumaresan 3 days ago

      how to create new game

    • profile image

      ismail s jafo 2 weeks ago

      i got an idea

      thank

    • profile image

      sparky the cat190 2 weeks 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 2 weeks 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 2 weeks ago

      i like pizza

    • profile image

      sparky the cat190 2 weeks 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 3 weeks 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 3 weeks 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 3 weeks 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 3 weeks 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 3 weeks 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 4 weeks 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 4 weeks 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 4 weeks 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 4 weeks ago

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

      thank you!

    • profile image

      genesis solomon 5 weeks ago

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

    • profile image

      muneeb 7 weeks ago

      good i like it

    • profile image

      Aniket kumar 2 months ago

      its good

    • profile image

      mayilen 2 months ago

      how do i start the game

    • profile image

      Tony 2 months ago

      Thanks for this how can I make more efficient program

    • profile image

      Alec M.M. 2 months ago

      Is it possible to make the game fullscreen?

    • profile image

      nati 2 months ago

      Hi.

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

    • profile image

      Hamzat 2 months ago

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

    • profile image

      Lance 3 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 3 months ago

      how to creat esecute name for standart game for PC?

    • profile image

      nandan 3 months ago

      awesome

    • profile image

      Mnm 3 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 3 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 3 months ago

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

    • profile image

      VIVEK 3 months ago

      COOL

    • profile image

      Abhishek sharma 3 months ago

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

    • profile image

      Ethan Redfern 3 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 4 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 4 months ago

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

    • profile image

      Jambob 4 months ago

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

    • profile image

      Erik 4 months ago

      How do you run the game after coding g it?

      Any help please

    • profile image

      Bigdyork 5 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 5 months ago

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

    • profile image

      lol 5 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 5 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 6 months ago

      I couldn't get my to run properly

    • profile image

      How do I play my game? 6 months ago

      How do I play my game?

    • profile image

      Michael 6 months ago

      How do u actually run the game ?

    • profile image

      Ahmerd Sir'eed 7 months ago

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

    • profile image

      sahil 7 months ago

      how to open our game?

    • profile image

      matiw 7 months ago

      wow nice

    • profile image

      Scott Meckley 8 months ago

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

    • profile image

      Guest77718364 8 months ago

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

    • profile image

      Anuj 8 months ago

      After writing these codes how should i run it

    • profile image

      9 months ago

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

    • profile image

      Dreger 9 months 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 9 months ago

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

    • profile image

      Moose_pants 9 months 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 9 months 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 10 months ago

      hey alexander king how games like FIFA 17 are made ?

    • profile image

      Jonah 10 months ago

      hey so i was wondering how would i go about having more options depending on which choise you make? like if i chose to go one way i get a different story than going the other way. sorry if i worded this wrong.

    • profile image

      Tarushi 10 months ago

      my hobby are based on that part

      THANK YOU

    • profile image

      Lanz 10 months ago

      i have known that i trained it i dont need to search for that so no thanks.

    • profile image

      MOSARROW 11 months ago

      HOW DO I ADD CHARACTERS TO MY GAME

    • profile image

      vaibhav 13 months ago

      i copy your codes on notepad and save it as you instruct and then open it. its showing the codes only not the game

    • profile image

      Lino 13 months ago

      Wow, I'm getting inspired to make my very own game

    • profile image

      Cooper 14 months ago

      What do I do at the end do I save it as a batch file or what

    • profile image

      Abhimanyu 15 months ago

      Hey Good but my game is not working

    • profile image

      txt based game 16 months ago

      Here's a great example of a cmd game made using python!

      https://github.com/ckonjeti/TEXT-BASED-GAME/blob/m...

    • profile image

      anupam dodecha 16 months ago

      very very nice trick when i am getting bored or not having internet i use this to take intrest on pc

    • profile image

      muteeb 21 months ago

      hey its not working i have typed a program and copied it and pasted it on DOS but its not working i need help please guide me now what to do now

    • profile image

      somya 21 months ago

      amazing very good

    • profile image

      Tavor Wadsworth 21 months ago

      Hello. I did copy the program to see how it works and I can't seem to get the program to pause after choices A, B, and C in the SWAMP. The program displays the words for a split second and then automatically exits the game. How can I get the program to pause after each choice and then return to the start? Thanks for your help.

      @echo off

      color 21

      cls

      echo.

      echo Hello, what is your name?

      echo.

      set /p name=

      echo.

      title Name=%name%

      cls

      echo.

      echo Hello %name%, nice to meet you!

      echo.

      pause

      :start

      cls

      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% neq SWAMP goto start

      :swamp

      cls

      echo.

      echo Ok! Let's head to the swamp!

      color 47

      echo.

      echo Oh No %name%! There is a monster!

      echo.

      echo Do you...

      echo A) Kill The Monster?

      echo B) Run?

      echo C) Say hi to it?

      set /p Where=

      echo.

      if %Where% A goto A

      echo.

      if %Where% B goto B

      echo.

      if %Where% C goto C

      echo.

      cls

      pause

      :A

      echo.

      echo You grab a sword and stab the monster

      echo.

      echo you see a bag and pick it up. It contains 1000 gold Pieces

      echo.

      pause

      goto start

      :B

      cls

      echo life of pie

      pause

      goto start

      :C

      cls

      echo life of pie

      pause

      echo.

      goto start

      :town

      cls

      echo ok! Let's head to the town!

      echo.

      color 67

      pause

      :good

      cls

      echo.

      echo That's very good %name%, excellent work, however there is one more test you must pass....

      echo.

      pause

      cls

      echo.

      echo You must take this firearm and shoot the man with the bag on his head....

      echo.

      pause

      cls

      echo.

      echo *shoot man*, *shoot interigator* or *take off bag on man's head*

      echo.

      set /p where=

      echo.

      if %where% equ *shoot man* goto done

      if %where% equ *shoot interigator* goto nice

      if %where% equ *take off bag on man's head* goto incorrect

      if %where% neq *shoot man* goto good

      pause

      :done

      cls

      echo Excellent job %name%. You have done well.

      echo.

      color 12

      pause

      goto start

      :nice

      :incorrect

      :mountain

      cls

      echo ok! Let's head ot the mountain!

      echo.

      color 57

      pause

      exit

    • profile image

      $MONEY$ 22 months ago

      Fun fact: You do know if you get good at coding you can get 300 dollars for doing it

    • profile image

      Sakxam Devkota 23 months ago

      hey,,can't we create a non txt-based game in notepad ??

    • profile image

      Anurag Dhankar 24 months ago

      There are some other codings also.........like nul, timeout, etc. Please tell those codings also........thanks

    • profile image

      Mr Awesome/Tom Keir 24 months ago

      Thanks for the tips but when I try to run it but it just comes up with command prompt HELP ME!!!!!!!!!

    • profile image

      Anurag Dhankar 2 years ago

      I have two questions from you :- ( 1 ) How to set a time for a particular question or an echo. ( 2 ) How to add a sound file to this coding....................please tell me quickly as quick as you can.

    • profile image

      Guys 2 years ago

      How to set timing at echoes. Example, the echo 5 then after 1 second another echo will appear, echo 4...

    • profile image

      josh Lantry 2 years ago

      tell me what i am doing wrong

      :swamp

      cls

      echo Ok! Let's hed to the swamp!!

      echo.

      pause

      goto swamp location

      :swamp location

      cls

      echo.

      echo %name%!! There is a green boogey monster

      echo.

      echo Do you

      echo A) Kill The Monster

      echo B) Run

      echo C) Say hi to it

      set /p where

      echo.

      if %where% A goto A

      if %where% B goto B

      if %where% C goto C

      pause

      :A

      echo.

      echo You grab a sword and stab the monster

      echo.

      echo you see a bag and pick it up it contains 1000 gold Pieces

      pause

      goto Start

      :B

      cls

      echo life of pie

      pause

      goto start

      :C

      cls

      echo life of pie

    • profile image

      ba 2 years ago

      Nothing interesting

    • profile image

      ujjwal (virus maker) 2 years ago

      This is great. But can we save the game with .exe extension? Is there is any problem to open when I save with .exe?

    • profile image

      okfdopgks#[pkg 2 years ago

      Peter that wont work because you put exit so when they put 2 it will exit and nothing can stop it from closing down

    • profile image

      sun 2 years ago

      make money

    • profile image

      Peter 2 years ago

      @Adwyrtya that's because u gotta make sure to write pause; every class example: @echo off

      Title (title)

      Color (number)

      echo Welcome to this game

      echo what is 1+1

      echo.

      echo type 1 and enter to proceed

      set /p input=Enter Value:

      If %input%==1 goto game1

      if %input%==2 exit

      pause;

      so "pause;" is gonna be end of a class then it wont exit

    • profile image

      Adwyetya 2 years ago

      When I run the game, and type something it just exists.

    • profile image

      jawz8300 2 years ago

      so cool, thanks man

    • profile image

      iain 2 years ago

      thanks but how can you make it to where the player can save their progress

    • profile image

      anonymous 2 years ago

      Whenever i try making a game it just exits when.i get to the player typing something

    • profile image

      deep 2 years ago

      thank you guy!

    • profile image

      Peter Blomquist 2 years ago

      I have everything written down in notepad, but how do I get that into command prompt?

    • profile image

      Confused 3 years ago

      I can't get the option thing to work. Is there some kind of trick to it?

    • profile image

      Hemangi 3 years ago

      Its awesome......

    • Ahsam Ali profile image

      Ahsam Ali 3 years ago

      intressting

    • profile image

      nate 3 years ago

      at the end of mine here when i go to to say sleep in longer or the the other it just closes and says (set unexpected)

      echo off

      color 34

      :start

      cls

      title The Dead May Follow

      echo.

      echo hello

      echo.

      echo what is your name.

      echo.

      set /p name=

      echo.

      echo hello %name% im Nathan.

      echo.

      echo lets start.

      echo.

      echo you wake up in bed after finding out the night before your mother has died.

      echo.

      echo do you get dressed and go downstairs or do you sleep in longer.

      echo.

      set /p you=

      echo.

      if %you% equ get dressed and go downstairs goto get dressed and go downstairs

      if %you% equ sleep longer goto sleep longer

      if %you% neq sleep longer goto start

      if %you% neq get dressed and go downstairs goto start

      :get dressed and go downstairs

      cls

      echo.

      echo your the only one home

      echo.

      pause

      :sleep longer

      cls

      echo.

      echo you wake up its 11 o clock and nobody is home

      pause

      exit

    • JamesWhitaker profile image

      James N. Whitaker 3 years ago from Dallas, Texas

      This is cool. I am gonna try to create my own too. Let's see how it goes.

    • profile image

      Amideous 3 years ago

      Thanks a thousand times... I just created mine too.

    • profile image

      Joseph 3 years ago

      I just created my own text game! thank you so much for your help

    • profile image

      bfilipek 3 years ago

    • profile image

      abhash rai 3 years ago

      How can I make a graphic game?

      Can I make a graphic game with notepad or c++???

      If yes , then how??

    • Thief12 profile image

      Thief12 3 years ago from Puerto Rico

      When I was in college, we used to play two "batch" games all the time. Nibbles and Gorillas XD The good ole' days.

    • profile image

      bfilipek 3 years ago

      Cool idea. I did not know that with only bash/cmd you can do such things. Probably even more could be created using PowerShell scripts. Do you is PowerShell as well ?

    • profile image

      Aafreen 3 years ago

      very cool..its interesting..

      keep it up..

      update this using new and advanced commands..

      it'll be very helpful to all.. u r great..THANK YOUUUUUUUUUUUUUUUUU SOOOOOOOOOOOOOOOOO MUCHHHHHHHHHHHHHHHHHHHHHH............

    • profile image

      Zachariah 3 years ago

      How do I make a webpage to make decision like on batch?

    • profile image

      Zachariah 3 years ago

      Please can I view my program on webpage? If yes how?