Q&A for How to Make a Video Game With Cmd

Return to Full Article

Search
Add New Question
  • Question
    Do I need to put a quote mark before and/or after echoing something?
    Community Answer
    No. After echoing, make a space and write what you want to display in a single line.
  • Question
    What is a bat file, and where do I put it?
    Community Answer
    A bat file is a batch file, and it runs on cmd (command prompt). You can put it on your desktop to make it easier to test your stuff.
  • Question
    When I click to open the game it opens and immediately closes. Why does it do that?
    Community Answer
    It is because the coding is wrong. Actually there are few lines on the codes that are to instruct us and make us understand, but which are not supposed to be written on the source code(code area). So just scan through the code lines and delete those unnecessary lines. Doing this should make your game work.
  • Question
    How can I learn how to code?
    Community Answer
    That depends what you want. C++ is for non-image based programs(they display in a cmd looking window) adn C# is for image based programs like games. You should start with c++ tough, since c# is more advanced. Google and download code blocks, an c++ code editor. You can find documentation and lessons online.
  • Question
    What do I do if the game immediately closes after opening?
    Community Answer
    It's possible your coding does not pause. At the end of your command, type the word "pause" without quotation marks.
  • Question
    How do I start playing?
    Community Answer
    When you save the file as .bat, check where it is being saved. Change the location to your desktop (so that it will be easy to find) and save it. Then double click on the .bat file and start playing.
  • Question
    What if my game closes after I select start or exit?
    Bartek 1887
    Community Answer
    The coding is wrong. Scan through the code lines and delete those unnecessary lines. Doing this should make your game work.
  • Question
    Can I do this on Notepad, also?
    Community Answer
    Yes. This is for any notepad or notepad + +.
  • Question
    How can I open a game?
    Community Answer
    Go on the desktop screen of your PC. There you will see a folder named as My Documents, where you can see your game and can run it from there.
  • Question
    It just closes when I'm pressing enter, what should I do?
    Community Answer
    Maybe you have put a pause for the enter instead of a set /p. If you can't find it then try copying and pasting the code in the steps to help you.
  • Question
    Does this work on Windows XP?
    Kenneth Blake Sweezy
    Community Answer
    Yes, as long as you can install Notepad++.
  • Question
    Can I do it with my simple Windows Notepad?
    Dude 2
    Community Answer
    Yes, this is for every Notepad and Notepad++. I prefer to use Windows 10 Notepad, so it will run smoother. You still need to follow the .bat file making steps.
  • Question
    What should I do if the game won't launch? Does this work on Windows 10?
    Community Answer
    This should work on Windows 10. If you're having trouble, go back through the lines and see if you made any mistakes that need fixing.
  • Question
    After clicking the desktop icon, it opens CMD.exe. What should I do?
    Community Answer
    All you have to do is follow the instructions given on the screen.
  • Question
    What if the command prompt I am using won't let me save anything?
    Community Answer
    You can use notepad and save it as a .bat file. You don't need Notepad++ or a command prompt. Using .bat will make it a game.
  • Question
    Which language is used to make the game?
    Community Answer
    The batch programming language is used to make this game. Batch is a native programming language that Microsoft built into Windows.
  • Question
    How do I change the text size in my video game?
    Community Answer
    It isn't possible, but you can make bigger text with ASCII art. I recommend using a website for this, as doing it manually takes a while.
  • Question
    What should I do if my file closes immediately after opening?
    Community Answer
    This is likely happening because you haven't added a pause in your file. Right-click on the batch file and then click Edit. While editing, remember to add a pause in your game code.
  • Question
    What can I do if my PC won't run the .bat file?
    Community Answer
    It might not support batch files. 1.0 to 2000/ME might not work, but XP and onwards should work. If it doesn't work, your PC may be out of RAM, or it doesn't support batches. Another reason could be because of incorrect coding.
  • Question
    What do I do if my video game made with Cmd isn't working?
    Community Answer
    Scan through the code. Edit the code. Test the program, if not running, then paste the code in the instruction.
  • Question
    What if my game closes as soon as I start it?
    Dude 2
    Community Answer
    You probably have forgotten a pause in the code. If not, you typed the code wrong.
  • Question
    Is there a way to set the random numbers for a battle sequence?
    Community Answer
    Use %random% to generate a random number. Example: if %random%==1 goto Number1, if %random%==2 goto Number2 and so on. Note that it only generates numbers that are in the "if %random%" lines, so having lines for 1, 2 and 3 means it generates a number between 1-3.
  • Question
    Why doesn't the text "Thanks for playing" show in the exit menu?
    Community Answer
    You might have forgotten to type echo before the mentioned text, or you placed it in the wrong location.
  • Question
    I can't find the file after I have saved it. What should I do?
    Community Answer
    If you haven't tried it yet, open Notepad, then open, then your game. That should open it. Then click SAVE AS, and then save it on your desktop or somewhere easily found.
  • Question
    How do I made the file .bat?
    Community Answer
    When saving the file, add the extension .bat after the file name. If there is already an extension, replace it with .bat.
  • Question
    Every time I start a video game, it kicks me off. How do I fix this?
    Community Answer
    Try adding a pause after every line that evokes an action; this might help you track the error. If that does not work, then try removing every "/p" command and any locations associated with it, or try removing every exit command and external coding.
  • Question
    What can I do if it just closes when I select "start"?
    Community Answer
    You might have placed an exit right after the start instead of "echo exit." There might also be a "/p" command right after the start, which doesn't lead anywhere, and the exit command or location right after it.
  • Question
    How do I add random encounters to a video game made with Cmd?
    Community Answer
    Try having a random number generator that decides if you go into a fight or not using if statements, such as: /set /a num=%random% if %num%==1 goto start_battle_1 if %num%==2 goto normal_day start_battle_1: (insert battle code here) normal_day: (insert normal day code here)?
  • Question
    How do I edit the video game after saving it?
    Community Answer
    Right-click on the .BAT file and select Edit.
  • Question
    How do I put characters in my game?
    Community Answer
    You can do that by using a variety of letters and numbers. Avoid using symbols, as they can interfere with the operation of the game. How you start is by taking a piece of line paper and writing down letters that would resemble something similar to typing an emoji. As an example, you can use the letter O for the character's eyes and use the letter V to make a beak to resemble a face like this: "OVO" or a motorcycle that's parked in a distance.
Ask a Question

      Return to Full Article