DEV Community

Cover image for Why MIniscript
Dat One Dev
Dat One Dev

Posted on • Edited on

Why MIniscript

Hello and welcome to Code With MiniScript! In this post, we’ll explore why MiniScript was created and why it might be the perfect language for your next project. Whether you’re new to programming or looking for an easy-to-learn scripting language, MiniScript has a lot to offer.

Why MiniScript Was Created

The goal in creating Miniscript was to make it user-friendly while incorporating the best features from various languages, all while keeping it lightweight and easy to use.

What Makes it special!

MiniScript is a small, open-source scripting language that’s easy to integrate into other software projects. Its minimal syntax helps you focus on what your code is doing, rather than getting bogged down by unnecessary punctuation.

Easy to Embed : Miniscript integrates seamlessly into environments like Unity. It’s also available for use on smaller systems like Raspberry Pi.
Clean, Minimal Syntax: MiniScript’s syntax is straightforward, with only essential punctuation. For example, there are no semicolons at the end of lines, making the code easier to read and write.

How Do I Get Started With It

MiniScript combines powerful features with a simple design, making it perfect for a wide range of applications, from game development to scripting tasks. If you’re looking for a language that’s easy to learn, easy to use, and powerful enough for serious work, MiniScript is worth considering.

Top comments (4)

Collapse
 
fernando_noise profile image
Fernando

I discovered the MiniScript language a week ago and I'm in love with it. I'm studying this language.
I'm a beginner in learning programming, and I've already managed to create two text-based games with MiniScript. One is a dice betting game, and the other is a robot fighting game.

Dice Game

// The goal of this game is to reach $1000000.
// You bet on a dice number and the amount of money on that number.
// If you guess the correct dice number, your bet amount will be doubled.
// If you guess wrong, you lose the amount of money you bet.

money = 100
print "DICE GAME"
print ""

while true
    print("YOU HAVE $" + str(money))

    while true
        bet = val(input("Bet on a number from 1 to 6 and press Enter!"))
        if bet >= 1 and bet <= 6 then
            break
        else
            print("Invalid number! Choose between 1 and 6.")
        end if
    end while

    while true
        amount = val(input("Enter how much money you want to bet and press Enter!"))
        if amount > money then
            print("You don't have that much money.")
        else 
            break
        end if    
    end while

    dice = floor(rnd * 6) + 1 

    print("The dice rolled " + (dice) + "!")

    if dice == bet then
        winnings = amount * 2  // Player wins double the bet
        money = money + winnings
        print("You won $" + (winnings) + "!")
    else 
        money = money - amount
        print("You lost $" + (amount) + "!")
    end if

    wait 2
    print ""

    if money <= 0 then
        print("YOU LOST EVERYTHING!!!")
        break
    else if money >= 1000000 then
        print("CONGRATULATIONS! YOU ARE A MILLIONAIRE!!!")
        break
    end if

end while

Enter fullscreen mode Exit fullscreen mode
Collapse
 
dat_one_dev profile image
Dat One Dev

Sorry for late reply fernando , your project is very impressive , I would definitely try to use it for next Learn by code or A video on channel. If you just started learning mini script I suggest you to check out mini script discord server there you can get the best help almost any time.

Collapse
 
fernando_noise profile image
Fernando

That's cool! Thank you very much! Oh yeah, I'm already participating in the MiniScripit Discord server and the people there are really nice.

Thread Thread
 
dat_one_dev profile image
Dat One Dev

Check out my new post Code Review #1 , its about your dice game.