Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
(+1)

Nah.... I guess I'll write better instructions next time

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

Can I ask, are you Hackoo from Stack Overflow?

No, I'm not on Stack Overflow. How the music works is that it uses embedded VBScript (scroll to the bottom). The technique to embed is from here https://stackoverflow.com/questions/9074476/is-it-possible-to-embed-and-execute-... (the last bit of the first answer). I define macros that use it to play music via CScript. In terms of a cool Batch, you should try this game instead. It has much better code, and showcases how I created the graphics more.

To create the diferent colours and stuff, I use VT100 escape sequences, which is Windows 10 only and makes it a lot easier. You can check them out here https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequen.... Also, I would not recommend creating multiple folders in your game to simulate a dungeon. If I were you, just create some sort of variable that stores what goes into what, and it will be much easier from there.

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!
 

You don't need to edit it at all. As you can see, the code already has a "Sound" package. So in the macro, instead of the word Music put Sound instead.

(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

(+1)

You can just call another job that adjusts the SAPI voice element. CScript refers to the VBScript so it's probably easier to save the SAPI  object OR the PID of the VBScript process.

(1 edit)

Can you give me an example of what you mean?

I mean, you can search this kind of thing up online. There's quite a bit of examples on Stack Overflow, and you can just piece them all together. If I just gave you the code, then you wouldn't be learning anything.

True true, Well thank you!!

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