Skip to main content

How to Make a Video Game With Cmd


Here is a free, easy, no-download way
to make a video game. You will learn a
little bit about batch programming in
the process. You'll need to supply your
own story to go with this game.
Steps
Anything in apostrophes can
be changed, it won't affect
the game - don't accidentally
type it in to the actual code.
Open Notepad or any other
coding programs-Geany,
Notepad++, etcetera. Save the
file as ‘My Game’.bat
Start the Code. Start by
typing:
@echo off
title ‘My Game’
color 0A
if "%1" neq "" ( goto %1)
pause
Add Colours. Now save it and
run, it will come up with an
error and all the different colour
combinations. Find the one you
like and type it in after “color”,
instead of “zz”. A good
combination is color 0A, it makes
the text green and the
background black.
Create the Menu. To create
the menu get rid of pause
and type in:
:Menu
cls
echo ‘1. Start’
echo ‘2. Instructions’
echo ‘3. Exit’
set /p answer=‘Type the
number of your option and
press enter.’
if %answer%==1 goto
‘Start_1’
if %answer%==2 goto
‘Instructions’
if %answer%==3 goto ‘Exit’
Creating ‘Exit’ and
‘Instructions’. To create the
exit screen type in this:
:‘Exit’
echo Thanks for playing !
exit /b
Now for the instructions
type in:
:‘Instructions’
cls
echo ‘Instructions’
echo.
Then write:
echo ‘Your instructions
here’
As many times as you like
then type:
pause
goto Menu
Begin the game. Type in a
scenario:
:Start_1
cls
echo ‘You have run into bad
guys. Their forces are:’
echo ‘3 farmers’
echo ‘You have a high
chance of winning.’
set /p answer=‘Would you
like to fight or run?’
if %answer%==‘Fight’ goto
‘Fight_1’
if %answer%==‘Run’ goto
‘Run_1’
Fighting and Running. Now
to make fighting and
running:
:Run_1
cls
echo You ran away safely !
pause
goto ‘Start_1’
:Fight_1
echo You have chosen to
fight.
echo The battle is waging.
set /p answer= Type
number 1 and press enter
to continue:
if %answer%==1 goto
Fight_1_Loop
:‘Fight_1_Loop’
set /a num=%random%
if %num% gtr 4 goto
‘Fight_1_Loop’
if %num% lss 1 goto
‘Fight_1_Loop’
if %num%==1 goto
‘Lose_Fight_1’
if %num%==2 goto
‘Win_Fight_1’
if %num%==3 goto
‘Win_Fight_1’
if %num%==4 goto
‘Win_Fight_1’
:‘Lose_Fight_1’
cls
echo Sorry, you lost the
battle :(
pause
goto Menu
:‘Win_Fight_1’
cls
echo Congrats, you won the
fight!
set /p answer=‘Would you
like to save?’
if %answer%==‘Yes’ goto
‘Save’
if %answer%==‘No’ goto
‘Start_2’
:‘Save’
goto ‘Start_2’
Now you can repeat the
code used in ‘Start_1’ to
create a second fight and
a third and fourth and so
on.
Also when you type
e.g. :Fight_1 you also have
to make sure that parts
that say goto Fight_1 stay
the same as each other so
if you change one you have
to change both.
Just close the notepad, then
click yes, save the file,
change the format to all file,add
.bat after you type the name.

Comments

Popular posts from this blog

How To Upload & Publish Android Apps For Free

Upload Android Apps Free There are many independent Android app developers out there who design, code and test the apps they have been working on only to find out that Google charge a $25 to sign up as a developer and publish to  Google Play , previously known as  Android Market . There are also independent developers out there who haven't relied upon pure development but have chosen to use free third party app building services and are also looking to publish their app for free. What many of them don't realize is that  Google Play  is most certainly not the only Android Market and not all of them charge a fee. An excellent alternative market which was actually in existence before Google Play/Android Market is French Android App Market,  SlideMe . Anyone can sign up at SlideMe  as a developer and can upload their Android apps for free. Although you must register as a developer first, there are no fees charged, you can sell your app for a price if you so wis...

Recover Hard Drive Password

4 Unlock and Recover Hard Drive Password with Hard Disk Password Removal Tool  Is there any software to recover hard drive disk password? Where to download hard drive password cracker? Is it possible to reset the hard drive password? According to Lenovo and many other manufacturers’ website, if you forget your hard drive or hard disk password, there is no possible way to reset your password or recover data in the hard disk drive. Basically the hard drive is unusable. However, this is often not true. Most people are not aware that most hard disk drives have the ability to set a hardware password, just like the Bios password for motherboards, thus making the drive completely inaccessible unless a correct password is provided during the BIOS POST test. Usually these features can only be found in laptops, this is when you set a password on your notebook, the hard drive together with the motherboard becomes locked. All software tested and works on Seagate, Hitachi, Toshiba and Western D...

{WORKING} Twerk It VPN Trick for airtel Free internet on android - Airtel high-speed free 3g-4g internet trick with Tewakware vpn app - October 2016

Hi guys, Today tectochangetheworld.blogspot.com introducing one more VPN app to the free internet tricks category. The latest free internet giving vpn app called   Twerk It VPN app . Its also called as  tweakware vpn handler . This is an android vpn app and therefore this trick work only for airtel android users. In this article, we are providing the ' free internet trick using twerk it vpn handler for android users ' . The latest vpn app Twerk it VPN is very clean and easy to use. The very interesting this that we found in this latest vpn handler is, they have many high-speed free servers. Yeah, many of our techintor fans are messaging us that the free internet tricks are very slow and also they can't enjoy true 4g or 3g with this free internet tricks. But guys, this low-speed problem is solved by this new twerk It VPN handler. This time,  we are sharing some working free internet settings of twerk it vpn for getting free internet on your airtel sim here . You can d...