Batch Index du Forum
S’enregistrerRechercherFAQMembresGroupesConnexion
Répondre au sujet Page 1 sur 1
B-Engine // Alpha
Auteur Message
Répondre en citant
Message B-Engine // Alpha 
Je me décide enfin à publier mon projet que je met à jour assez régulièrement en ce moment, c'est B-engine (b pour batch ^^)
Ce jeu est à base de mouvement de personnage et propose beaucoup de customisation possible dans le gameplay pour chaque map :
-Map custom
-Texture custom
-Cfg custom (x,y du joueur ou de la fin, message de début, couleurs de la map ....)

La création de map est simple il suffit de mettre des chiffres (ex : 0 pour l'air) qui vont être remplacé par les textures. Il est très simple d'ajouter des "blocs" il faut juste mettre un chiffre ou une lettre (seulement un caractère !) puis mettre la texture qui va le remplacer. Si ce "bloc" est solide il faut le déclarer dans "Engine.bat" (c'est tout en bas ^^)

Il a un système de cache pour accélérer le chargement (/!\ il faut mettre à jour le cache à chaque fois que la map ou config est modifiée ! Elle se fait dans la section "map config / cache option")

Screen :

Menu principal :


Map de test :


Deuxième test (qui fait mal au yeux Mort de Rire ) :


La console de cheat :




Liste des configs :

Code:

set tickspeed=50 :: Tickspeed, vitesse d'actualisation
set playery=-1 ::position horizontale du joueur (oui oui horizontale, je me suis trompé xd)
set playerx=-1 ::position verticale du joueur
set endx=-1 ::position horizontale de la fin
set endy=-1 ::position verticale de la fin
set endmsg=Map ended without end message^! ::message de fin
set live=-1 ::nombre de vie
set hp=10 ::nombre d'hp
set cheats=0 ::Bool pour activer ou désactiver la triche (activable par "/")
set gravityspeed=85 ::Vitesse de la gravité (wait en ms)
set startmsg=Unnamed Map ::message de début
set startmsgtimeout=5 ::durée du message de début
set endcolor=0x07 ::couleur de la fin
set mapcolor=0x07 ::couleur de la map
set playercolor=0x07 ::couleur du joueur
set falldamage=1 ::Bool pour activer ou désactiver les dégats de chutes



Source Code :

Code:

::Copyright (c)
::FR:
::Programme créé par Andro24 de batch.xoo.it
::Ne pas copier, modifier, distribuer ce code sans mon autorisation
::Ne pas supprimer ce Copyright, merci.
::Commandes externes utilisés :
:: -Darkbox (_i) par TSnake41
:: batch.xoo.it/t5526-Dev-Darkbox-TSnake41.htm

::Copyright (c)
::EN:
::Program made by Andro24 from batch.xoo.it
::Don't copy, modify, share this code without my permission.
::Don't remove this copyright, thanks.
::External command used :
:: -Darkbox (_i) by TSnake41
:: batch.xoo.it/t5526-Dev-Darkbox-TSnake41.htm




@echo off
mode con cols=51 lines=30
setlocal EnableDelayedExpansion
set builddate=18/02/17
set version=0.0.3.3a // Alpha
set cachedmap=:
set maps=0
set cacheupdateonly=0
set txt=NaN
set menu=1
:load
darkbox -? || call :makedarkbox >nul
darkbox_i -? || call :makedarkboxi >nu
if not exist maps (
   md maps
)
if defined __ goto :drawmenu
set __=.
call %0 %* | darkbox
set __=
goto :eof
:drawmenu
set menu=1
set createcache=0

title BEngine Build %builddate%
echo -rs
echo -rd "              ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»"
echo -nrd "              º Welcome to Bengine º"
echo -nrd "              ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ"
echo -nrd ""
echo -nrd "              ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»"
echo -nrd "              º   -- Load Maps     º"
echo -nrd "              º                    º"
echo -nrd "              º   -- Maps Config   º"
echo -nrd "              º                    º"
echo -nrd "              º   -- Exit          º"
echo -nrd "              ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ"
echo -g 1 15 -d "Version : %version%"
echo -g 18 5 -d "->"
:waitmenu

darkbox_i /k
if %errorlevel% == 13 (
  if %menu% == 1 goto loadmaps
  if %menu% == 2 goto mapcfg
  if %menu% == 3 (
    echo -rsq
   exit
  )
  goto waitmenu
)
if %errorlevel% == 80 (
   set /a menu+=1
)
if %errorlevel% == 72 (
   set /a menu-=1
)
if %menu% LSS 1 set menu=3
if %menu% GTR 3 set menu=1

if %menu% == 1 (
  echo -g 18 5 -d "->"
  echo -g 18 7 -d "--"
  echo -g 18 9 -d "--"
)
if %menu% == 2 (
  echo -g 18 5 -d "--"
  echo -g 18 7 -d "->"
  echo -g 18 9 -d "--"
)
if %menu% == 3 (
  echo -g 18 5 -d "--"
  echo -g 18 7 -d "--"
  echo -g 18 9 -d "->"
)
goto waitmenu
:mapcfg
echo -rs
set mapname2=AntiCrashbym3
echo -rd "=== Bengine ======================================="
echo -rnd ""
echo -rnd "Please enter your map name : "
echo -rnd "/back to return to main menu"
echo -rn
set /p mapname2=
if %mapname2% == AntiCrashbym3 call :error map1 mapcfg
if %mapname2% == /back goto drawmenu
if not exist "maps\%mapname2%" call :error map2 mapcfg
set menu=1
:configurator
set menu=1

echo -rs
echo -rd "=== Bengine ======================================="
echo -nrd ""
echo -nrd "//Some of the tool can require powershell ^! (*)"
echo -nrd "Map : %mapname2%"
:configmenuloop
if %menu% == 1 (
   echo -g 0 5 -c 0x70 -d "Cache Options"
   echo -g 0 6 -c 0x07 -d "Config Options *"
   echo -g 0 7 -c 0x07 -d "Map maker (INDEV)"
   echo -g 0 8 -c 0x07 -d "Back"
)
if %menu% == 2 (
   echo -g 0 5 -c 0x07 -d "Cache Options"
   echo -g 0 6 -c 0x70 -d "Config Options *"
   echo -g 0 7 -c 0x07 -d "Map maker (INDEV)"
   echo -g 0 8 -c 0x07 -d "Back"
)
if %menu% == 3 (
   echo -g 0 5 -c 0x07 -d "Cache Options"
   echo -g 0 6 -c 0x07 -d "Config Options *"
   echo -g 0 7 -c 0x70 -d "Map maker (INDEV)"
   echo -g 0 8 -c 0x07 -d "Back"
)
if %menu% == 4 (
   echo -g 0 5 -c 0x07 -d "Cache Options"
   echo -g 0 6 -c 0x07 -d "Config Options *"
   echo -g 0 7 -c 0x07 -d "Map maker (INDEV)"
   echo -g 0 8 -c 0x70 -d "Back"
)
darkbox_i /k
if %errorlevel% == 13 (
  if %menu% == 1 goto cacheoption
  if %menu% == 2 goto configmaker
  if %menu% == 3 goto mapmaker
  if %menu% == 4 goto drawmenu
  goto configmenuloop
)
if %errorlevel% == 80 (
   set /a menu+=1
)
if %errorlevel% == 72 (
   set /a menu-=1
)
if %menu% LSS 1 set menu=4
if %menu% GTR 4 set menu=1
goto configmenuloop

:configmaker
echo -rs

echo -rd "=== Bengine ======================================="
echo -nrd ""
echo -nrd "SOON"
pause >nul
goto configurator
:mapmaker

echo -rs
echo -rd "=== Bengine ======================================="
echo -nrd ""
echo -nrd "SOON"
pause >nul
goto configurator





:cacheoption
set menu=1
echo -rs
echo -rd "=== Bengine ======================================="
echo -nrd ""
echo -nrd "Cache Options : "
echo.
:cacheoptionmenuloop
if %menu% == 1 (
   echo -g 0 5 -c 0x70 -d "Enable Cache"
   echo -g 0 6 -c 0x07 -d "Disable Cache"
   echo -g 0 7 -c 0x07 -d "Update Cache"
   echo -g 0 8 -c 0x07 -d "Back"
)
if %menu% == 2 (
   echo -g 0 5 -c 0x07 -d "Enable Cache"
   echo -g 0 6 -c 0x70 -d "Disable Cache"
   echo -g 0 7 -c 0x07 -d "Update Cache"
   echo -g 0 8 -c 0x07 -d "Back"
)
if %menu% == 3 (
   echo -g 0 5 -c 0x07 -d "Enable Cache"
   echo -g 0 6 -c 0x07 -d "Disable Cache"
   echo -g 0 7 -c 0x70 -d "Update Cache"
   echo -g 0 8 -c 0x07 -d "Back"
)
if %menu% == 4 (
   echo -g 0 5 -c 0x07 -d "Enable Cache"
   echo -g 0 6 -c 0x07 -d "Disable Cache"
   echo -g 0 7 -c 0x07 -d "Update Cache"
   echo -g 0 8 -c 0x70 -d "Back"
)
darkbox_i /k
if %errorlevel% == 13 (
  if %menu% == 1 call :enablecache
  if %menu% == 2 call :disablecache
  if %menu% == 3 call :updatecache
  if %menu% == 4 goto configurator
  goto cacheoptionmenuloop
)
if %errorlevel% == 80 (
   set /a menu+=1
)
if %errorlevel% == 72 (
   set /a menu-=1
)
if %menu% LSS 1 set menu=4
if %menu% GTR 4 set menu=1
goto cacheoptionmenuloop



















:Loadmaps
echo -rs
set mapname=AntiCrashbym3
echo -rd "=== Bengine ======================================="
echo -rnd ""
echo -rnd "Please enter your map name : "
echo -rnd "/back to return to main menu"
echo -rn
set /p mapname=
if %mapname% == AntiCrashbym3 call :error map1 loadmaps
if %mapname% == /back goto drawmenu
if not exist "maps\%mapname%" call :error map2 loadmaps
cd "maps\%mapname%"

echo -rs
echo === Bengine =======================================
echo.
echo Checking Map file ...
if not exist config.bat call :error map3 loadmaps
if not exist map.bat call :error map3 loadmaps
if not exist texture.bat call :error map3 loadmaps
if not exist cache.bat (call :cachemaker) else (call :cachecheck)

:map

::default config
set tickspeed=50
set playery=-1
set playerx=-1
set endx=-1
set endy=-1
set endmsg=Map ended without end message^!
set live=-1
set weapon=-1
set ammo=-1
set hp=10
set cheats=0
set tickspeed=5
set gravityspeed=85
set startmsg=Unnamed Map
set startmsgtimeout=5
set endcolor=0x07
set mapcolor=0x07
set playercolor=0x07
set falldamage=1
::default texture
set tx0=_
set tx1=Û
set tx2=.
set txf=ß
set txp=
if %cacheupdateonly% == 1 goto map2
if %cachedmap% == %mapname% (
   echo -rs
   echo === Bengine =======================================
   echo.
   echo This map has already been loading in this session.
   echo So this map will be loaded from internal cache.
   pause >nul
   call config.bat
   set /a playery+=3
   ::set /a playerx+=1
   set /a endy+=3
   goto finishedloading
)
:map2
echo -rs
echo -rd "=== Bengine ======================================="
echo -nrd ""
echo -nrd "Loading Configs..."
echo -nrd ""
echo -nrd "              ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿"
echo -nrd "              ³±                    ³"
echo -nrd "              ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ"
call config.bat
echo -rs
echo -rd "=== Bengine ======================================="
echo -nrd ""
echo -nrd "Loading Textures..."
echo -nrd ""
echo -nrd "              ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿"
echo -nrd "              ³±±                   ³"
echo -nrd "              ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ"
call texture.bat
echo -rs
echo -rd "=== Bengine ======================================="
echo -nrd ""
echo -nrd "Loading Map..."
echo -nrd ""
echo -nrd "              ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿"
echo -nrd "              ³±±±                  ³"
echo -nrd "              ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ"
call :Loadtextfromfile
cd %~p0
if %playery% == -1 call :error map4 loadmaps
if %playerx% == -1 call :error map4 loadmaps
if %endy% == -1 call :error map4 loadmaps
if %endx% == -1 call :error map4 loadmaps
if %live% LEQ -1 call :error map4 loadmaps
if %weapon% LEQ -1 call :error map4 loadmaps
::if %ammo% LEQ -1 call :error map4 loadmaps
::call :clampxy
set /a playery+=3
::set /a playerx+=1
set /a endy+=3
echo -rs
echo -rd "=== Bengine ======================================="
echo -nrd ""
echo -nrd "Applying Textures..."
echo -nrd ""
echo -nrd "              ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿"
echo -nrd "              ³±±±                  ³"
echo -nrd "              ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ"
call :replacetexture
if %createcache% == 1 call :makecache
:Finishedloading
cd %~p0
set createcache=0
if %cacheupdateonly% == 1 call :cacheupdated %txt%
echo -rs
set cachedmap=%mapname%
title Map %mapname% Loaded // BEngine Build %builddate%
echo === Bengine =======================================
echo.
echo Map Message:
echo %startmsg%
if %startmsgtimeout% == 0 (
    echo Press any key to continue ...
     pause >nul
     goto loaded
)
echo %startmsgtimeout% Seconds Timeout...
timeout /t %startmsgtimeout% >nul
goto loaded



:loaded
echo -rs
set isjumping=0
set tickcount=0
set lasttickcount=0
set tmptickcount=0
set tmptickcount2=0
set tmptickcount3=0
set isfalling=0
set falltick=0
set gethurt=0
set oldplayercolor=0x07
set currenthp=%hp%
call :refreshmap
call :refreshplayer
call :refreshgui
call :refreshend

:loaded2
call :calcfalldamage
if %gethurt% == 1 (
   if %tmptickcount3% LSS %tickcount% (
      set playercolor=%oldplayercolor%
      set gethurt=0
      set currenthp=%hp%
      call :refreshplayer
   )

)

if %gethurt% == 0 (
   if %currenthp% NEQ %hp% (
      set oldplayercolor=%playercolor%
      set playercolor=0x04
      set /a tmptickcount3=%tickcount%+8
      set gethurt=1
      call :refreshplayer
   )

   set currenthp=%hp%
)
   
set /a tickcount+=1
if %hp% LSS 1 (
   set hp=000
   goto dead
)
::call :clampxy
if %playerx% == %endx% (
   if %playery% == %endy% (
      goto mapend
   )
)

darkbox_i /k_

if %errorlevel% == 47 (
    if %cheats% == 1 call :console
)
if %errorlevel% == 112 call :pause
if %errorlevel% == 80 call :pause
if %errorlevel% == 77 call :mover
if %errorlevel% == 75 call :movel
if %isjumping% == 0 (
    if %isfalling% == 0 (
        if %errorlevel% == 72 call :jump
    )
)
if %isjumping% == 1 (
   if %tmptickcount% == %tickcount% (
      set isjumping=0
      set isfalling=1
      if %tickspeed% NEQ 0 call :wait %tickspeed%
      goto loaded2
   )
   if %tickspeed% NEQ 0 call :wait %tickspeed%
   goto loaded2
)

call :gravity
if %tickspeed% NEQ 0 call :wait %tickspeed%
goto loaded2


:mapend
echo -rs
echo -rd "=== Bengine ======================================="
echo -rnd ""
echo -rnd "Map finished."
echo -rnd "%endmsg%"
pause >nul
goto drawmenu
:gameover
echo -rs
echo === Bengine =======================================
echo.
echo Gameover :/
pause >nul
goto drawmenu

:dead
if %live% == 0 goto gameover
set /a live-=1

echo -rs
set hp=0
call :refreshgui
echo -rnd "ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿"
echo -rnd "³°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°³"
echo -rnd "³°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°³"
echo -rnd "³°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°³"
echo -rnd "³°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°³"
echo -rnd "³°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°³"
echo -rnd "³°°°°°°°°ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»°°°°°°°°°³"
echo -rnd "³°°°°°°°°º                             º°°°°°°°°°³"
echo -rnd "³°°°°°°°°º        You are Dead ^!       º°°°°°°°°°³"
echo -rnd "³°°°°°°°°º                             º°°°°°°°°°³"
echo -rnd "³°°°°°°°°ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ°°°°°°°°°³"
echo -rnd "³°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°³"
echo -rnd "³°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°³"
echo -rnd "³°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°³"
echo -rnd "³°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°³"
echo -rnd "³°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°³"
echo -rnd "³°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°³"
echo -rnd "³°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°³"
echo -rnd "³°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°³"
echo -rnd "ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ"
echo /c 0x07
pause >nul
set oldlive=%live%
cd maps\%mapname%\
call config.bat
set /a playery+=3
set /a endy+=3
cd %~p0
set live=%oldlive%
goto loaded
:pause
call :refreshgui
call :refreshwindow
echo -g 9 9 -rd "ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»"
echo -g 9 10 -rd "º                             º"
echo -g 9 11 -rd "º        Game paused..        º"
echo -g 9 12 -rd "º                             º"
echo -g 9 13 -rd "ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ"
pause >nul
goto loaded

:calcfalldamage
if %falldamage% == 0 exit /b
if %isfalling% == 0 (
   if %falltick% NEQ 0 (
      if %hp% == 999 exit /b
      if %falltick% GEQ 15 (
         set hp=0
         goto dead
      )
      if %falltick% GEQ 13 set /a hp-=7
      if %falltick% GEQ 11 set /a hp-=5
      if %falltick% GEQ 9 set /a hp-=4
      if %falltick% GEQ 7 set /a hp-=3
      if %falltick% GEQ 5 set /a hp-=2
      if %falltick% GEQ 4 set /a hp-=1
      set falltick=0
      call :refreshgui
      call :refreshplayer
      exit /b
   )
)
exit /b











:makecache
echo -rs
echo -rd "=== Bengine ======================================="
echo -rnd ""
echo -rnd "Making Cache file..."
echo -rnd "              ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿"
echo -rnd "              ³                     ³"
echo -rnd "              ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ"
echo ::CACHE >"maps\%mapname%\cache.bat"
echo ::FILE AUTOMATICLY GENERATED BY BENGINE DONT TOUCH>>"maps\%mapname%\cache.bat"
echo ::UPDATE THIS FILE WITH BENGINE>>"maps\%mapname%\cache.bat"
echo set "tickspeed=%tickspeed%">>"maps\%mapname%\cache.bat"
echo set "playery=%playery%">>"maps\%mapname%\cache.bat"
echo set "playerx=%playerx%">>"maps\%mapname%\cache.bat"
echo set "endx=%endx%">>"maps\%mapname%\cache.bat"
echo set "endy=%endy%">>"maps\%mapname%\cache.bat"
echo set "endmsg=%endmsg%">>"maps\%mapname%\cache.bat"
echo set "live=%live%">>"maps\%mapname%\cache.bat"
echo set "weapon=%weapon%">>"maps\%mapname%\cache.bat"
echo set "ammo=%ammo%">>"maps\%mapname%\cache.bat"
echo set "cheats=%cheats%">>"maps\%mapname%\cache.bat"
echo set "endcolor=%endcolor%">>"maps\%mapname%\cache.bat"
echo set "mapcolor=%mapcolor%">>"maps\%mapname%\cache.bat"
echo set "playercolor=%playercolor%">>"maps\%mapname%\cache.bat"
echo set "jumpgravity=%jumpgravity%">>"maps\%mapname%\cache.bat"
echo set "gravityspeed=%gravityspeed%">>"maps\%mapname%\cache.bat"
echo set "startmsg=%startmsg%">>"maps\%mapname%\cache.bat"
echo set "startmsgtimeout=%startmsgtimeout%">>"maps\%mapname%\cache.bat"
echo set "hp=%hp%">>"maps\%mapname%\cache.bat"
echo set "falldamage=%falldamage%">>"maps\%mapname%\cache.bat"
echo -rs
echo -rd "=== Bengine ======================================="
echo -rnd ""
echo -rnd "Making Cache file..."
echo -rnd ""
echo -rnd "              ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿"
echo -rnd "              ³±±±                  ³"
echo -rnd "              ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ"
for /L %%h in (1,1,18) do (
    for /L %%g in (1,1,48) do (
        call :addcase %%h %%g
    )
)
echo exit /b >>"maps\%mapname%\cache.bat"
exit /b
:addcase
set /a tmpy=%1+17
echo /g %tmpy% 6 /d "±"
::echo ±
echo set "mapl%1c%2=!mapl%1c%2!">>"maps\%mapname%\cache.bat"
exit /b
:loadcache
echo -rs
echo === Bengine =======================================
echo.
echo Loading from cache...
call cache.bat
call texture.bat
cd %~p0
goto Finishedloading


:cacheupdated
set cacheupdateonly=0
echo -rs
echo === Bengine =======================================
echo.
echo The cache has been %1 ^!
pause >nul

goto cacheoption
:enablecache
set cacheupdateonly=1
set txt=enabled
set mapname=%mapname2%
cd "maps\%mapname%"
goto askcache
:disablecache
del "maps\%mapname2%\cache.bat"
echo ::NOCACHE>"maps\%mapname2%\cache.bat"
set txt=disabled
call :cacheupdated %txt%
goto cacheoption
:updatecache
set cacheupdateonly=1
set txt=updated
set mapname=%mapname2%
cd "maps\%mapname%"
goto askcache
:cachecheck
set "nocache=::NOCACHE"
set "cache=::CACHE"
set /p tmp=<cache.bat
if %tmp% == %nocache% goto map
if %tmp% == %cache% goto loadcache
goto map
:cachemaker
echo -rs
echo === Bengine =======================================
echo.
echo Recommended.
echo Do you want to make a cache for this map for faster 
echo loading ? (this will be asked once)  Y/N
echo THIS HAS TO BE UPDATED IF MAPS FILE ARE UPDATED ^!
choice /c yn /n
if %errorlevel% == 1 call :askcache
if %errorlevel% == 2 call :nocache
goto cachemaker
:askcache
set createcache=1
goto map
:nocache
echo ::NOCACHE>cache.bat
goto map











:replacetexture
for /L %%h in (1,1,18) do (
    for /L %%g in (1,1,48) do (
        call :replacecase %%h %%g
    )
)
exit /b




:replacecase
set /a tmpy=%1+17
echo /g %tmpy% 6 /d "±"
::echo ±
::  set mapl%1c%2=!mapl%1c%2:XX=%YY%!
:: XX=char in map.bat
:: YY=variable that replace it
set mapl%1c%2=!mapl%1c%2:1=%tx1%!
set mapl%1c%2=!mapl%1c%2:2=%tx2%!
set mapl%1c%2=!mapl%1c%2:0=%tx0%!
set mapl%1c%2=!mapl%1c%2:F=%txf%!
set mapl%1c%2=!mapl%1c%2:P=%txp%!
exit /b


:wait
echo /w %1
exit /b

:::clampxy
::if %playerx% LSS 1 set playerx=1
::if %playerx% GTR 24 set playerx=24
::if %playery% LSS 4 set playerx=4
::if %playery% GTR 12 set playerx=12
::exit /b





:console
echo -rs
echo -rd "=== Console ======================================"
echo -rnd "Type a command"
echo -rnd ""
:console2
set input=/help
set /p input=
if %input% == /help (
echo -rnd "Help =="
echo -rnd "/exit : return to mainmenu"
echo -rnd "/god : infinite lives"
echo -rnd "/help : show this"
echo -rnd "/infhp : infinite hp"
::echo /infammo : infinite ammo
echo -rnd "/tp : teleport to x y"
echo -rnd "/return : return to game"
echo -rnd ""
goto console2
)
if %input% == /exit goto drawmenu
if %input% == /return goto loaded
if %input% == /god (
set live=999
echo -rnd "Set "live" to 999"
echo -rnd ""
goto console2
)
if %input% == /infammo (
set ammo=999
echo -rnd "Set "ammo" to 999"
echo -rnd ""
goto console2
)
if %input% == /infhp (
set hp=999
echo -rnd "Set "hp" to 999"
echo -rnd ""
goto console2
)
if %input% == /tp goto :tp
echo -rnd "unkwnown command. /help for help."
echo -rnd ""
goto console2

:tp
echo -rs
echo New X :
set /p playerx=
echo New Y :
set /p playery=
::call :clampxy
goto loaded


:refreshwindow
echo -g 0 3 -rd "ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿"
echo -g 0 4 -rd "³" -g 49 4 -d "³"
echo -g 0 5 -rd "³" -g 49 5 -d "³"
echo -g 0 6 -rd "³" -g 49 6 -d "³"
echo -g 0 7 -rd "³" -g 49 7 -d "³"
echo -g 0 8 -rd "³" -g 49 8 -d "³"
echo -g 0 9 -rd "³" -g 49 9 -d "³"
echo -g 0 10 -rd "³" -g 49 10 -d "³"
echo -g 0 11 -rd "³" -g 49 11 -d "³"
echo -g 0 12 -rd "³" -g 49 12 -d "³"
echo -g 0 13 -rd "³" -g 49 13 -d "³"
echo -g 0 14 -rd "³" -g 49 14 -d "³"
echo -g 0 15 -rd "³" -g 49 15 -d "³"
echo -g 0 16 -rd "³" -g 49 16 -d "³"
echo -g 0 17 -rd "³" -g 49 17 -d "³"
echo -g 0 18 -rd "³" -g 49 18 -d "³"
echo -g 0 19 -rd "³" -g 49 19 -d "³"
echo -g 0 20 -rd "³" -g 49 20 -d "³"
echo -g 0 21 -rd "³" -g 49 21 -d "³"
echo -g 0 22 -rd "ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ"
exit /b

:refreshplayer
echo /g %playerx% %playery% /c %playercolor% /d "%txp%"
::batbox /c /c 0x07
exit /b

:refreshgui
if %live% LEQ 9 (
   set livedisp=00%live%
) else (
   if %live% LEQ 99 (
      set livedisp=0%live%
   ) else (
      if %live% LEQ 999 (
         set livedisp=%live%
      )
   )   
)
if %hp% LEQ 9 (
   set hpdisp=00%hp%
) else (
   if %hp% LEQ 99 (
      set hpdisp=0%hp%
   ) else (
      if %hp% LEQ 999 (
         set hpdisp=%hp%
      )
   )   
)
if %playerx% LEQ 9 (
   set playerxdisp=0%playerx%
) else (
   set playerxdisp=%playerx%
)
set playerydisp=%playery%
set /a playerydisp-=3
if %playerydisp% LEQ 9 (
   set playerydisp=0%playerydisp%
)
echo -r /g 1 0 /d "ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»"
echo -r /g 1 1 /d "º Lives = %livedisp% HP = %hpdisp% X:%playerxdisp% Y:%playerydisp%               º"
echo -r /g 1 2 /d "ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ"
exit /b
:refreshmap
echo /g 0 0
echo /c %mapcolor% -nd ""
echo /c %mapcolor% -nd ""
echo /c %mapcolor% -nd ""
::echo /c %mapcolor% -nd "ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿"
echo /c %mapcolor% -nd " %mapl1c1%%mapl1c2%%mapl1c3%%mapl1c4%%mapl1c5%%mapl1c6%%mapl1c7%%mapl1c8%%mapl1c9%%mapl1c10%%mapl1c11%%mapl1c12%%mapl1c13%%mapl1c14%%mapl1c15%%mapl1c16%%mapl1c17%%mapl1c18%%mapl1c19%%mapl1c20%%mapl1c21%%mapl1c22%%mapl1c23%%mapl1c24%%mapl1c25%%mapl1c26%%mapl1c27%%mapl1c28%%mapl1c29%%mapl1c30%%mapl1c31%%mapl1c32%%mapl1c33%%mapl1c34%%mapl1c35%%mapl1c36%%mapl1c37%%mapl1c38%%mapl1c39%%mapl1c40%%mapl1c41%%mapl1c42%%mapl1c43%%mapl1c44%%mapl1c45%%mapl1c46%%mapl1c47%%mapl1c48% "
echo /c %mapcolor% -nd " %mapl2c1%%mapl2c2%%mapl2c3%%mapl2c4%%mapl2c5%%mapl2c6%%mapl2c7%%mapl2c8%%mapl2c9%%mapl2c10%%mapl2c11%%mapl2c12%%mapl2c13%%mapl2c14%%mapl2c15%%mapl2c16%%mapl2c17%%mapl2c18%%mapl2c19%%mapl2c20%%mapl2c21%%mapl2c22%%mapl2c23%%mapl2c24%%mapl2c25%%mapl2c26%%mapl2c27%%mapl2c28%%mapl2c29%%mapl2c30%%mapl2c31%%mapl2c32%%mapl2c33%%mapl2c34%%mapl2c35%%mapl2c36%%mapl2c37%%mapl2c38%%mapl2c39%%mapl2c40%%mapl2c41%%mapl2c42%%mapl2c43%%mapl2c44%%mapl2c45%%mapl2c46%%mapl2c47%%mapl2c48% "
echo /c %mapcolor% -nd " %mapl3c1%%mapl3c2%%mapl3c3%%mapl3c4%%mapl3c5%%mapl3c6%%mapl3c7%%mapl3c8%%mapl3c9%%mapl3c10%%mapl3c11%%mapl3c12%%mapl3c13%%mapl3c14%%mapl3c15%%mapl3c16%%mapl3c17%%mapl3c18%%mapl3c19%%mapl3c20%%mapl3c21%%mapl3c22%%mapl3c23%%mapl3c24%%mapl3c25%%mapl3c26%%mapl3c27%%mapl3c28%%mapl3c29%%mapl3c30%%mapl3c31%%mapl3c32%%mapl3c33%%mapl3c34%%mapl3c35%%mapl3c36%%mapl3c37%%mapl3c38%%mapl3c39%%mapl3c40%%mapl3c41%%mapl3c42%%mapl3c43%%mapl3c44%%mapl3c45%%mapl3c46%%mapl3c47%%mapl3c48% "
echo /c %mapcolor% -nd " %mapl4c1%%mapl4c2%%mapl4c3%%mapl4c4%%mapl4c5%%mapl4c6%%mapl4c7%%mapl4c8%%mapl4c9%%mapl4c10%%mapl4c11%%mapl4c12%%mapl4c13%%mapl4c14%%mapl4c15%%mapl4c16%%mapl4c17%%mapl4c18%%mapl4c19%%mapl4c20%%mapl4c21%%mapl4c22%%mapl4c23%%mapl4c24%%mapl4c25%%mapl4c26%%mapl4c27%%mapl4c28%%mapl4c29%%mapl4c30%%mapl4c31%%mapl4c32%%mapl4c33%%mapl4c34%%mapl4c35%%mapl4c36%%mapl4c37%%mapl4c38%%mapl4c39%%mapl4c40%%mapl4c41%%mapl4c42%%mapl4c43%%mapl4c44%%mapl4c45%%mapl4c46%%mapl4c47%%mapl4c48% "
echo /c %mapcolor% -nd " %mapl5c1%%mapl5c2%%mapl5c3%%mapl5c4%%mapl5c5%%mapl5c6%%mapl5c7%%mapl5c8%%mapl5c9%%mapl1c10%%mapl5c11%%mapl5c12%%mapl5c13%%mapl5c14%%mapl5c15%%mapl5c16%%mapl5c17%%mapl5c18%%mapl5c19%%mapl5c20%%mapl5c21%%mapl5c22%%mapl5c23%%mapl5c24%%mapl5c25%%mapl5c26%%mapl5c27%%mapl5c28%%mapl5c29%%mapl5c30%%mapl5c31%%mapl5c32%%mapl5c33%%mapl5c34%%mapl5c35%%mapl5c36%%mapl5c37%%mapl5c38%%mapl5c39%%mapl5c40%%mapl5c41%%mapl5c42%%mapl5c43%%mapl5c44%%mapl5c45%%mapl5c46%%mapl5c47%%mapl5c48% "
echo /c %mapcolor% -nd " %mapl6c1%%mapl6c2%%mapl6c3%%mapl6c4%%mapl6c5%%mapl6c6%%mapl6c7%%mapl6c8%%mapl6c9%%mapl6c10%%mapl6c11%%mapl6c12%%mapl6c13%%mapl6c14%%mapl6c15%%mapl6c16%%mapl6c17%%mapl6c18%%mapl6c19%%mapl6c20%%mapl6c21%%mapl6c22%%mapl6c23%%mapl6c24%%mapl6c25%%mapl6c26%%mapl6c27%%mapl6c28%%mapl6c29%%mapl6c30%%mapl6c31%%mapl6c32%%mapl6c33%%mapl6c34%%mapl6c35%%mapl6c36%%mapl6c37%%mapl6c38%%mapl6c39%%mapl6c40%%mapl6c41%%mapl6c42%%mapl6c43%%mapl6c44%%mapl6c45%%mapl6c46%%mapl6c47%%mapl6c48% "
echo /c %mapcolor% -nd " %mapl7c1%%mapl7c2%%mapl7c3%%mapl7c4%%mapl7c5%%mapl7c6%%mapl7c7%%mapl7c8%%mapl7c9%%mapl7c10%%mapl7c11%%mapl7c12%%mapl7c13%%mapl7c14%%mapl7c15%%mapl7c16%%mapl7c17%%mapl7c18%%mapl7c19%%mapl7c20%%mapl7c21%%mapl7c22%%mapl7c23%%mapl7c24%%mapl7c25%%mapl7c26%%mapl7c27%%mapl7c28%%mapl7c29%%mapl7c30%%mapl7c31%%mapl7c32%%mapl7c33%%mapl7c34%%mapl7c35%%mapl7c36%%mapl7c37%%mapl7c38%%mapl7c39%%mapl7c40%%mapl7c41%%mapl7c42%%mapl7c43%%mapl7c44%%mapl7c45%%mapl7c46%%mapl7c47%%mapl7c48% "
echo /c %mapcolor% -nd " %mapl8c1%%mapl8c2%%mapl8c3%%mapl8c4%%mapl8c5%%mapl8c6%%mapl8c7%%mapl8c8%%mapl8c9%%mapl8c10%%mapl8c11%%mapl8c12%%mapl8c13%%mapl8c14%%mapl8c15%%mapl8c16%%mapl8c17%%mapl8c18%%mapl8c19%%mapl8c20%%mapl8c21%%mapl8c22%%mapl8c23%%mapl8c24%%mapl8c25%%mapl8c26%%mapl8c27%%mapl8c28%%mapl8c29%%mapl8c30%%mapl8c31%%mapl8c32%%mapl8c33%%mapl8c34%%mapl8c35%%mapl8c36%%mapl8c37%%mapl8c38%%mapl8c39%%mapl8c40%%mapl8c41%%mapl8c42%%mapl8c43%%mapl8c44%%mapl8c45%%mapl8c46%%mapl8c47%%mapl8c48% "
echo /c %mapcolor% -nd " %mapl9c1%%mapl9c2%%mapl9c3%%mapl9c4%%mapl9c5%%mapl9c6%%mapl9c7%%mapl9c8%%mapl9c9%%mapl9c10%%mapl9c11%%mapl9c12%%mapl9c13%%mapl9c14%%mapl9c15%%mapl9c16%%mapl9c17%%mapl9c18%%mapl9c19%%mapl9c20%%mapl9c21%%mapl9c22%%mapl9c23%%mapl9c24%%mapl9c25%%mapl9c26%%mapl9c27%%mapl9c28%%mapl9c29%%mapl9c30%%mapl9c31%%mapl9c32%%mapl9c33%%mapl9c34%%mapl9c35%%mapl9c36%%mapl9c37%%mapl9c38%%mapl9c39%%mapl9c40%%mapl9c41%%mapl9c42%%mapl9c43%%mapl9c44%%mapl9c45%%mapl9c46%%mapl9c47%%mapl9c48% "
echo /c %mapcolor% -nd " %mapl10c1%%mapl10c2%%mapl10c3%%mapl10c4%%mapl10c5%%mapl10c6%%mapl10c7%%mapl10c8%%mapl10c9%%mapl10c10%%mapl10c11%%mapl10c12%%mapl10c13%%mapl10c14%%mapl10c15%%mapl10c16%%mapl10c17%%mapl10c18%%mapl10c19%%mapl10c20%%mapl10c21%%mapl10c22%%mapl10c23%%mapl10c24%%mapl10c25%%mapl10c26%%mapl10c27%%mapl10c28%%mapl10c29%%mapl10c30%%mapl10c31%%mapl10c32%%mapl10c33%%mapl10c34%%mapl10c35%%mapl10c36%%mapl10c37%%mapl10c38%%mapl10c39%%mapl10c40%%mapl10c41%%mapl10c42%%mapl10c43%%mapl10c44%%mapl10c45%%mapl10c46%%mapl10c47%%mapl10c48% "
echo /c %mapcolor% -nd " %mapl11c1%%mapl11c2%%mapl11c3%%mapl11c4%%mapl11c5%%mapl11c6%%mapl11c7%%mapl11c8%%mapl11c9%%mapl11c10%%mapl11c11%%mapl11c12%%mapl11c13%%mapl11c14%%mapl11c15%%mapl11c16%%mapl11c17%%mapl11c18%%mapl11c19%%mapl11c20%%mapl11c21%%mapl11c22%%mapl11c23%%mapl11c24%%mapl11c25%%mapl11c26%%mapl11c27%%mapl11c28%%mapl11c29%%mapl11c30%%mapl11c31%%mapl11c32%%mapl11c33%%mapl11c34%%mapl11c35%%mapl11c36%%mapl11c37%%mapl11c38%%mapl11c39%%mapl11c40%%mapl11c41%%mapl11c42%%mapl11c43%%mapl11c44%%mapl11c45%%mapl11c46%%mapl11c47%%mapl11c48% "
echo /c %mapcolor% -nd " %mapl12c1%%mapl12c2%%mapl12c3%%mapl12c4%%mapl12c5%%mapl12c6%%mapl12c7%%mapl12c8%%mapl12c9%%mapl12c10%%mapl12c11%%mapl12c12%%mapl12c13%%mapl12c14%%mapl12c15%%mapl12c16%%mapl12c17%%mapl12c18%%mapl12c19%%mapl12c20%%mapl12c21%%mapl12c22%%mapl12c23%%mapl12c24%%mapl12c25%%mapl12c26%%mapl12c27%%mapl12c28%%mapl12c29%%mapl12c30%%mapl12c31%%mapl12c32%%mapl12c33%%mapl12c34%%mapl12c35%%mapl12c36%%mapl12c37%%mapl12c38%%mapl12c39%%mapl12c40%%mapl12c41%%mapl12c42%%mapl12c43%%mapl12c44%%mapl12c45%%mapl12c46%%mapl12c47%%mapl12c48% "
echo /c %mapcolor% -nd " %mapl13c1%%mapl13c2%%mapl13c3%%mapl13c4%%mapl13c5%%mapl13c6%%mapl13c7%%mapl13c8%%mapl13c9%%mapl13c10%%mapl13c11%%mapl13c12%%mapl13c13%%mapl13c14%%mapl13c15%%mapl13c16%%mapl13c17%%mapl13c18%%mapl13c19%%mapl13c20%%mapl13c21%%mapl13c22%%mapl13c23%%mapl13c24%%mapl13c25%%mapl13c26%%mapl13c27%%mapl13c28%%mapl13c29%%mapl13c30%%mapl13c31%%mapl13c32%%mapl13c33%%mapl13c34%%mapl13c35%%mapl13c36%%mapl13c37%%mapl13c38%%mapl13c39%%mapl13c40%%mapl13c41%%mapl13c42%%mapl13c43%%mapl13c44%%mapl13c45%%mapl13c46%%mapl13c47%%mapl13c48% "
echo /c %mapcolor% -nd " %mapl14c1%%mapl14c2%%mapl14c3%%mapl14c4%%mapl14c5%%mapl14c6%%mapl14c7%%mapl14c8%%mapl14c9%%mapl14c10%%mapl14c11%%mapl14c12%%mapl14c13%%mapl14c14%%mapl14c15%%mapl14c16%%mapl14c17%%mapl14c18%%mapl14c19%%mapl14c20%%mapl14c21%%mapl14c22%%mapl14c23%%mapl14c24%%mapl14c25%%mapl14c26%%mapl14c27%%mapl14c28%%mapl14c29%%mapl14c30%%mapl14c31%%mapl14c32%%mapl14c33%%mapl14c34%%mapl14c35%%mapl14c36%%mapl14c37%%mapl14c38%%mapl14c39%%mapl14c40%%mapl14c41%%mapl14c42%%mapl14c43%%mapl14c44%%mapl14c45%%mapl14c46%%mapl14c47%%mapl14c48% "
echo /c %mapcolor% -nd " %mapl15c1%%mapl15c2%%mapl15c3%%mapl15c4%%mapl15c5%%mapl15c6%%mapl15c7%%mapl15c8%%mapl15c9%%mapl15c10%%mapl15c11%%mapl15c12%%mapl15c13%%mapl15c14%%mapl15c15%%mapl15c16%%mapl15c17%%mapl15c18%%mapl15c19%%mapl15c20%%mapl15c21%%mapl15c22%%mapl15c23%%mapl15c24%%mapl15c25%%mapl15c26%%mapl15c27%%mapl15c28%%mapl15c29%%mapl15c30%%mapl15c31%%mapl15c32%%mapl15c33%%mapl15c34%%mapl15c35%%mapl15c36%%mapl15c37%%mapl15c38%%mapl15c39%%mapl15c40%%mapl15c41%%mapl15c42%%mapl15c43%%mapl15c44%%mapl15c45%%mapl15c46%%mapl15c47%%mapl15c48% "
echo /c %mapcolor% -nd " %mapl16c1%%mapl16c2%%mapl16c3%%mapl16c4%%mapl16c5%%mapl16c6%%mapl16c7%%mapl16c8%%mapl16c9%%mapl16c10%%mapl16c11%%mapl16c12%%mapl16c13%%mapl16c14%%mapl16c15%%mapl16c16%%mapl16c17%%mapl16c18%%mapl16c19%%mapl16c20%%mapl16c21%%mapl16c22%%mapl16c23%%mapl16c24%%mapl16c25%%mapl16c26%%mapl16c27%%mapl16c28%%mapl16c29%%mapl16c30%%mapl16c31%%mapl16c32%%mapl16c33%%mapl16c34%%mapl16c35%%mapl16c36%%mapl16c37%%mapl16c38%%mapl16c39%%mapl16c40%%mapl16c41%%mapl16c42%%mapl16c43%%mapl16c44%%mapl16c45%%mapl16c46%%mapl16c47%%mapl16c48% "
echo /c %mapcolor% -nd " %mapl17c1%%mapl17c2%%mapl17c3%%mapl17c4%%mapl17c5%%mapl17c6%%mapl17c7%%mapl17c8%%mapl17c9%%mapl17c10%%mapl17c11%%mapl17c12%%mapl17c13%%mapl17c14%%mapl17c15%%mapl17c16%%mapl17c17%%mapl17c18%%mapl17c19%%mapl17c20%%mapl17c21%%mapl17c22%%mapl17c23%%mapl17c24%%mapl17c25%%mapl17c26%%mapl17c27%%mapl17c28%%mapl17c29%%mapl17c30%%mapl17c31%%mapl17c32%%mapl17c33%%mapl17c34%%mapl17c35%%mapl17c36%%mapl17c37%%mapl17c38%%mapl17c39%%mapl17c40%%mapl17c41%%mapl17c42%%mapl17c43%%mapl17c44%%mapl17c45%%mapl17c46%%mapl17c47%%mapl17c48% "
echo /c %mapcolor% -nd " %mapl18c1%%mapl18c2%%mapl18c3%%mapl18c4%%mapl18c5%%mapl18c6%%mapl18c7%%mapl18c8%%mapl18c9%%mapl18c10%%mapl18c11%%mapl18c12%%mapl18c13%%mapl18c14%%mapl18c15%%mapl18c16%%mapl18c17%%mapl18c18%%mapl18c19%%mapl18c20%%mapl18c21%%mapl18c22%%mapl18c23%%mapl18c24%%mapl18c25%%mapl18c26%%mapl18c27%%mapl18c28%%mapl18c29%%mapl18c30%%mapl18c31%%mapl18c32%%mapl18c33%%mapl18c34%%mapl18c35%%mapl18c36%%mapl18c37%%mapl18c38%%mapl18c39%%mapl18c40%%mapl18c41%%mapl18c42%%mapl18c43%%mapl18c44%%mapl18c45%%mapl18c46%%mapl18c47%%mapl18c48% "
::echo -rnd "ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ"
::batbox /g 1 4 /d "%mapl1c1%%mapl1c2%%mapl1c3%%mapl1c4%%mapl1c5%%mapl1c6%%mapl1c7%%mapl1c8%%mapl1c9%%mapl1c10%%mapl1c11%%mapl1c12%%mapl1c13%%mapl1c14%%mapl1c15%%mapl1c16%%mapl1c17%%mapl1c18%%mapl1c19%%mapl1c20%%mapl1c21%%mapl1c22%%mapl1c23%%mapl1c24%"
::batbox /g 1 5 /d "%mapl2c1%%mapl2c2%%mapl2c3%%mapl2c4%%mapl2c5%%mapl2c6%%mapl2c7%%mapl2c8%%mapl2c9%%mapl2c10%%mapl2c11%%mapl2c12%%mapl2c13%%mapl2c14%%mapl2c15%%mapl2c16%%mapl2c17%%mapl2c18%%mapl2c19%%mapl2c20%%mapl2c21%%mapl2c22%%mapl2c23%%mapl2c24%"
::batbox /g 1 6 /d "%mapl3c1%%mapl3c2%%mapl3c3%%mapl3c4%%mapl3c5%%mapl3c6%%mapl3c7%%mapl3c8%%mapl3c9%%mapl3c10%%mapl3c11%%mapl3c12%%mapl3c13%%mapl3c14%%mapl3c15%%mapl3c16%%mapl3c17%%mapl3c18%%mapl3c19%%mapl3c20%%mapl3c21%%mapl3c22%%mapl3c23%%mapl3c24%"
::batbox /g 1 7 /d "%mapl4c1%%mapl4c2%%mapl4c3%%mapl4c4%%mapl4c5%%mapl4c6%%mapl4c7%%mapl4c8%%mapl4c9%%mapl4c10%%mapl4c11%%mapl4c12%%mapl4c13%%mapl4c14%%mapl4c15%%mapl4c16%%mapl4c17%%mapl4c18%%mapl4c19%%mapl4c20%%mapl4c21%%mapl4c22%%mapl4c23%%mapl4c24%"
::batbox /g 1 8 /d "%mapl5c1%%mapl5c2%%mapl5c3%%mapl5c4%%mapl5c5%%mapl5c6%%mapl5c7%%mapl5c8%%mapl5c9%%mapl1c10%%mapl5c11%%mapl5c12%%mapl5c13%%mapl5c14%%mapl5c15%%mapl5c16%%mapl5c17%%mapl5c18%%mapl5c19%%mapl5c20%%mapl5c21%%mapl5c22%%mapl5c23%%mapl5c24%"
::batbox /g 1 9 /d "%mapl6c1%%mapl6c2%%mapl6c3%%mapl6c4%%mapl6c5%%mapl6c6%%mapl6c7%%mapl6c8%%mapl6c9%%mapl6c10%%mapl6c11%%mapl6c12%%mapl6c13%%mapl6c14%%mapl6c15%%mapl6c16%%mapl6c17%%mapl6c18%%mapl6c19%%mapl6c20%%mapl6c21%%mapl6c22%%mapl6c23%%mapl6c24%"
::batbox /g 1 10 /d "%mapl7c1%%mapl7c2%%mapl7c3%%mapl7c4%%mapl7c5%%mapl7c6%%mapl7c7%%mapl7c8%%mapl7c9%%mapl7c10%%mapl7c11%%mapl7c12%%mapl7c13%%mapl7c14%%mapl7c15%%mapl7c16%%mapl7c17%%mapl7c18%%mapl7c19%%mapl7c20%%mapl7c21%%mapl7c22%%mapl7c23%%mapl7c24%"
::batbox /g 1 11 /d "%mapl8c1%%mapl8c2%%mapl8c3%%mapl8c4%%mapl8c5%%mapl8c6%%mapl8c7%%mapl8c8%%mapl8c9%%mapl8c10%%mapl8c11%%mapl8c12%%mapl8c13%%mapl8c14%%mapl8c15%%mapl8c16%%mapl8c17%%mapl8c18%%mapl8c19%%mapl8c20%%mapl8c21%%mapl8c22%%mapl8c23%%mapl8c24%"
::batbox /g 1 12 /d "%mapl9c1%%mapl9c2%%mapl9c3%%mapl9c4%%mapl9c5%%mapl9c6%%mapl9c7%%mapl9c8%%mapl9c9%%mapl9c10%%mapl9c11%%mapl9c12%%mapl9c13%%mapl9c14%%mapl9c15%%mapl9c16%%mapl9c17%%mapl9c18%%mapl9c19%%mapl9c20%%mapl9c21%%mapl9c22%%mapl9c23%%mapl9c24%"
::batbox /g 1 13 /d "%mapl10c1%%mapl10c2%%mapl10c3%%mapl10c4%%mapl10c5%%mapl10c6%%mapl10c7%%mapl10c8%%mapl10c9%%mapl10c10%%mapl10c11%%mapl10c12%%mapl10c13%%mapl10c14%%mapl10c15%%mapl10c16%%mapl10c17%%mapl10c18%%mapl10c19%%mapl10c20%%mapl10c21%%mapl10c22%%mapl10c23%%mapl10c24%"
::batbox /g 1 14 /d "%mapl11c1%%mapl11c2%%mapl11c3%%mapl11c4%%mapl11c5%%mapl11c6%%mapl11c7%%mapl11c8%%mapl11c9%%mapl11c10%%mapl11c11%%mapl11c12%%mapl11c13%%mapl11c14%%mapl11c15%%mapl11c16%%mapl11c17%%mapl11c18%%mapl11c19%%mapl11c20%%mapl11c21%%mapl11c22%%mapl11c23%%mapl11c24%"
::batbox /g 1 15 /d "%mapl12c1%%mapl12c2%%mapl12c3%%mapl12c4%%mapl12c5%%mapl12c6%%mapl12c7%%mapl12c8%%mapl12c9%%mapl12c10%%mapl12c11%%mapl12c12%%mapl12c13%%mapl12c14%%mapl12c15%%mapl12c16%%mapl12c17%%mapl12c18%%mapl12c19%%mapl12c20%%mapl12c21%%mapl12c22%%mapl12c23%%mapl12c24%"
call :refreshwindow
exit /b
:refreshend
set /a tmpx=%endx%+1
set /a tmpy=%endy%-3
echo /g %endx% %endy% /c %endcolor% /d "%txf%"
echo /c 0x07
echo /g %tmpx% %endy% /d "!mapl%tmpy%c%tmpx%!"

exit /b
:error
if %1 == map1 (
   echo -rs
   echo === Bengine =======================================
   echo.
   echo ERROR
   echo Please enter a correct map name.   
)
if %1 == map2 (
   echo -rs
   echo === Bengine =======================================
   echo.
   echo ERROR
   echo Map missing. Invalid name ?
)
if %1 == map3 (
   echo -rs
   echo === Bengine =======================================
   echo.
   echo ERROR
   echo Missing map files.
)
if %1 == map4 (
   echo -rs
   echo === Bengine =======================================
   echo.
   echo ERROR
   echo Missing argument.
)
pause >nul
goto %2
:drawwindow
REM 1 window h 2 windows w 3 window x 4 window y
REM soon

:Loadtextfromfile
(
set /p Line1=
set /p Line2=
set /p Line3=
set /p Line4=
set /p Line5=
set /p Line6=
set /p Line7=
set /p Line8=
set /p Line9=
set /p Line10=
set /p Line11=
set /p Line12=
set /p Line13=
set /p Line14=
set /p Line15=
set /p Line16=
set /p Line17=
set /p Line18=
)<map.bat

for /L %%g in (1,1,18) do (
    for /L %%h in (0,1,48) do (
        set /a tmph=%%h-1
        call set mapl%%gc%%h=%%Line%%g:~!tmph!,1%%

    )
)
exit /b
:makedarkboxi
:://CODE DE RECONSTRUCTION DE darkbox_i.exe GENERER PAR XOO64ENCODER By SachaDee
(echo option explicit
echo Dim inByteArray, base64Decoded, outByteArray,InputFile,OutFile,FSO, oFile,strData
echo InputFile = "B64TMP.txt"
echo OutFile = "darkbox_i.exe"
echo Set FSO = CreateObject("Scripting.FileSystemObject"^)
echo Set oFile = FSO.OpenTextFile(InputFile^)
echo strData = oFile.ReadAll
echo oFile.Close
echo base64Decoded = decodeBase64(strData^)
echo writeBytes outFile, base64Decoded
echo    private function decodeBase64(base64^)
echo dim DM, EL
echo Set DM = CreateObject("Microsoft.XMLDOM"^)
echo Set EL = DM.createElement("tmp"^)
echo  EL.DataType = "bin.base64"
echo  EL.Text = base64
echo  decodeBase64 = EL.NodeTypedValue
echo end function
echo  private Sub writeBytes(file, bytes^)
echo    Dim binaryStream
echo    Set binaryStream = CreateObject("ADODB.Stream"^)
echo       binaryStream.Type = 1
echo       binaryStream.Open
echo       binaryStream.Write bytes
echo       binaryStream.SaveToFile file, 2
echo       End Sub
echo wscript.quit
)>darkbox_i.exe.vbs
(
set /p =TVqQAAMAAAAEAAAA//8AALgAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1vZGUuDQ0KJAAAAAAAAABQRQAATAEDAAAAAAAAAAAAAAAAAOAADwMLAQYAABAAAAAQAAAAMAAAoE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AAAAAAAAAAAAAAAAAAAbVAAAFhQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHhQAACGUAAAllAAAKZQAAC0UAAAwlAAAAAAAADQUAAAAAAAAEtFUk5FTDMyLkRMTABtc3ZjcnQuZGxsAAAATG9hZExpYnJhcnlBAABHZXRQcm9jQWRkcmVzcwAAVmlydHVhbFByb3RlY3QAAFZpcnR1YWxBbGxvYwAAVmlydHVhbEZyZWUAAABFeGl0UHJvY2VzcwAAAHB1dHMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
)>B64TMP.txt <nul
cscript /nologo darkbox_i.exe.vbs
2>nul del darkbox_i.exe.vbs
2>nul del "B64TMP.TXT"
exit /b
:makedarkbox
:://CODE DE RECONSTRUCTION DE darkbox.exe GENERER PAR XOO64ENCODER By SachaDee
(echo option explicit
echo Dim inByteArray, base64Decoded, outByteArray,InputFile,OutFile,FSO, oFile,strData
echo InputFile = "B64TMP.txt"
echo OutFile = "darkbox.exe"
echo Set FSO = CreateObject("Scripting.FileSystemObject"^)
echo Set oFile = FSO.OpenTextFile(InputFile^)
echo strData = oFile.ReadAll
echo oFile.Close
echo base64Decoded = decodeBase64(strData^)
echo writeBytes outFile, base64Decoded
echo    private function decodeBase64(base64^)
echo dim DM, EL
echo Set DM = CreateObject("Microsoft.XMLDOM"^)
echo Set EL = DM.createElement("tmp"^)
echo  EL.DataType = "bin.base64"
echo  EL.Text = base64
echo  decodeBase64 = EL.NodeTypedValue
echo end function
echo  private Sub writeBytes(file, bytes^)
echo    Dim binaryStream
echo    Set binaryStream = CreateObject("ADODB.Stream"^)
echo       binaryStream.Type = 1
echo       binaryStream.Open
echo       binaryStream.Write bytes
echo       binaryStream.SaveToFile file, 2
echo       End Sub
echo wscript.quit
)>darkbox.exe.vbs
(
set /p =TVqQAAMAAAAEAAAA//8AALgAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1vZGUuDQ0KJAAAAAAAAABQRQAATAEDAAAAAAAAAAAAAAAAAOAADwMLAQYAABAAAAAQAAAAQAAAcFoAAABQAAAAYAAAAABAAAAQAAAAAgAABAAAAAAAAAAEAAAAAAAAAABwAAAAEAAAAAAAAAMAAAAAABAAABAAAAAAEAAAEAAAAAAAABAAAAAAAAAAAAAAAABgAADYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFVQWDAAAAAAAEAAAAAQAAAAAAAAAAIAAAAAAAAAAAAAAAAAAIAAAOBVUFgxAAAAAAAQAAAAUAAAAAwAAAACAAAAAAAAAAAAAAAAAABAAADgVVBYMgAAAAAAEAAAAGAAAAACAAAADgAAAAAAAAAAAAAAAAAAQAAAwDMuOTEAVVBYIQ0JAgjiZqeKeGkYx0IzAABaCgAAABoAACYBAIz/L9/8VYnlgewAkFO49f9Q6AEAEByJBbA1QPax2O4AuLQEUIsLFyRbycMwNvc/MgSLRQiD+AAPjBENC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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
)>B64TMP.txt <nul
cscript /nologo darkbox.exe.vbs
2>nul del darkbox.exe.vbs
2>nul del "B64TMP.TXT"
exit /b
:makebatbox
for %%b in (
 4D534346000000001D040000000000002C000000000000000301010001000000
 000000004700000001000100000800000000000000001C437A4D200062617462
 6F782E6578650000D407ABCE030008434BBD557F681B75147F973665B3B5894D
 0E0B3A768355C6C0E20F8A522964B475AB4B66C8C5056430D3E692BB2CBD0B77
 171B717F6434016705270CEC1F433A2A8A0A4E648E3AFF584BC58158F06FFDC3
 E21FDAFC63FDC71FE0B6F3F3EEAE4D0AC32AA85FFAB97BEFF3DEF77DDF7BDF77
 69E2F91A0944D44961721CA2182B5831DA7DD580DEFDD77BE9EADEB5034B427C
 ED405AD52CA96C1A05333B2D4D6575DDB0A54945322BBAA4E9D2D8B3B2346DE4
 94C17BEF39B81523394E1417047AE2FD7DA92D6E9D4242B7203C4D5D50BA7C32
 DC06CE8EDF01223F5DE4EF2FC9E35FD7883ADAF76D7BFAAABFFEE823AA04FE46
 B1FFF21ACC97B236DE6F07FD84BABCBCDBD70BDC8AFF78A935314645EFA5DAFC
 28E3E1880F32FD8B23DE8AC468F12C2BBFFA4A15CAC671A43AFA6AA4F6A5F4A8
 93FFB49B86DFDCEC8B51A87E18FCD1C2F73F37BF711C67630FB4A43374D68DD8
 198D51731574ED65E174A8D18BC31DF1204C8DE550FD03F08ED80F6D844B0E35
 BA5D33134187C7C411253EF71A6EB123F831CE1AE0695DAC3379D925AF815C59
 0F0B41E69C21EFE91DBD878F3EC619BD08D79BC1EB7DDE782FB2A0BA8F77FAD8
 310AF7E67E762CC2516E67F7822DF63B4355372221A2D73A417DC53DC9E37BC0
 CF8EB001CD58C396FCEC08DB03A1C60D68BF05E7A1DC86146A5CC1736EE435E8
 E7EFAC6C86CFFDC0055DBEE037E40D583B5CEF64E6A4FA5E2B8F737790DD15AF
 2561AEABCCC45B5C0DB765E3224BDC8B660606F5525B1BFAE1BEC143B7B8C017
 DD6E8A72A48738521AF6F3373100603238630977DEEC61CB307F786ED1DB772A
 F1B6CDDBBEB1F61455829FB95315C02C174976C479DEBEC61EFDE08B1E79089B
 673FEF595DF931E0BC7B03B9CE0679F43AE7F6F16BEE81C6B7A13A7FAEAB45F2
 EE7DC0A281DCB0FBB7737CAD708C3E047E024E01F7DF17A387812F804F80EF80
 A338200C1C06CE14B253B9696346B5CAF9DFA3AD38A723445191E8EB488B2B42
 BE057CD4C655212F0117DAB83AE4F9C8DD3FAF847C7234951E1C8BC7E9F878EA
 C478FCF1C75C859E93C7535B7266E24422E189B4E0075AD80E982C655F928D8A
 9E3BC2DAB2CF2F6FDB65D598C9687ACE9861ED108A7A127806C80135E0227009
 B80A7C05ACFB85FF135F7CD68A2DDBB963593D5752DC73157BD4D02DA3A424F0
 9BBE93492B55FB886D9BDA64C5567658462BA6659849C3D26CCDD079574AC9E6
 7CE3845EAED85CA65C5294F25DF64DE879C3CF6517BED591568C31CD2AA3996E
 BA8FE0B2878131200D9C02F2A257E95FD988CAA6A6DB7977680A8A3DA5BA128B
 D3594DCF9A050BBA52D56C973F33A97A92659BB651FAFFFFCFECB6FE04     
 ) Do >>t.dat (Echo.For b=1 To len^("%%b"^) Step 2
 ECHO WScript.StdOut.Write Chr^(Clng^("&H"^&Mid^("%%b",b,2^)^)^) : Next)
 Cscript /b /e:vbs t.dat>batbox.ex_
 Del /f /q /a t.dat >nul 2>&1
 Expand -r batbox.ex_ >nul 2>&1
 Del /f /q /a batbox.ex_ >nul 2>&1
 exit /B

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
::MODDING PART
::Follow intruction to add blocs
:gravity
if %playery% LEQ 3 exit /b
if %playery% GTR 20 goto dead
set /a tmpx=%playerx%
set /a tmpy=%playery%-2
set /a tmpy2=%playery%-3
set tmpvalue3=mapl!tmpy2!c!playerx!
set tmpvalue=mapl!tmpy!c!tmpx!
call set tmpvalue2=%%%tmpvalue%%%
::solid block that you can't fall off
::if %tmpvalue2% == %YY% (...)
::YY = texture that you can't fall off
if %tmpvalue2% == %tx1% (
    set isfalling=0
    exit /b
)
::end
call set tmpvalue4=%%%tmpvalue3%%%
echo /c %mapcolor% /g %playerx% %playery% /d "%tmpvalue4%"
set /a playery+=1
set /a falltick+=1
set isfalling=1
call :refreshplayer
call :refreshgui
if %gravityspeed% == 0 exit /b
call :wait %gravityspeed%
exit /b



:jump
::if %tmptickcount2% NEQ %tickcount% exit /b
if %playery% LEQ 4 exit /b
set /a tmpx=%playerx%
set /a tmpy=%playery%-4
set /a tmpy2=%playery%-3
set tmpvalue3=mapl!tmpy2!c!playerx!
set tmpvalue=mapl!tmpy!c!tmpx!
call set tmpvalue2=%%%tmpvalue%%%
::solid block that you can't jump on (!=air)
::if %tmpvalue2% == %YY%
::YY = texture that you can't jump on
if %tmpvalue2% == %tx1% exit /b
::end
call set tmpvalue4=%%%tmpvalue3%%%
echo /c %mapcolor% /g %playerx% %playery% /d "%tmpvalue4%"
set /a playery-=1
set isjumping=1
set /a tmptickcount=%tickcount%+%jumpgravity%
set /a tmptickcount2=%tickcount%+%jumpgravity%+2
call :refreshplayer
call :refreshgui

exit /b


:movel
::if %playerx% GEQ 24 exit /b
if %playerx% LEQ 1 exit /b
set /a tmpx=%playerx%-1
set /a tmpy=%playery%-3
set tmpvalue3=mapl!tmpy!c!playerx!
set tmpvalue=mapl!tmpy!c!tmpx!
call set tmpvalue2=%%%tmpvalue%%%
::solid block that you can't walk in while moving left
::if %tmpvalue2% == %YY%
::YY = texture that you can't walk in while moving left
if %tmpvalue2% == %tx1% exit /b
::end
call set tmpvalue4=%%%tmpvalue3%%%
echo /c %mapcolor% /g %playerx% %playery% /d "%tmpvalue4%"
set /a playerx-=1
call :refreshplayer
call :refreshgui
exit /b



:mover
if %playerx% GEQ 48 exit /b
::if %playerx% LEQ 1 exit /b
set /a tmpx=%playerx%+1
set /a tmpy=%playery%-3
set tmpvalue3=mapl!tmpy!c!playerx!
set tmpvalue=mapl!tmpy!c!tmpx!
call set tmpvalue2=%%%tmpvalue%%%
::solid block that you can't walk in while moving right
::if %tmpvalue2% == %YY%
::YY = texture that you can't walk in while moving right
if %tmpvalue2% == %tx1% exit /b
::end
call set tmpvalue4=%%%tmpvalue3%%%
echo /c %mapcolor% /g %playerx% %playery% /d "%tmpvalue4%"
set /a playerx+=1
call :refreshplayer
call :refreshgui
exit /b


Téléchargement:
http://www.sendspace.com/file/oyxwev

Change log :

Code:

=======================================
Bengine Change Log :

0.0.1 :
+Sortie de Bengine

0.0.1.5:
+Bugs fixes
+Optimisation des fichiers maps
+Ajout de configs
+Ajout de Textures

0.0.2:
+Changement de taille de la carte 12*24 => 18*48
+Bugs fixes
+Ajout de la barre de chargement
+Ajout de configs
+Ajout de "vrai" menu

0.0.2.5:
+Bugs fixes
+Ajout de configs
+Ajout de la "console" activable avec la config "set cheats=1" et ouvrable avec "/"
+Optimisation des chargements / fluidité in+game
+Facilité à ajouter des "blocs" et textures

0.0.3
+Passage de batbox +> darkbox
+Bugs fixes
+Ajout de configs
+Ajout du système de cache
+Ajout de la catégorie "maps config"
+Ajout de "cache option"

0.0.3.1
+Ajout du système de gameover (il était temps xD) / Vie
+Bug fixes

0.0.3.2
+Bug fixes
+Ajout du dégat de chute
+Ajout de configs
+Ajout du système d'hp
-la commande /infammo useless

0.0.3.3
+Ajout du système de changement de couleur lorsque le joueur prend un dégat
+Optimisations...
+Ajout de /infhp

0.0.3.3a
+Optimisation de la darkbox (thx TSnake41)


Proposez moi des suggestions pour l'avenir du jeu ^^



Dernière édition par andro24 le Sam 18 Fév 2017 - 11:00; édité 1 fois
Message Publicité 
PublicitéSupprimer les publicités ?


Répondre en citant
Message B-Engine // Alpha 
Bonjour, pas mal du tout, juste quelques petites recommandations :
    - N'hésite pas à utiliser la dernière version de darkbox, elle corrige diverses bugs et ajoute quelques fonctionnalités utiles : http://batch.xoo.it/p42795.htm

    Code:
    taskkill /f /im darkbox.exe >nul
    taskkill /f /im darkbox_i.exe >nul
    exit
    C'est une façon un peu brutale de stopper darkbox (sachant en plus que darkbox_i n'est en théorie jamais en exécution quand on tente de le tuer) Mr. Green, essaie
    Code:
    echo -rsq
    exit
    ce sera bien plus stable.

    - Je n'aime pas trop faire :
    Code:
    if not exist darkbox.exe call :makedarkbox
    if not exist darkbox_i.exe call :makedarkboxi
    étant donné qu'il y a des cas où darkbox n'est pas dans le même dossier que le programme ou encore des cas spéciaux où darkbox n'a pas d'extention .exe (par exemple avec darkbox/Dos9 sur Linux), le soucis reste de savoir si darkbox est disponible, je te propose ça du coup :
    Code:
    darkbox -? || call :gendarkbox
    darkbox_i -? || call :gendarkbox_i


    - Aussi, pense a bien nettoyer ton code en enlevant certaines parties inutiles tout en optimisant, ça se fera automatiquement dans le futur et comme je ne suis pas un pro dans l'optimisation d'un .bat, je laisserais cette tâche aux autres ^^ Mr. Green


Voilà tout, bonne chance pour la suite Okay.




______________________________________________________
Partager permet le savoir. Le savoir permet de partager de nouveau savoirs.
Répondre en citant
Message B-Engine // Alpha 
TSnake41 a écrit:
Bonjour, pas mal du tout, juste quelques petites recommandations :
    - N'hésite pas à utiliser la dernière version de darkbox, elle corrige diverses bugs et ajoute quelques fonctionnalités utiles : http://batch.xoo.it/p42795.htm

    Code:
    taskkill /f /im darkbox.exe >nul
    taskkill /f /im darkbox_i.exe >nul
    exit
    C'est une façon un peu brutale de stopper darkbox (sachant en plus que darkbox_i n'est en théorie jamais en exécution quand on tente de le tuer) Mr. Green, essaie
    Code:
    echo -rsq
    exit
    ce sera bien plus stable.

    - Je n'aime pas trop faire :
    Code:
    if not exist darkbox.exe call :makedarkbox
    if not exist darkbox_i.exe call :makedarkboxi
    étant donné qu'il y a des cas où darkbox n'est pas dans le même dossier que le programme ou encore des cas spéciaux où darkbox n'a pas d'extention .exe (par exemple avec darkbox/Dos9 sur Linux), le soucis reste de savoir si darkbox est disponible, je te propose ça du coup :
    Code:
    darkbox -? || call :gendarkbox
    darkbox_i -? || call :gendarkbox_i


    - Aussi, pense a bien nettoyer ton code en enlevant certaines parties inutiles tout en optimisant, ça se fera automatiquement dans le futur et comme je ne suis pas un pro dans l'optimisation d'un .bat, je laisserais cette tâche aux autres ^^ Mr. Green


Voilà tout, bonne chance pour la suite Okay.


Merci de cette suggestion ! ^^



Répondre en citant
Message B-Engine // Alpha 
OMG c'est trop bien fait !
Sinon je galère pour la map Jump




______________________________________________________


cliquer sur un des liens n'est pas dangereux
Ancien site,Nouveau site
Mon site de scan
Vous êtes le
visiteur
Chaine Youtube:
Visiter le site web du posteur Skype
Répondre en citant
Message B-Engine // Alpha 
logan T a écrit:
OMG c'est trop bien fait !
Sinon je galère pour la map Jump


Merci beaucoup Very Happy

La map jump est juste un test ^^ Il est possible de la terminer en spammant la touche droite Mort de Rire
Tu peux toujours modifier les configs pour rendre le jump plus facile ou même impossible Wink



Message B-Engine // Alpha 


Montrer les messages depuis:
Répondre au sujet Page 1 sur 1
  



Index | créer un forum | Forum gratuit d’entraide | Annuaire des forums gratuits | Signaler une violation | Conditions générales d'utilisation
Copyright 2008 - 2016 // Batch