Create Your Own Game Using Notepad
Now you
must be having some knowledge about the Batch Programming after reading my
previous post. Using some commands from the Batch Programming we can create
some simple and amazing games of our own
To create your own Batch game, you should follow these easy steps:
To create your own Batch game, you should follow these easy steps:
o
Decide the
story-line of the game: You
should draw a sketch of how your game will work. Remember, creating games in
Batch script has limitations. You will not be able to create more of a game
than a text-based game. It can be a quiz or a scenario game, but you will have
only text. As to whether or not you want to have ASCII graphics is up to you,
but the game will still be based entirely on text input.
o
Learn the
Script and Commands: Batch script is not very hard
to learn. You should have some knowledge about some important Batch Codes. Some
of them are as follow:
echo
|
To display a message on the screen
|
title
|
To give a name to the title bar of
the window
|
color
|
To set the color of the background
and the text
|
ping localhost -n 5 >nul
|
To delay the execution of the
following command by 5 seconds [you can change the value]
|
set
|
To declare a variable
|
if
|
The if command is used to determine
what will happen if a certain event occurs. After the if statement (if
[something]), a command follows.
|
cls
|
To clear the screen
|
goto
|
To go to the label mentioned [goto
Label] and execute the block under the label.
|
:Label
|
To create a label. That is to provide
a name/tag to a block of the program. [you can name it anything, even :a].
|
pause
|
To pause the execution and ask the
user to press any key to continue.
|
0 comments:
Post a Comment