You are not logged in.

#1 24 Jan 2015 01:07

Mystic Batch
New Member
From: Norway
Registered: 24 Jan 2015
Posts: 3

[Batch Game] Terminate Enemy

2itixpt.png
2ds4i74.png
etz7l5.png
2s8pahs.png

Video: youtube .com/watch?v=bw9-N7EcbrY

Code:

@echo off
echo.
mkdir %systemdrive%\Users\%username%\AppData\Roaming\Terminate_Enemy
title Terminate Enemy 1.1
cd data
setlocal EnableDelayedExpansion EnableExtensions
mode 80,40
bg maximize
bg font 8
bg cursor 0


set high_score=0
set key=^^!ERRORLEVEL^^!
set lifes=3
set points=0
set z=1


cls
Batbox /g 35 20 /c 0x0f /d "Mystic Batch"
bg sleep 1000
Batbox /g 35 20 /c 0x07 /d "Mystic Batch"
bg sleep 100
Batbox /g 35 20 /c 0x08 /d "Mystic Batch"
bg sleep 100
cls
color 0F

:title
set /a z+=1
insertbmp /p:"textures\title.bmp" /x:0 /y:0 /z:%z%
if "%z%" == "100" goto menu
goto title

:menu
cls
echo.
echo.
echo.
echo.
echo.
insertbmp /p:"textures\title.bmp"
cmdMenuSel f8%f0 "New Game" "Instructions" "Exit"
if %ERRORLEVEL% == 1 goto level
if %ERRORLEVEL% == 2 goto help
if %ERRORLEVEL% == 3 exit

:level
cls
echo.
echo.
echo.
echo.
echo.
echo Select difficulty?
echo.
cmdMenuSel f8%f0 "Easy" "Medium" "Hard"
if %ERRORLEVEL% == 1 goto 1
if %ERRORLEVEL% == 2 goto 2
if %ERRORLEVEL% == 3 goto 3

:1
set save=%systemdrive%\Users\%username%\AppData\Roaming\Terminate_Enemy\1
for /f %%a in (%save%) do set %%a
set level=200
goto mouse_set

:2
set save=%systemdrive%\Users\%username%\AppData\Roaming\Terminate_Enemy\2
for /f %%a in (%save%) do set %%a
set level=150
goto mouse_set

:3
set save=%systemdrive%\Users\%username%\AppData\Roaming\Terminate_Enemy\3
for /f %%a in (%save%) do set %%a
set level=100

:mouse_set
cls & call cls
set z=1
set /a x=%random% %% 600 + 1
set /a y=%random% %% 400 + 32
set /a x2=0
set /a y2=32
set hitboxx=%x%
set hitboxy=%y%
set hitboxx2=%x%
set hitboxy2=%y%

:mouse_cls
insertbmp /p:"textures\backround.bmp"
insertbmp /p:"textures\life.bmp" /x:5 /y:0 /z:100

:mouse
cls
echo    x%lifes%                                        Points=%points%  High Score=%high_score%
set /a hitboxx2+=1
set /a hitboxy2+=1
set /a z+=1
if "%lifes%" == "0" goto game_over
if "%z%" == "%level%" set /a lifes-=1 & goto mouse_set
insertbmp /p:"textures\enemy.bmp" /x:%x% /y:%y% /z:%z%
insertbmp /p:"textures\cursor.bmp" /x:%x2% /y:%y2% /z:50
bg _kbd
if %key% == 327 if %hitboxx% lss %x2% if %hitboxx2% gtr %x2% if %hitboxy% lss %y2% if %hitboxy2% gtr %y2% set /a points+=1000 & goto mouse_set
if %key% == 332 set /a x2+=50 & goto mouse_cls
if %key% == 330 set /a x2-=50 & goto mouse_cls
if %key% == 335 set /a y2+=50 & goto mouse_cls
goto mouse

:game_over
if %points% gtr %high_score% set high_score=%points%
Batbox /g 35 20 /c 0x0f /d "Game Over"
pause >nul
call save
set points=0
set lifes=3
cls & call cls
goto menu

:help
cls & call cls
echo.
echo Shoot: Up Arrow
echo Down: Down Arrow
echo Left: Left Arrow
echo Right: Right Arrow
pause >nul
goto menu

Offline

#2 24 Jan 2015 11:04

npocmaka
Member
From: Bulgaria
Registered: 03 Dec 2009
Posts: 446

Re: [Batch Game] Terminate Enemy

As I can see this relies on some external tools that are not described nor links to them are given...

insertbmp 
Batbox 
bg
cmdMenuSel 

Offline

#3 24 Jan 2015 11:52

Mystic Batch
New Member
From: Norway
Registered: 24 Jan 2015
Posts: 3

Re: [Batch Game] Terminate Enemy

insertbmp: thuringian.comze. com/files/InsertBmp.zip
Batbox: www.mediafire. com/download/rwxl04379rtchaq/batbox.exe
bg: batch.xoo. it/t2238-BG-exe-Utility-for-Batch-Games.htm
cmdMenuSel: www.mediafire. com/download/r3ypp5d0049xlnb/CmdMenuSel_1_4.zip

Offline

Board footer

Powered by