I need an example
Moderator: DosItHelp
I need an example
So, I am trying to achieve a little open world RPG game in batch. I need an example where i can control the guy with the arrow keys and can change how the character looks. Thanks! (Also I am brand new so please tell me if this has already been asked)
Re: I need an example
Not sure what you want or how you want it exactly. More specifications of your goal might help.
What do you mean with 'the guy'? Is this a set of characters which together look like a guy, like in ASCII art?
How do you see 'control'? As in 'move' the set of characters?
There are many ways to achieve what you want.
For example, cursor positioning can be done with PROMPT and ANSI escape sequences:
This will jump the cursor 3 positions up. You could then output the set of characters resembling the guy for instance.
See https://docs.microsoft.com/en-us/window ... -sequences for a list of ANSI escape sequences.
I am no pro in batch code language, I might give you wrong or inefficient answers.
Others on this forum might provide better solutions.
Anyway, I think there are indeed some threads about this on this forum
The SNAKE script might have the solution you are looking for:
For instance viewtopic.php?f=3&t=4741&hilit=snake
I hope this helps.
What do you mean with 'the guy'? Is this a set of characters which together look like a guy, like in ASCII art?
How do you see 'control'? As in 'move' the set of characters?
There are many ways to achieve what you want.
For example, cursor positioning can be done with PROMPT and ANSI escape sequences:
Code: Select all
prompt $E[3A
See https://docs.microsoft.com/en-us/window ... -sequences for a list of ANSI escape sequences.
I am no pro in batch code language, I might give you wrong or inefficient answers.
Others on this forum might provide better solutions.
Anyway, I think there are indeed some threads about this on this forum
The SNAKE script might have the solution you are looking for:
For instance viewtopic.php?f=3&t=4741&hilit=snake
I hope this helps.
Re: I need an example
Thanks, I'm not the OP, but it helps. I was working on a small DOS based game as well, and these resources really put me on the right track!