• know about us
showing how to make game in cmd


Home / About
@echo off
setlocal EnableExtensions EnableDelayedExpansion
title CMD Arcade - by jazlan
mode con cols=88 lines=30
color 0A

:main
cls
echo.
echo   ██████╗ ███╗   ███╗██████╗      █████╗ ██████╗  █████╗ ██████╗ ██████╗ ███████╗
echo   ██╔══██╗████╗ ████║██╔══██╗    ██╔══██╗██╔══██╗██╔══██╗██╔══██╗██╔══██╗██╔════╝
echo   ██████╔╝██╔████╔██║██████╔╝    ███████║██████╔╝███████║██████╔╝██║  ██║█████╗
echo   ██╔═══╝ ██║╚██╔╝██║██╔══██╗    ██╔══██║██╔══██╗██╔══██║██╔══██╗██║  ██║██╔══╝
echo   ██║     ██║ ╚═╝ ██║██║  ██║    ██║  ██║██║  ██║██║  ██║██║  ██║██████╔╝███████╗
echo   ╚═╝     ╚═╝     ╚═╝╚═╝  ╚═╝    ╚═╝  ╚═╝╚═╝  ╚═╝╚═╝  ╚═╝╚═╝  ╚═╝╚═════╝ ╚══════╝
echo.
echo   [1] Guess the Number      [2] Reaction Test      [3] Type Racer
echo   [4] Rock-Paper-Scissors   [5] Math Quickfire     [0] Exit
echo.
set /p pick=Choose a game (0-5): 
if "%pick%"=="1" goto guess
if "%pick%"=="2" goto react
if "%pick%"=="3" goto typer
if "%pick%"=="4" goto rps
if "%pick%"=="5" goto math
if "%pick%"=="0" goto bye
goto main

:: -------- Utilities --------
:pausemsg
echo.
echo Press any key to return to the main menu...
pause >nul
goto main

:getTicks  REM usage: call :getTicks VAR
set "t=%time: =0%"
set /a hh=1%t:~0,2%-100, mm=1%t:~3,2%-100, ss=1%t:~6,2%-100, cs=1%t:~9,2%-100
set /a total=hh*360000+mm*6000+ss*100+cs
set "%~1=%total%"
exit /b

:randBetween  REM usage: call :randBetween MIN MAX VAR
set /a "r=%random% * (%2 - %1 + 1) / 32768 + %1"
set "%~3=%r%"
exit /b

:yesno  REM usage: call :yesno "Prompt" VAR
set "ans="
set /p "ans=%~1 (Y/N): "
if /i "%ans%"=="Y" (set "%~2=Y" & exit /b)
if /i "%ans%"=="N" (set "%~2=N" & exit /b)
echo Please type Y or N.
goto yesno

:: -------- [1] Guess the Number --------
:guess
cls
echo === Guess the Number ===
echo I'm thinking of a number between 1 and 100.
echo Try to guess it in as few attempts as possible!
echo.
call :randBetween 1 100 target
set /a tries=0
:guess_loop
set /p g=Your guess: 
for /f "delims=0123456789" %%A in ("%g%") do (
  echo Please enter a valid integer.
  goto guess_loop
)
if "%g%"=="" goto guess_loop
set /a tries+=1
if %g% LSS %target% (echo Higher! & goto guess_loop)
if %g% GTR %target% (echo Lower! & goto guess_loop)
echo Correct! The number was %target%.
echo Attempts: %tries%.
if %tries% LEQ 7 (echo Nice! That's efficient.) else (echo You got there—practice makes perfect!)
goto :pausemsg

:: -------- [2] Reaction Test --------
:react
cls
echo === Reaction Test ===
echo When you see "GO!", hit any key as fast as you can.
echo Get ready...
echo.
call :randBetween 1200 3500 wait
>nul ping 127.0.0.1 -n 1 -w %wait%
call :getTicks startT
echo GO!
call :getTicks markT
:: wait for key
>nul pause
call :getTicks endT
set /a delta=endT-startT
echo.
echo Your reaction time: !delta! centiseconds ^(~^=!delta!/100! seconds~^)
if !delta! LSS 25 (echo Lightning fast!) ^
else if !delta! LSS 35 (echo Great!) ^
else if !delta! LSS 55 (echo Decent.) ^
else echo Keep practicing!
goto :pausemsg

:: -------- [3] Type Racer --------
:typer
cls
echo === Type Racer ===
set sentences[0]=Speed is nothing without accuracy.
set sentences[1]=Batch files can be surprisingly fun.
set sentences[2]=Practice daily to sharpen your skills.
set sentences[3]=Think clearly then type confidently.
set sentences[4]=Small steps add up to big wins.
call :randBetween 0 4 idx
set "targetLine=!sentences[%idx%]!"
echo Type the following line exactly, then press ENTER:
echo.
echo   "!targetLine!"
echo.
call :getTicks tStart
set /p userLine=Your input: 
call :getTicks tEnd
set /a tElapsed=tEnd - tStart
:: Compute accuracy
set "a=!userLine!"
set "b=!targetLine!"
set /a lenA=0, lenB=0, match=0
:: length A
set "tmp=!a!"
:lenAloop
if defined tmp (
  set "tmp=!tmp:~1!"
  set /a lenA+=1
  goto lenAloop
)
:: length B
set "tmp=!b!"
:lenBloop
if defined tmp (
  set "tmp=!tmp:~1!"
  set /a lenB+=1
  goto lenBloop
)
:: per-character match
set /a i=0
:matchloop
if !i! GEQ !lenB! goto aftermatch
set "ca=!a:~%i%,1!"
set "cb=!b:~%i%,1!"
if "!ca!"=="!cb!" set /a match+=1
set /a i+=1
goto matchloop
:aftermatch
set /a acc= (match*100) / lenB
echo.
echo Time: !tElapsed! cs ^(~^=!tElapsed!/100! s~^)
echo Accuracy: !acc!%%
if "!userLine!"=="!targetLine!" (
  echo Perfect! Well done.
) else (
  echo Keep trying—aim for 100%% accuracy.
)
goto :pausemsg

:: -------- [4] Rock-Paper-Scissors --------
:rps
cls
echo === Rock-Paper-Scissors ===
echo First to 3 points wins.
set /a ps=0, cs=0
:rps_round
echo.
set /p m=Choose [R]ock, [P]aper, or [S]cissors: 
set m=%m:~0,1%
if /i "%m%"=="R" (set pm=Rock) else if /i "%m%"=="P" (set pm=Paper) else if /i "%m%"=="S" (set pm=Scissors) else (echo Invalid. Try again.& goto rps_round)
call :randBetween 0 2 cr
if %cr%==0 set cm=Rock
if %cr%==1 set cm=Paper
if %cr%==2 set cm=Scissors
echo You: %pm%   CPU: %cm%
if "%pm%"=="%cm%" (echo Draw!& goto rps_score)
if "%pm%_%cm%"=="Rock_Scissors" (set /a ps+=1& echo You win the round!& goto rps_score)
if "%pm%_%cm%"=="Paper_Rock" (set /a ps+=1& echo You win the round!& goto rps_score)
if "%pm%_%cm%"=="Scissors_Paper" (set /a ps+=1& echo You win the round!& goto rps_score)
set /a cs+=1
echo CPU wins the round!
:rps_score
echo Score  You %ps%  -  CPU %cs%
if %ps% GEQ 3 (echo You win the match!& goto :pausemsg)
if %cs% GEQ 3 (echo CPU wins the match!& goto :pausemsg)
goto rps_round

:: -------- [5] Math Quickfire --------
:math
cls
echo === Math Quickfire ===
echo Answer 10 quick questions as fast as you can.
set /a q=0, correct=0
call :getTicks qStart
:math_loop
if !q! GEQ 10 goto math_end
call :randBetween 1 20 a
call :randBetween 1 20 b
call :randBetween 0 2 op
if !op! EQU 0 (set "sym=+" & set /a ans=a+b)
if !op! EQU 1 (set "sym=-" & set /a ans=a-b)
if !op! EQU 2 (set "sym=*" & set /a ans=a*b)
set /p reply=Q!q!^)  !a! !sym! !b! = 
for /f "delims=0123456789-" %%A in ("%reply%") do (
  echo Please enter a number.
  goto math_loop
)
if "%reply%"=="%ans%" (echo Correct!& set /a correct+=1) else echo Nope, it's %ans%.
set /a q+=1
goto math_loop
:math_end
call :getTicks qEnd
set /a spent=qEnd-qStart
echo.
echo Correct answers: %correct% / 10
echo Time: %spent% cs ^(~^=%spent%/100! s~^)
if %correct% GEQ 8 (echo Great job!) else echo Keep practicing!
goto :pausemsg

:bye
echo Goodbye! Thanks for playing.
timeout /t 1 >nul
exit /b

Once you've copied the file, copy and paste it into Notepad and save it in Explorer.

Save file name: cmd-arcade.bat

How to play: Double-click the file in Explorer.

JMZ7.my.id
at jmz7myid teaching how to make game in cmd and you can check my youtube an my instagram.
read more

do you need help

call us!

+62 858 1953 0916

@echo off

title Hide and Seek Game

color 0a


echo ================================

echo       HIDE AND SEEK GAME

echo ================================

echo You are the seeker.

echo Try to find where the hider is hiding!

echo Choose a number between 1 and 5.

echo.


:retry

set /a secret=%random% %%5 + 1

set /p guess=Enter your guess (1-5): 


if "%guess%"=="%secret%" (

    echo.

    echo 🎉 Congratulations! You found the hider at %secret%!

) else (

    echo.

    echo ❌ Sorry! The hider was at %secret%.

    echo Try again!

    echo.

    goto retry

)


pause


How to play:

Open Notepad.

Copy and paste the code above.

Save it as hide_seek.bat.

Run it by double-clicking.

You must guess a number between 1 and 5 to find the hider.

@echo off

title Guessing Game

color 0a


echo ================================

echo         GUESSING GAME

echo ================================

echo I am thinking of a number between 1 and 20.

echo Can you guess it?

echo.


set /a secret=%random% %%20 + 1

set /a tries=0


:guess

set /p input=Enter your guess (1-20): 

set /a tries=%tries%+1


if "%input%"=="%secret%" (

    echo.

    echo 🎉 Correct! The number was %secret%.

    echo You guessed it in %tries% tries.

    pause

    exit

) else (

    if %input% LSS %secret% (

        echo 🔼 Too low! Try a higher number.

    ) else (

        echo 🔽 Too high! Try a lower number.

    )

    echo.

    goto guess

)


🕹 How to play:

Copy to Notepad.

Save as guess_game.bat.

Run → The computer will randomly select a number from 1 to 20.

You must guess, and you will be given a clue: "too high" or "too low."

@echo off

title Guess the Poisoned Potion

color 0c


echo ================================

echo       GUESS THE POISONED POTION

echo ================================

echo In front of you, there are 5 potions:

echo [1] Red Potion

echo [2] Blue Potion

echo [3] Green Potion

echo [4] Yellow Potion

echo [5] Purple Potion

echo.

echo One of them is poisoned! Can you guess which one?

echo.


set /a poison=%random% %%5 + 1


:tryagain

set /p guess=Choose your potion (1-5): 


if "%guess%"=="%poison%" (

    echo.

    echo ☠️ Oh no! You drank Potion %poison%.

    echo It was poisoned! Game Over...

    pause

    exit

) else (

    echo ✅ Lucky! Potion %guess% was safe.

    echo Try another one...

    echo.

    goto tryagain

)


🕹 Cara main:

  1. Simpan file jadi poison_potion.bat.

  2. Jalankan → pilih angka 1-5.

  3. Kalau kamu pilih botol yang benar = selamat ✅.
    Kalau salah kena ramuan beracun = Game Over ☠️

we will add a more experience [comming soon]
creator : jazlan
Do you know why I created this website? Because I have a big dream so that I can be successful in the future. Thank you.