Batch Tutorial – Notepad: Virtual Dice & Probability | Random Number Generator | CMD Programming

Making games with Notepad! Batch Programming.

Did you know that you can make games in Notepad using very simple codes!? Well, you do now. 

Making games with Notepad using Batch Programming is actually very simple and easy. You are restricted with only text. You can customize the background with preset colours. You can make a mean text-based adventurous game using that.

Make a Game in Notepad

Virtual Dice in Notepad Batch Programming

In this post we’ll be seeing mainly about probability in Batch Programming. So, you can make a standalone program such as Virtual Dice. 

What we do is that we generate a random number whose value is less than 6. So, we have the numbers (0,1,2,3,4,5). Later we add +1 to it. Then we print/display the number.

Click the download button to get the .bat file for the virtual dice. Click here to see the video.

Probability effect with two unequal outcomes in Notepad Batch Programming

You can additionally also make a program which needs to work with a game. This can work with a fighting game (Probability). Let us assume that you are fighting and that 75% chance  is that of you winning,

What we do is that we generate a random numbers whose values are less than or equal to 100. So, we have the numbers upto 100. 

Later, we add the IF statements. If the number generated is less than or equal to 75, you win. If the number generated is more than 75, you lose.

Click the download button to get the .bat file for the probability with two outcomes. Click here to see the video.

1 Response

  1. Thanks for your marvelous posting! I quite enjoyed reading
    it, you may be a great author. I will ensure that I bookmark your blog and will eventually come back in the future.

    I want to encourage yourself to continue your great writing, have a
    nice weekend!

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: