Uchiha Madara Administrator
Posts : 58 Join date : 2010-08-05 Age : 32 Location : Belgrade
| Subject: Simple DOS Game Tutorial Thu Sep 16, 2010 1:54 am | |
| This is a simple tutorial where you can learn to create the simple DOS game using only notepad.This is batch file game and when you finish programming you need to save it as .bat Here is the code: - Code:
-
@echo off color 12 :menu cls echo Hello, Welcome to game made by Necez Corporation! echo what would you like to do? echo 1) start echo 2) instructions echo 3) exit set /p letter=
if %letter% == 1 goto startgame if %letter% == 2 goto instruction if %letter% == 3 goto exit :startgame cls echo level 1 echo Hello! enter your name: set /p name= echo Hello %name%! echo How are you set /p lala= echo You are feeling %lala%? echo that's nice. pause echo I should go now. echo Bye %name% !!! echo next level? (yes or no) set /p walla=
if %walla% == yes goto lvl2 if %walla% == no goto menu goto startgame :exit exit goto exit :lvl2 cls echo level 2 echo Hello! Your name is %name%? yes or no set /p yn=
if %yn% == yes goto cool if &yn& == no goto aaw goto lvl2 :cool echo Yay! i got it right echo back? (y/n) lower case only! set /p ynny=
if %ynny% == y goto menu if %ynny% == y goto exit goto cool :aaw echo thats too bad. echo bye! pause exit goto aaw :instruction echo answer the computer and the computer will talk echo to you echo back? (y/n) lower case only! set /p nyyn=
if %nyyn% == y goto menu if %nyyn% == n goto exit goto inctruction | |
|