Uniscript

Uniscript is a DSL scripting language designed for making games and programs easy and fun. Uniscript was coded in python. it was named after the universe, because you can code a game or "universe" in it.

Why choose Uniscript?

Uniscript was designed to make coding easy, simple, and fun. to make kids to learn text code as easy, and not "hard." to make coding games to so hard. our mission is to promote schools across the US to use text code(like us) and to make game making simple

Features of Uniscript:

-Easy to learn syntax

simple to fix bugs in code

frequently asked questions:

What is uniscript based on?

Uniscript was coded in Python

How do i start?

Input starts the code, [assign_player] creates a player, {controls=...}control controls

What is Uniscript best for?

Uniscript is best for indie game making!

Fun facts

1:The first version of Uniscript was coded by a 9 year old!

You read that right.

Not a 40 year old, or a 30 year old, or even a 20 year old:

NINE. YEAR. OLD.

2: Uniscript may have never existed if it weren’t for a horror game

YES, that’s right. A horror game didn’t scare the founder — instead, it made him imagine God “coding” the universe and having a glitch "coding" us. A weird origin, but completely true!

For more information, visit the uniscript github page!

To start, copy the following code, and paste it into a .py file

make sure you have installed ursina and python

the best place to code uniscript is in VScode, as it was first coded there(like this HTML file!)

LINKS

1st link

Want a video on uniscript? click me!

2nd link

Want our previous interpreters? click me!

3rd link

Want a tutorial on uniscript? click me!

4th link

Want to publish a blog? click me!

Happy coding!

Code:


       # RENEMBER THAT INTERPRETERS HAVE BEEN INHANCED WITH AI
from ursina import *
from ursina.prefabs.first_person_controller import FirstPersonController
import random
import math
app = Ursina()
Sky()
GROUND=Entity(model='plane', scale=(100,1,100), color=color.gray, collider='box')
player = FirstPersonController()


def spawn_tree():
    Entity(model='sphere', color=color.green, scale=(3,3,3), position=(0,3,5))
    Entity(model='cube', color=color.brown, scale=(1,3,1), position=(0,1,5))

def spawn_house():
    Entity(model='cube', color=color.yellow, scale=(4,4,4), position=(5,2,5))
    Entity(model='cube', color=color.brown, scale=(1,2,0.1), position=(5,1,7.05))

def spawn_player():
    player=FirstPersonController()

def spawn_glitch():
    Entity(model='sphere', color=color.green, scale=(54,56,763), position=(433,543,655))
    Entity(model='cube', color=color.brown, scale=(1,3,1), position=(4556,5642,1))
    Entity(model='cube', color=color.yellow, scale=(4,4,4), position=(5,2,5))
    Entity(model='cube', color=color.brown, scale=(6,2,0.7), position=(6,1,7.080))
human_entity=None
def OLD_mob():
    global human_entity
    human_entity = Entity(model='cube', color=color.azure, scale=(1, 1.5, .5), position=(0, 1.5, 10))
    Entity(model='cube', color=color.peach, scale=(.6, .6, .6), position=(0, .6, 0), parent=human_entity, Collider='box')
    Entity(model='cube', color=color.azure, scale=(.3, 1, .3), position=(.7, 0, 0), parent=human_entity, Collider='box')
    Entity(model='cube', color=color.azure, scale=(.3, 1, .3), position=(-.7, 0, 0), parent=human_entity, Collider='box')
    Entity(model='cube', color=color.blue, scale=(.4, 1, .4), position=(.3, -1, 0), parent=human_entity, Collider='box')
    Entity(model='cube', color=color.blue, scale=(.4, 1, .4), position=(-.3, -1, 0), parent=human_entity, Collider='box')
bird_entity=None
Human_time=0
Bird_time=0
def update():
    global human_entity, Human_time, bird_entity, Bird_time
    hit_info = None 
    if bird_entity:
     hit_info = raycast(bird_entity.world_position, (0,-1,0), distance=0.5, ignore=(bird_entity,))
    if hit_info and hit_info.hit:
            on_ground = True
            bird_entity.y = hit_info.world_point.y + 0.5 
            Bird_time = 0
    else:
            on_ground = False
    if not on_ground:
     if Bird_time > 1 and Bird_time < 20:
        bird_entity.position += bird_entity.forward * time.dt * 3
     if Bird_time > 20 and Bird_time < 23:
        bird_entity.rotation_y += time.dt * 30
    Bird_time += time.dt
    if Bird_time > 23 and Bird_time < 26:
            bird_entity.position += bird_entity.forward * time.dt * 3
    if Bird_time > 40 and Bird_time < 42:
            bird_entity.position += bird_entity.up * time.dt * 3
    if Bird_time > 42 and Bird_time < 45:
            bird_entity.rotation_y += time.dt * 30
    if Bird_time > 45 and Bird_time < 50:
            bird_entity.position += bird_entity.down * time.dt * 10
            Bird_time = 0
            on_ground = False
    if human_entity:
      if Human_time > 2 and Human_time < 4:
        human_entity.position += human_entity.forward * time.dt * 2
        Human_time += time.dt
      if  Human_time > 4 and Human_time < 6:
        human_entity.rotation_y += time.dt * 20
      if Human_time > 6:
        Human_time = 0
def spawn_bird():
  global bird_entity
  bird_entity = Entity(model='cube', color=color.white, scale=(1,1,1), position=(0,5,0), collider='box')
  bird_beak = Entity(model='cube', color=color.orange, scale=(0.2,0.5,0.2), position=(0, 0, 0.6), rotation=(90,0,0), parent=bird_entity, collider='box')
  bird_wing = Entity(model='plane', color=color.gray, scale=(0.5,1,0.1), position=(0.5, 0, 0), rotation=(0,0,45), parent=bird_entity, collider='box')
  bird_wing2 = Entity(model='plane', color=color.gray, scale=(0.5,1,0.1), position=(-0.5, 0, 0), rotation=(0,0,-45), parent=bird_entity, collider='box')
def spawn_bed():
    bed_base=Entity(model='cube',color=color.white,scale=(3,0.5,6),position=(0,0.25,0))
    bed_headboard=Entity(model='cube',color=color.brown,scale=(3,2,0.2),position=(0,1.25,-2.9))
    bed_pillow=Entity(model='cube',color=color.light_gray,scale=(2,0.5,1),position=(0,0.75,-2))
commands = {
    "{controls=WASD}": lambda: print("Controls set to WASD"),
    "[assign_player+view=CLASSIC!]": spawn_player,
    "[assign_player+view=first person]": spawn_player,
    "input=draw(tree)": spawn_tree,
    "input=draw(house)": spawn_house,
    "(tree)": spawn_tree,
    "(house)": spawn_house,
    "import that": lambda: print("ah, the holy grail of python, import this, one commandment says my personal favorite, Now is better than never. and we made a DSL at uniscript, now, instead of never.-preetham, the founder of uniscript."),
    "input=draw(glitch)": spawn_glitch,
    "input=draw(glitch))": spawn_glitch,
    "input=draw(house)": spawn_house,
    "input=draw(house))": spawn_house,
    "input=merge(": lambda: print("Merging inputs..."),
    "{tree}": spawn_tree,
    "{house}": spawn_house,
    "{glitch}": spawn_glitch,
    "input=draw.spawn(mob.type=human)": OLD_mob,
    "input=draw.spawn(mob.type=human))": OLD_mob,
    "{mob}": OLD_mob,
    "input=draw(bed)": spawn_bed,
    "input=draw(bed))": spawn_bed,
    "{bed}": spawn_bed,
    "input=draw(bird)": spawn_bird

}
def input_handler():
    print("Welcome to Uniscript!")
    user_input = input(":")
    parts = user_input.split("+")
    
    for part in parts:
        clean_part = part.strip()
        if clean_part in commands:
            commands[clean_part]()
        else:
            print(f"WARNING: Unknown command: '{clean_part}'")
            print("Would you like to switch to default (yes/no)")
            response= input(":").strip().lower()
            if response == "yes":
                print("Switched to default settings...")
                spawn_tree()
            else:
                print("No changes made.")

input_handler()

app.run()
    
© 2026 Uniscript contributors. Released under the MIT License.