Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs

lordvalatar

9
Posts
1
Following
A member registered Feb 05, 2021 · View creator page →

Creator of

Recent community posts

(1 edit)

What about it is good, you see this is like the best thing I have made, so like, I would be greatful for some feedback. 

btw, is that voice saying "welcome" still saying welcome when you load the game up?

How did you program this game, see, I am looking to convert my batch game into a more advanced code script

True true, Well thank you!!

btw, I am uloading the work in progress, so check it out if you want!

(1 edit)

Can you give me an example of what you mean?

(1 edit)

ahh, I see! I thought that may have adjusted the volume!

I have got it to talk, but I would like the code here to work only on the voice, not the music:

:END
TASKKILL /F /IM CSCRIPT.exe >NUL
GOTO :EOF

Thak you so much!

At the moment, I am editing it to allow for SFX that does not loop, like in my game, there is a decapitation that just looped and looped and looped! So I edited the code a bit:

<package>
  <job id="Sound">
    <script language="VBScript">
      Set args = WScript.Arguments
      Set Sound = CreateObject("WMPlayer.OCX.7")
      Sound.URL = args.Item(0)
      Sound.Controls.play
      do while Sound.currentmedia.duration = 0
      Wscript.sleep 100
      loop
      Wscript.sleep (int(Sound.currentmedia.duration)+1)*1000
    </script>
  </job>
  <job id="Sfx">
    <script language="VBScript">
      Set args = WScript.Arguments
      Set Sound = CreateObject("WMPlayer.OCX.7")
      Sound.URL = args.Item(0)
      Sound.settings.volume = 100
      Sound.settings.setMode "loop", False
      Sound.Controls.play
      While Sound.playState <> 1
      WScript.Sleep 100
      Wend
    </script>
  </job>
  <job id="Music">
    <script language="VBScript">
      Set args = WScript.Arguments
      Set Sound = CreateObject("WMPlayer.OCX.7")
      Sound.URL = args.Item(0)
      Sound.settings.volume = 100
      Sound.settings.setMode "loop", True
      Sound.Controls.play
      While Sound.playState <> 1
      WScript.Sleep 100
      Wend
    </script>
  </job>
</package>

As you can now see, there is a new section with the Job ID sfx. this allows the head removal part or war cries to play without looping. 

Honestly, I could not thank you enough for your help.  I'll update you on any add ins!
 

Can I ask, are you Hackoo from Stack Overflow?

Also, Recently I sent you a message, and mentioned colour in Batch. 

Copy and paste this to the bottom of your Batch file you are using. 

:c
setlocal enableDelayedExpansion
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:colorPrint Color  Str  [/n]
setlocal
set "s=%~2"
call :colorPrintVar %1 s %3
exit /b

:colorPrintVar  Color  StrVar  [/n]
if not defined DEL call :initColorPrint
setlocal enableDelayedExpansion
pushd .
':
cd \
set "s=!%~2!"
:: The single blank line within the following IN() clause is critical - DO NOT REMOVE
for %%n in (^"^

^") do (
  set "s=!s:\=%%~n\%%~n!"
  set "s=!s:/=%%~n/%%~n!"
  set "s=!s::=%%~n:%%~n!"
)
for /f delims^=^ eol^= %%s in ("!s!") do (
  if "!" equ "" setlocal disableDelayedExpansion
  if %%s==\ (
    findstr /a:%~1 "." "\'" nul
    <nul set /p "=%DEL%%DEL%%DEL%"
  ) else if %%s==/ (
    findstr /a:%~1 "." "/.\'" nul
    <nul set /p "=%DEL%%DEL%%DEL%%DEL%%DEL%"
  ) else (
    >colorPrint.txt (echo %%s\..\')
    findstr /a:%~1 /f:colorPrint.txt "."
    <nul set /p "=%DEL%%DEL%%DEL%%DEL%%DEL%%DEL%%DEL%"
  )
)
if /i "%~3"=="/n" echo(
popd
exit /b

:initColorPrint
for /f %%A in ('"prompt $H&for %%B in (1) do rem"') do set "DEL=%%A %%A"
<nul >"%temp%\'" set /p "=."
subst ': "%temp%" >nul
exit /b

:cleanupColorPrint
2>nul del "%temp%\'"
2>nul del "%temp%\colorPrint.txt"
>nul subst ': /d
exit /b

::After you have done that, any Command that you want coloured, type= call :c (colour) " HELLO WORLD" /n

::For Multiple colours in one line, In red and then green as an example= call :c 0c "HELLO" &call :c 0a "WORLD" /n

:: The " " contains the viewable text, and the (Remember a Spacebetween quote marks and slash) /n ends that line, otherwise the next line would run onto the line you forgot to put "the cork" on, as I term it.)

Here, I made an example of two swords and some text I use for the game I am making. This will make Sword appear like its being written too (haha)





@echo off
mode con COLS=76 LINES=42
setlocal disableDelayedExpansion
set q=^"
echo.
call :c 06 "       ("&call :c 0c "**"&call :c 06 ")                                         ("&call :c 0c "**"&call :c 06 ") " /n
call :c 08 "       IIII                                         IIII " /n
call :c 04 "       ####                                         #### " /n
call :c 04 "       HHHH "&call :c 0f "   One shall come with a steel blade,"&call :c 04 "   HHHH " /n
call :c 04 "       HHHH "&call :c 0f "  With the fire that ancients forbade,"&call :c 04 "  HHHH " /n
call :c 04 "       #### "&call :c 0f "  Battles without, for battles within "&call :c 04 "  #### " /n
call :c 06 "    ___IIII___ "&call :c 0f "      Seeks evil within,       "&call :c 06 "   ___IIII___ " /n
call :c 06 " .-`_._"**"_._`-."&call :c 0f "      and evil's rule     "&call :c 06 "   .-`_._"**"_._`-. " /n
call :c 06 "|/``  .`\/`.  ``\|"&call :c 0f "    A hero, heart true,  "&call :c 06 "  |/``  .`\/`.  ``\| " /n
call :c 08 "`     }    {     '"&call :c 0f "     A warriors heart,  "&call :c 08 "   `     }    {     ' " /n
call :c 08 "      ) () ( "&call :c 0f " Or a Coward's mind, heart or mind, "&call :c 08 "  ) () ( " /n
call :c 08 "      ( :: ) "&call :c 0f "      To redeem , never betray,  "&call :c 08 "     ( :: ) " /n
call :c 08 "      | :: | "&call :c 0f "  Cease to speak or cease to breath  "&call :c 08 " | :: | " /n
call :c 08 "      | )( | "&call :c 0f "       His silence shall cleave  "&call :c 08 "     | )( | " /n
call :c 08 "      | || | "&call :c 0f "         The path of foes,    "&call :c 08 "        | || | " /n
call :c 08 "      | || | "&call :c 0f "             Kill many      "&call :c 08 "          | || | " /n
call :c 08 "      | || | "&call :c 0f "         To save a Peoples, "&call :c 08 "          | || | " /n
call :c 08 "      | || | "&call :c 0f "        Our Hero , Our Hero, "&call :c 08 "         | || | " /n
call :c 08 "      | || | "&call :c 0f "Only to rest when the fire is warmed! "&call :c 08 " | || | " /n
call :c 08 "      ( () )                                       ( () ) " /n
call :c 08 "       \  /                                         \  / " /n
call :c 08 "        \/                                           \/ " /n
echo.
echo.
pause
ping localhost -n 4 >nul 
goto enddd

"&call :c 08 "

:c
setlocal enableDelayedExpansion
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:colorPrint Color  Str  [/n]
setlocal
set "s=%~2"
call :colorPrintVar %1 s %3
exit /b

:colorPrintVar  Color  StrVar  [/n]
if not defined DEL call :initColorPrint
setlocal enableDelayedExpansion
pushd .
':
cd \
set "s=!%~2!"
:: The single blank line within the following IN() clause is critical - DO NOT REMOVE
for %%n in (^"^

^") do (
  set "s=!s:\=%%~n\%%~n!"
  set "s=!s:/=%%~n/%%~n!"
  set "s=!s::=%%~n:%%~n!"
)
for /f delims^=^ eol^= %%s in ("!s!") do (
  if "!" equ "" setlocal disableDelayedExpansion
  if %%s==\ (
    findstr /a:%~1 "." "\'" nul
    <nul set /p "=%DEL%%DEL%%DEL%"
  ) else if %%s==/ (
    findstr /a:%~1 "." "/.\'" nul
    <nul set /p "=%DEL%%DEL%%DEL%%DEL%%DEL%"
  ) else (
    >colorPrint.txt (echo %%s\..\')
    findstr /a:%~1 /f:colorPrint.txt "."
    <nul set /p "=%DEL%%DEL%%DEL%%DEL%%DEL%%DEL%%DEL%"
  )
)
if /i "%~3"=="/n" echo(
popd
exit /b

:initColorPrint
for /f %%A in ('"prompt $H&for %%B in (1) do rem"') do set "DEL=%%A %%A"
<nul >"%temp%\'" set /p "=."
subst ': "%temp%" >nul
exit /b

:cleanupColorPrint
2>nul del "%temp%\'"
2>nul del "%temp%\colorPrint.txt"
>nul subst ': /d
exit /b  

:enddd



::ENJOY!!

::A.

Hey, I wanted to ask if you could help me with my own Batch Game. I am designing a game which uses multiple sub folders with batch files to create a Skyrim/ Roguelike styled batch adventure I named "Eternal Falls". IT even has Icon art I made!. 

To the Point:

O usually download Batch games when I think my game can get no better, surely... but then I downloaded yours....

Wow! I must ask you how on earth you got that game to play music! I am refering to the song Metamorphosis by Phillip Glass and the several other MP3 FIles. 

Normally if I like part of A batch script, I delete sections of a copied progrtam to keep the original pristine, and test to see if the certain feature still works, and I have managed to get "Kayleigh" by Marillion to play on your game. 

Dude, please... This Game is cool, and I want to ask if you could impart some of your knowledge to me on how you have done this!

A

P.s. I would have uploaded my Game, however I need to figure out a way for the game to run in any location or drive of a computer / Memory stick, rather in the core of the C:\ or D:\ Drive. 

Just for reference, I currently use a code:

  •  set drive=%cd:~0,3%

When I run the Batch Script from my USB (D:\), the variable %drive% would equal: D:\

Without changing the code, I run it copie onto my WIndows PC (C:\). The Variable %drive% now equals: C:\

Therefore to retrieve files:

  • cd "%drive%LifeA\Users"
  • call %name%.bat

The game can only be run if the path is :C:\LifeA\ or D:\LifeA