SHOOTER DEMO ASCII Batch File Game

by ZOINX in Craft > Digital Graphics

21 Views, 0 Favorites, 0 Comments

SHOOTER DEMO ASCII Batch File Game

spud wars image.png
Capture d’écran 2025-04-14 152903.png

A batch file is a script of Command Prompt commands compatible with all Windows computers and which inherits basically everything from the olden days of MS-DOS. They are saved in .bat or .cmd files and are edited in Notepad like any other text [.txt] file.

This particular batch file game is a silly little demonstration of the CHOICE command! What's interesting about this command is that the HELP command doesn't show it, yet CMD still yields results for CHOICE /?.

There's a little bit of plot, some QUALITY ASCII graphics, and there's a built-in leader-board feature which relies on one (1) text file.

These instructions are for those who want to know how to play this little thing on their own computer!

Normally, Windows flags batch files that you try to download - and with reason, since even if they're not viruses per se, some batch files can be designed to modify or delete things on your computer that you might not want to modify or delete - but rest assured that this file does none of that! It only exists, lets you play a very short game when you run it, and creates a leader-board in a .txt file.

This is why these instructions won't ask you to download anything, but instead copy-paste the code into Notepad. You'll see ;p

Health Notice: The colours may very well go from very dim to very bright. If this may be problematic for you, close your eyes before shooting the building, and count to 10 before opening your eyes again.

Copyright Notice: This software is free to download, modify and distribute - you can even use it in your own batch files! - but no matter what else you do with it, I ask that you leave the credits to Nam Progs and to ZOINX in this segment's code.

Alrighty, that's everything, time for instructions!

Supplies

You will need:

  1. A Windows computer newer than, IDK, Windows Vista probably (which, by some marginal chance you're using something older than Vista, props to you but I hope you have a newer alternative! Even YouTube doesn't run on Vista/IE anymore!)
  2. Like, 5 minutes of your day

Copy-paste!

Capture d’écran 2025-04-14 163013.png

I am going to paste the whole code below. For this step, you will open an new file in Notepad and copy-paste all of that code into it. I'm using Windows 11 [I was forced to upgrade! >:c] so it looks like in the picture, but it might be slightly different for you, and that's fine.

@echo off
title SPUD WARS!
set col=1a
color %col%

REM by ZOINX on instructables - April 2025
REM Idea by NAM Progs (c) 2017-2018

:sstart
cls
echo.
echo ~ SPUD WARS! ~
echo.
echo START *
echo COLOURS
echo EXIT
echo.
choice /n /c:se /m:"W for up; S for down; E to select"
if %errorlevel%==2 ( goto intro )

:selectedc
cls
echo.
echo ~ SPUD WARS! ~
echo.
echo START
echo COLOURS *
echo EXIT
echo.
choice /n /c:wse /m:"W for up; S for down; E to select"
if %errorlevel%==1 ( goto sstart )
if %errorlevel%==2 ( goto selectede )
if %errorlevel%==3 ( goto colours )

:selectede
cls
echo.
echo ~ SPUD WARS! ~
echo.
echo START
echo COLOURS
echo EXIT *
echo.
choice /n /c:we /m:"W for up; S for down; E to select"
if %errorlevel%==2 ( exit )
goto selectedc

:colours
cls
echo.
echo ~ Pick a colour scheme! ~

REM These IF statements print "Colour Name [Current]" only if it's the active colour scheme
if "%col%" == "1a " ( echo 1. Night Life [Default] [Current] ) else ( echo 1. Night Life [Default] )
if "%col%" == "02 " ( echo 2. Apple II [Current] ) else ( echo 2. Apple II )
if "%col%" == "1b " ( echo 3. Panic [Current] ) else ( echo 3. Panic )
if "%col%" == "b5 " ( echo 4. Code Sky [Current] ) else ( echo 4. Code Sky )
if "%col%" == "5b " ( echo 5. Code Neon [Current] ) else ( echo 5. Code Neon )
if "%col%" == "0f " ( echo 6. Starry Night [Current] ) else ( echo 6. Starry Night )
if "%col%" == "f0 " ( echo 7. Typewriter [Current] ) else ( echo 7. Typewriter )
echo 8. Go Back!
echo.
choice /n /c:12345678 /m:"Pick a number from 1 to 8!"
if %errorlevel%==1 ( set col=1a )
if %errorlevel%==2 ( set col=02 )
if %errorlevel%==3 ( set col=1b )
if %errorlevel%==4 ( set col=b5 )
if %errorlevel%==5 ( set col=5b )
if %errorlevel%==6 ( set col=0f )
if %errorlevel%==7 ( set col=f0 )
if %errorlevel%==8 ( goto selectedc )
color %col%
goto colours

:intro
REM Game start
set ctr=11
cls
echo The year is 20XX...
ping localhost -n 3 >nul
echo The Sadistic Potato Union of Destruction (S.P.U.D.) has
echo threatened New Antarctica for far too long...
ping localhost -n 4 >nul
echo.
echo But YOU have found their weakness!
ping localhost -n 2 >nul
echo And you have been authorized by President Farthead to
echo destroy their lair, or their Secret Terrain
echo Allowing Civilian Harm (S.T.A.R.C.H.), as they
echo call it...
ping localhost -n 3 >nul
echo.
choice /n /c:s /m:"Press S to get Started!"
cls
goto center1

REM S for shoot, P for pass
REM The points start at 11 and go down by one every time you pass over the centre so that the maximum amt of points you can win is 10 - i did not set a minimum because one time i got -16000 ish points and that was hilarious

:center1
REM Aim Center going Right
set/a ctr=%ctr%-1
cls
echo.
echo.
echo !
echo -[+]-
echo !
echo ___________
echo /! STAR*CH !
echo !! # # # !
echo !! !
echo !! # # # !
echo ___________\!___[]____!___________
echo ,, '''' ,, '''' ,,
echo '' '' '' ''
echo ', " _ " ,'
choice /n /c:sp /t:1 /d:p /m:"QUICK! Press S to shoot!"
if %errorlevel%==1 ( goto hit )
if %errorlevel%==2 ( goto right )

:right
cls
echo.
echo.
echo.
echo !
echo -[+]-
echo ___________ !
echo /! STAR*CH !
echo !! # # # !
echo !! !
echo !! # # # !
echo ___________\!___[]____!___________
echo ,, '''' ,, '''' ,,
echo '' '' '' ''
echo ', " _ " ,'
choice /n /c:sp /t:1 /d:p /m:"QUICK! Press S to shoot!"
if %errorlevel%==1 ( goto missr )
if %errorlevel%==2 ( goto center2 )

:center2
REM Aime Center going left
set/a ctr=%ctr%-1
cls
echo.
echo.
echo !
echo -[+]-
echo !
echo ___________
echo /! STAR*CH !
echo !! # # # !
echo !! !
echo !! # # # !
echo ___________\!___[]____!___________
echo ,, '''' ,, '''' ,,
echo '' '' '' ''
echo ', " _ " ,'
choice /n /c:sp /t:1 /d:p /m:"QUICK! Press S to shoot!"
if %errorlevel%==1 ( goto hit )
if %errorlevel%==2 ( goto left )

:left
cls
echo.
echo.
echo.
echo !
echo -[+]-
echo ! ___________
echo /! STAR*CH !
echo !! # # # !
echo !! !
echo !! # # # !
echo ___________\!___[]____!___________
echo ,, '''' ,, '''' ,,
echo '' '' '' ''
echo ', " _ " ,'
choice /n /c:sp /t:1 /d:p /m:"QUICK! Press S to shoot!"
if %errorlevel%==1 ( goto missl )
if %errorlevel%==2 ( goto center1 )

:missl
cls
echo.
echo.
echo.
echo.
echo [MISS!]
echo ___________
echo /! STAR*CH !
echo !! # # # !
echo !! !
echo !! # # # !
echo ___________\!___[]____!___________
echo ,, '''' ,, '''' ,,
echo '' '' '' ''
echo ', " _ " ,'
color e4
ping localhost -n 3 >nul
color %col%
echo You missed! %random%00 civilians dead.
ping localhost -n 2 >nul
echo You go down in history as a monster.
ping localhost -n 2 >nul
echo But what if things had gone down differently?
ping localhost -n 3 >nul
choice /n /c:m /m:"Press M to go back to the Menu!"
goto sstart

:missr
cls
echo.
echo.
echo.
echo.
echo [MISS!]
echo ___________
echo /! STAR*CH !
echo !! # # # !
echo !! !
echo !! # # # !
echo ___________\!___[]____!___________
echo ,, '''' ,, '''' ,,
echo '' '' '' ''
echo ', " _ " ,'
echo.
color e4
ping localhost -n 3 >nul
color %col%
echo You missed! %random%00 civilians dead.
ping localhost -n 2 >nul
echo You go down in history as a monster.
ping localhost -n 2 >nul
echo But what if things had gone down differently?
ping localhost -n 3 >nul
choice /n /c:m /m:"Press M to go back to the Menu!"
goto sstart

:hit
REM animation and message
cls
echo [FIRE!]
echo.
echo.
echo [ ]
echo.
echo ___________
echo /! STAR*CH !
echo !! # # # !
echo !! !
echo !! # # # !
echo ___________\!___[]____!___________
echo ,, '''' ,, '''' ,,
echo '' '' '' ''
echo ', " _ " ,'
ping localhost -n 2 >nul
cls
echo [FIRE!]
echo.
echo.
echo.
echo []
echo ___________
echo /! STAR*CH !
echo !! # # # !
echo !! !
echo !! # # # !
echo ___________\!___[]____!___________
echo ,, '''' ,, '''' ,,
echo '' '' '' ''
echo ', " _ " ,'
ping localhost -n 2 >nul
cls
echo [FIRE!]
echo.
echo.
echo.
echo.
echo _____#_____
echo /! STAR*CH !
echo !! # # # !
echo !! !
echo !! # # # !
echo ___________\!___[]____!___________
echo ,, '''' ,, '''' ,,
echo '' '' '' ''
echo ', " _ " ,'
ping localhost -n 2 >nul
cls
color e4
echo [HIT!]
echo ~
echo ,,
echo ; _
echo / /
echo / (
echo ( )
echo ) (
echo " ,,
echo //__' ; /!
echo ___________\#/__\/\_/_!___________
echo ,, '''S ,,A '''' ,,H
echo * '' ''R '' ''
echo ', " T _ C " ,'
ping localhost -n 3 >nul
color 80
ping localhost -n 3 >nul
cls
color %col%
echo [HIT!]
echo ~
echo ,,
echo ; _
echo / /
echo / (
echo ( )
echo ) (
echo " ,,
echo //__' ; /!
echo ___________\#/__\/\_/_!___________
echo ,, '''S ,,A '''' ,,H
echo * '' ''R '' ''
echo ', " T _ C " ,'
echo.
echo Mission success!
ping localhost -n 2 >nul
echo S.P.U.D. will think twice about
ping localhost -n 2 >nul
echo messing with Antarctica now!
ping localhost -n 2 >nul
echo %random% lives saved!
ping localhost -n 3 >nul
choice /n /c:l /m:"Press L to procede to the Leaderboard."

:lead
REM learderboard init and add new winner's name
set name=PLAYER
cls
if exist "shootlead.log" ( type "shootlead.log" ) else (
echo ~ WINNER'S BOARD ~>>"shootlead.log"
)
set/p name=YOUR NAME:
echo %name% - %date% - %ctr% PTS >>"shootlead.log"
goto leadru

:leadru
REM displays leaderboard
cls
type "shootlead.log"
echo.
echo RETURN TO MENU *
echo EXIT
choice /n /c:se /m:"W for up, S for down; E to Select."
if %errorlevel%==1 ( goto leadrd )
if %errorlevel%==2 ( goto sstart )

:leadrd
cls
type "shootlead.log"
echo.
echo RETURN TO MENU
echo EXIT *
choice /n /c:we /m:"W for up, S for down; E to Select."
if %errorlevel%==1 ( goto leadru )
if %errorlevel%==2 ( goto hapbye )

:hapbye
REM a lil treat for winning xd
cls
echo Goodbye! :D
ping localhost -n 3 >nul
exit

Save!

Capture d’écran 2025-04-14 155050.png

You can click File>Save As, or if this a new file you can just press the red X in the top right corner and click Save [or whatever it is in English - sorry!].

From there,

  1. Click on the File Type dropdown box and select Any File Type
  2. Click the Encoding dropdown box and select ANSI
  3. Change the title to shootit.bat [Or anything, so long as it ends in ".bat", since that's the file extension for batch files]
  4. Before you save it, remember to check where you saved it so that you don't lose it!
  5. Okay, now you can press Save xD

Run the File

Capture d’écran 2025-04-14 155457.png
Capture d’écran 2025-04-14 155647.png

As you can see, I saved my file as shootit.bat in a folder called batchdemo. It doesn't really matter that much for your end.

What's important is that you double-click the batch file and are greeted by this blue and green menu!

If that happens, it means I explained this well and that you followed these instructions well. Good job! As a reward, have a little game xD

Please note that the exact shade of blue and green, and the font, and the cursor, might be different on your computer. I have tinkered with mine to make it look a way that I like. If you're new to this, then you will have default colours and fonts; otherwise, you probably knew that already ;p

Thanks for reading and enjoy this lil' digital trinket!




Also I know this isn't the pinacle of digital graphics pls don't smite me Instructable gods