I create two subprocesses : one using CHOICE that outputs to stdout, and another that reads the input using SET /P. Then it's just a matter of checking which key it is. See my Batch platformer Prism Song for another example on how it works.
Recent community posts
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.
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.
Thanks haha, this was more of an experiment, and the unresponsiveness was just part of the limitations of Batch script. But yeah, thanks for the feedback! (what you had to do was match the colour of the boss' head; if you didn't, you took damage. If you matched, than they took damage)
About 2 weeks ago I started coding for a Batch RPG with elements common to those in Japanese games, which I would later find out is a sub-genre of it's own : a "JRPG". This includes the usual cast of anime stereotypes, wholly unfair gacha systems, and vast worlds of fantastical wonder. At any rate, I've played a couple of these games myself, and I tried to emulate such an effect in the creation of Soul Lapse.
- Gacha System
- All female cast of 14 unique characters
- Unique passive abilities for each
- 15 level campaign, dream-like narration
- Fully coloured, hand made ASCII art
- Soundtrack & Sound effects, Save system
- Critical Hit System
- Evolve System (each level, a random Evolution Path is chosen to evolve characters at a cost)
- Relic System (each level, certain artifacts are chosen that give special effects that may or may not help the level)
How can you call this your own, when you CLEARLY copied it from https://www.dostips.com/forum/viewtopic.php?t=4741. Just changing the title to "made by ahmedSamyAlkhouly" is just shameful, and charging $5 for the source code is a laughing stock. The least you can do is remove it. You really think making it an exe can hide the actual code?
Ah thank you! I fixed the bug, along with some other stuff. Turns out, there was extraneous stdout (standard output) from CSCRIPT that was affecting the sequences. Hopefully it is fixed now :)
Interesting..most of those are just errors due to input, but red characters filling up the screen is behavior that I've seen, but have no idea how to fix. I suspect it has something to do with extraneous stdout affecting the escape sequences, but I can't be sure. Anyways, thanks!
Thanks! It's actually mostly Windows Batch, the Powershell was just used as an easy plug for the .NET framework (since it contains the Cursor class with Mouse properties). If you ever want to peek inside, you can open up the Batch file (using Notepad, or any other editor) and see the code :)