Computing Staff
  • 0

DOS Game With Batch ?

  • 0

Hello ,
I was wondering if i could make a batch game in notepad.Then saving as batch.Or does this reqire special software.I can not do choice.com in my games because i have vista.
But i want it like pacman you press the up arrow you go up etc… Or is this impossible

Share

1 Answer

  1. I don’t believe you will be able to use the arrow keys, it would have to be done with the words “Up”, “Down” etc.

    It will still take a lot of coding for it to work, you will need to have a screen (couldn’t think of a better word) with every position, and if you were to include the pacman ghosts you will need to include them in those screens to.

    Here’s what I mean

    Screen 1:
    ooooo
    ooooo 5x5 quare with you being the x
    ooooo
    oooxo
    
    Screen 2:
    
    ooooo
    ooooo move to the left you will have to have
    ooooo a screen showing your new location
    ooxoo

    That would go on until you have every possible combination of screens, and then you will have to code for the user input.

    like this:

     SET /p input=""
    IF "%input%"=="Up" GOTO Screen1
    IF "%input%"=="Down" GOTO Screen2
    etc.

    You would have to have that after every screen with the “GOTO” leading to the next appropriate screen.

    —-

    Now, if you are still wanting to make a game like this, I’d recommend downloading Notepad++. It will help you keep organized and allow you to easily find any mistakes. All you have to do is select “batch” from the language selection screen.

    Good luck!

    *Sorry about using the word “screen” so much, I couldn’t think of a better one!

    • 0