Solved How to create a Simple Bat File Game Console

February 17, 2017 at 02:12:32
Specs: Windows 8.1
How to create a Simple Batch File Game Console
Here is the code to do so & it's Copyrighted.
@ECHO OFF
TITLE TEST GAME CONSOLE
COLOR 9B
:INFO
CLS
ECHO GAME CONSOLE MADE BY: PANTHER GAMES: DATE MADE: @2015
PAUSE>NUL
ECHO THE GAME SEARCH ENGINE MADE BY: DIZK
PAUSE>NUL
ECHO THE DATABASE FOR THE MEMORY CARD MADE BY: ARTECH PRODUCTIONS
CALL :WELCOME

:WELCOME
PAUSE>NUL
CLS
TITLE TGC: WELCOME
PAUSE>NUL
ECHO WHAT WOULD YOU LIKE TO DO FIRST?
ECHO 0) EXIT
ECHO 1) CREATE A USERNAME
ECHO 2) LOGIN
ECHO 3) GUEST
SET HI=NOACTION
SET /P HI=
IF %HI%==0 EXIT
IF %HI%==1 CALL :CAU
IF %HI%==2 CALL :LOGIN
IF %HI%==3 CALL :GUEST
IF NOT %HI%==0 CALL :WELCOME
IF NOT %HI%==1 CALL :WELCOME
IF NOT %HI%==2 CALL :WELCOME
IF NOT %HI%==3 CALL :WELCOME

:CAU
PAUSE>NUL
CLS
TITLE TGC: CREATE A USERNAME
PAUSE>NUL
ECHO WHAT IS YOUR EMAIL ADDRESS?
SET /P EMAIL1=">> "
(
ECHO SET EMAIL1=%EMAIL1%
)>%USERPROFILE%\DESKTOP\%EMAIL1%.BAT
PAUSE>NUL
CALL :LOGIN

:LOGIN
PAUSE>NUL
CLS
TITLE TGC: LOGIN
SET /P EMAIL1=EMAIL:
CALL "%USERPROFILE%\DESKTOP\%EMAIL1%.BAT"
IF NOT EXIST "%USERPROFILE%\DESKTOP\%EMAIL1%.BAT" (
ECHO EMAIL ADDRESS DOES NOT EXIST?
PAUSE>NUL
CALL :LOGIN
)
IF NOT %EMAIL1% EQU %EMAIL1% (
ECHO INVALID EMAIL ADDRESS!
PAUSE>NUL
CALL :LOGIN
)
CALL :MENU

:MENU
PAUSE>NUL
CLS
TITLE TGC: MENU
ECHO THIS GAME CONSOLE BELONGS TO %EMAIL1%
PAUSE>NUL
ECHO WELCOME TO THE GAME CONSOLE %EMAIL1%
PAUSE>NUL
ECHO WHAT WOULD YOU LIKE TO DO?
ECHO 0) EXIT
ECHO 1) START A GAME
ECHO 2) MEMORY CARD
SET HI=NOACTION
SET /P HI=
IF %HI%==0 EXIT
IF %HI%==1 CALL :SAG
IF %HI%==2 CALL :MC
IF NOT %HI%==0 CALL :MENU
IF NOT %HI%==1 CALL :MENU
IF NOT %HI%==2 CALL :MENU

:SAG
PAUSE>NUL
CLS
TITLE TGC: GAME STARTER
FOR /R %%G IN (*INK) DO ECHO %%~NG
ECHO ______________
ECHO TYPE THE NAME AND HIT ENTER TO LAUNCH GAME
ECHO ______________
SET NUMBER=
SET /P NUMBER=
IF NOT DEFINED NUMBER (
CLS
CALL :SAG
)
START "" "GAMES\%NUMBER%"
IF %NUMBER%==GAMES START GAMES
CALL :MENU

:MC
PAUSE>NUL
CLS
TITLE TGC: MEMORY
SET ID=0
SET INAME1=0
SET INAME2=0
SET INAME3=0
SET INAME4=0
SET INAME5=0
SET ANAME1=0
SET ANAME2=0
SET ANAME3=0
SET ANAME4=0
SET ANAME5=0
ECHO WELCOME TO THE MENU %EMAIL1%
PAUSE>NUL
ECHO WHAT WOULD YOU LIKE TO CHOOSE?
ECHO 0) EXIT
ECHO 1) VIEW YOUR MEMORY
ECHO 2) SEARCH YOUR MEMORY
ECHO 3) DELETE YOUR MEMORY
ECHO 4) GO BACK TO MENU
SET /P HI=
IF %HI%==0 EXIT
IF %HI%==1 CALL :VYM
IF %HI%==2 CALL :SYM
IF %HI%==3 CALL :DYM
IF %HI%==4 CALL :MENU
CALL :MC

:VYM
CLS
TITLE TGC: VIEW YOUR MEMORY
ECHO.
ECHO ID / GAME NAME / WHAT THE GAME IS ABOUT
ECHO.
ECHO 1 %EMAIL1% - %INAME1% - %ANAME1%
ECHO 2 %EMAIL1% - %INAME2% - %ANAME2%
ECHO 3 %EMAIL1% - %INAME3% - %ANAME3%
ECHO 4 %EMAIL1% - %INAME4% - %ANAME4%
ECHO 5 %EMAIL1% - %INAME5% - %ANAME5%
ECHO.
PAUSE>NUL
CALL :MC

:SYM
CLS
TITLE TGC: SEARCH YOUR MEMORY
ECHO.
SET /P ISEARCH=INPUT GAME NAME:
ECHO.

IF %ISEARCH% == %INAME1% ECHO %ANAME1%
IF %ISEARCH% == %INAME2% ECHO %ANAME2%
IF %ISEARCH% == %INAME3% ECHO %ANAME3%
IF %ISEARCH% == %INAME4% ECHO %ANAME4%
IF %ISEARCH% == %INAME5% ECHO %ANAME5%
ECHO.
PAUSE>NUL
CALL :MC

:DYM
CLS
ECHO ARE YOU SURE YOU WANT TO DELETE YOUR MEMORY?
PAUSE>NUL
SET INAME%ID%=0
SET ANAME%ID%=0
DEL INAME%ID%.BAT
PAUSE>NUL
CALL :MC


See More: How to create a Simple Bat File Game Console

Report •

#1
February 19, 2017 at 11:51:56
Batch is the worst you can use for graphical stuff.
It probably would be much easier if you use a common programing language.

But you can try to use a .hta file

It is possible to use JS in HTML using batch

That would look like this.

01.<HTML>

02.<HTA:APPLICATION APPLICATIONNAME="Install"

03 ICON=nup.ico CONTEXTMENU=no SCROLL=no MAXIMIZEBUTTON=no VERSION=V1.62 ID=fHTA />

04.<HEAD>

05.<STYLE type="text/css">

06.<!--

07.body

08.{

09.background-color: #C6C7FE;

10.}

11....

12....

13.<form name="blablabl">

14....

15.</FORM>

16.

17.</BODY>

18.</HTML>

Good luck lafumafin


Report •

#2
February 22, 2017 at 04:38:44
✔ Best Answer
updated your design a bit, save with ansi encoding:

@echo OFF&title TEST GAME CONSOLE&color 9b&cls&echo.
:INFO
echo GAME CONSOLE MADE BY: PANTHER GAMES: DATE MADE: @2015
echo THE GAME SEARCH ENGINE MADE BY: DIZK
echo THE DATABASE FOR THE MEMORY CARD MADE BY: ARTECH PRODUCTIONS&pause>nul
:WELCOME
cls&title TGC: WELCOME&echo.
echo WHAT WOULD YOU LIKE TO DO FIRST?
echo.
echo [1] EXIT
echo [2] CREATE A USERNAME
echo [3] LOGIN
echo [4] GUEST
choice /c 1234 /n
IF %errorlevel% equ 1 exit /b
IF %errorlevel% equ 2 goto CAU
IF %errorlevel% equ 3 goto LOGIN
IF %errorlevel% equ 4 call GUEST
goto WELCOME
:CAU
cls&title TGC: CREATE A USERNAME&echo.
echo WHAT IS YOUR EMAIL ADDRESS?
set /P EMAIL1=">> "
(
echo set EMAIL1=%EMAIL1%
)>%USERPROFILE%\DESKTOP\%EMAIL1%.BAT
pause>nul
goto LOGIN
:LOGIN
cls&title TGC: LOGIN
set /P EMAIL1=EMAIL:
CALL "%USERPROFILE%\DESKTOP\%EMAIL1%.BAT"
IF NOT EXIST "%USERPROFILE%\DESKTOP\%EMAIL1%.BAT" (
echo EMAIL ADDRESS DOES NOT EXIST?&pause>nul&goto LOGIN
)
IF NOT %EMAIL1% EQU %EMAIL1% (
echo INVALID EMAIL ADDRESS!&pause>nul&goto LOGIN
)
goto MENU
:MENU
cls&title TGC: MENU&echo.
echo THIS GAME CONSOLE BELONGS TO %EMAIL1%
echo WHAT WOULD YOU LIKE TO DO?&echo.
echo [1] EXIT
echo [2] START A GAME
echo [3] MEMORY CARD
choice /c 123 /n
IF %errorlevel% equ 1 exit /b
IF %errorlevel% equ 2 goto SAG
IF %errorlevel% equ 3 goto goto
:SAG
cls&title TGC: GAME STARTER
FOR /R %%G IN (*INK) DO echo %%~NG
echo ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
echo TYPE THE NAME AND HIT ENTER TO LAUNCH GAME
echo ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
echo.
set NUMBER=
set /P NUMBER=
IF NOT DEFINED NUMBER (
cls&goto SAG
)
start "" "GAMES\%NUMBER%"
IF %NUMBER%==GAMES start GAMES
goto MENU
:goto
cls&title TGC: MEMORY&echo.
set ID=0
set INAME1=0
set INAME2=0
set INAME3=0
set INAME4=0
set INAME5=0
set ANAME1=0
set ANAME2=0
set ANAME3=0
set ANAME4=0
set ANAME5=0
echo WELCOME TO THE MENU %EMAIL1%
echo WHAT WOULD YOU LIKE TO CHOOSE?
echo.
echo [1] EXIT
echo [2] VIEW YOUR MEMORY
echo [3] SEARCH YOUR MEMORY
echo [4] DELETE YOUR MEMORY
echo [5] GO BACK TO MENU
choice /c 12345 /n
IF %errorlevel% equ 1 exit /b
IF %errorlevel% equ 2 goto VYM
IF %errorlevel% equ 3 goto SYM
IF %errorlevel% equ 4 goto DYM
IF %errorlevel% equ 5 goto MENU
:VYM
cls&title TGC: VIEW YOUR MEMORY
echo.
echo ID / GAME NAME / WHAT THE GAME IS ABOUT
echo.
echo 1 %EMAIL1% - %INAME1% - %ANAME1%
echo 2 %EMAIL1% - %INAME2% - %ANAME2%
echo 3 %EMAIL1% - %INAME3% - %ANAME3%
echo 4 %EMAIL1% - %INAME4% - %ANAME4%
echo 5 %EMAIL1% - %INAME5% - %ANAME5%
echo.&pause>nul&goto goto
:SYM
cls&title TGC: SEARCH YOUR MEMORY
echo.
set /P ISEARCH= INPUT GAME NAME:
echo.
IF %ISEARCH% == %INAME1% echo %ANAME1%
IF %ISEARCH% == %INAME2% echo %ANAME2%
IF %ISEARCH% == %INAME3% echo %ANAME3%
IF %ISEARCH% == %INAME4% echo %ANAME4%
IF %ISEARCH% == %INAME5% echo %ANAME5%
echo.&pause>nul&goto goto
:DYM
cls&echo ARE YOU SURE YOU WANT TO DELETE YOUR MEMORY?
set INAME%ID%=0
set ANAME%ID%=0
DEL INAME%ID%.BAT
pause>nul&goto goto

Simple solutions are often the best


Report •
Related Solutions


Ask Question