A groundbreaking programming language designed for virtual reality environments and digital economies.
Create, manage, and scale virtual marketplaces, avatar interactions, and immersive transactions
with an intuitive syntax built for the metaverse.
⚡ Get Started · { } Syntax Guide · 🌐 VR API · 🗺️ Roadmap · ★ GitHub
KursarScript (KSPL) is a specialized programming language that enables developers to create and manage virtual economies within VR environments. It provides built-in support for digital currencies, virtual assets, and immersive transactions through its innovative Virtu-Card system and Virtual-Terminals.
Designed from the ground up by Cherry Computer Ltd., KursarScript gives VR developers first-class language primitives that no mainstream language provides — meaning less boilerplate, more immersion.
|
|
pip install kursarscript# Clone the repository
git clone https://github.com/Infinite-Networker/KursarScript.git
cd KursarScript
# Install in development mode
pip install -e .
# Verify installation
kursarscript --versionkursarscript examples/hello_world.kursar
kursarscript examples/economy.kursar
kursarscript examples/test.kursarkursarscript -i
# or
kursarscript --interactivepython -m kursarscript script.kursarlet name = "Alice"
let balance = 1000.0
let active = true
let nothing = nullfn greet(person) {
print("Hello,", person)
}
fn add(a, b) {
return a + b
}
greet("World")
let result = add(3, 7)class Player {
field health = 100
field name = ""
fn init(player_name) {
self.name = player_name
}
// Inline method bodies
fn heal(amount) { self.health = self.health + amount }
fn is_alive() { return self.health > 0 }
fn describe() {
print("Player:", self.name, "HP:", self.health)
}
}
let player = Player("Hero")
player.heal(50)
player.describe()if (balance > 500) {
print("Rich!")
} else if (balance > 100) {
print("Okay")
} else {
print("Need credits")
}// For loop over a list
let items = ["Sword", "Shield", "Potion"]
for item in items {
print("-", item)
}
// For with range
for i in range(1, 6) {
print(i)
}
// While loop
let count = 0
while (count < 5) {
count = count + 1
}
// Break and Continue
for x in [1, 2, 3, 4, 5] {
if (x == 3) { continue } // skip x = 3
if (x == 5) { break } // stop at x = 5
print(x)
}// Multi-line list
let market_data = [
{"item": "Sword", "price": 150.0},
{"item": "Shield", "price": 200.0}
]
// Multi-line arithmetic
let total = 100.0 +
200.0 +
300.0// ── Create avatars with VirtuCards ──────────────────────────────────────────
let alice = Avatar("Alice_VR", "explorer")
alice.virtucard = create_virtucard(alice, 1000.0)
alice.virtucard.set_security("high")
// ── Build a virtual marketplace ─────────────────────────────────────────────
let shop = VirtualTerminal("NexusMarket", "general")
shop.list_item("Health Potion", 25.0, "Restores 50 HP")
// ── Purchase (2-arg shorthand) ───────────────────────────────────────────────
shop.purchase("Health Potion", alice.virtucard)
// ── Purchase (3-arg form) ────────────────────────────────────────────────────
shop.purchase_item(alice, "Health Potion", alice.virtucard)
// ── Transfer funds between avatars ──────────────────────────────────────────
let bob = Avatar("Bob_VR", "merchant")
bob.virtucard = create_virtucard(bob, 500.0)
transfer(alice.virtucard, bob.virtucard, 100.0)
// ── View transaction history ─────────────────────────────────────────────────
let history = alice.virtucard.get_history()
for txn in history {
print(txn)
}let sword = VirtualItem("Dragon Sword", "weapon", 1000.0)
sword.set_rarity("legendary") // 10× value multiplier
sword.set_attribute("damage", 500)
print(sword.calculate_value()) // → 10000.0| Method / Field | Description |
|---|---|
Avatar(name, role) |
Create a new avatar |
avatar.name |
Avatar's display name |
avatar.role |
Avatar's role (explorer, merchant, …) |
avatar.virtucard |
Attached VirtuCard (set explicitly) |
avatar.set_attribute(key, value) |
Set a custom attribute |
avatar.get_attribute(key) |
Get a custom attribute |
avatar.get_inventory() |
List of owned items |
| Method / Field | Description |
|---|---|
create_virtucard(avatar, amount) |
Factory — create a card |
card.balance |
Current balance |
card.security_level |
Security level string |
card.tap_denominator(amount) |
Add bonus credits |
card.debit(amount) |
Deduct credits |
card.credit(amount) |
Add credits |
card.set_security(level) |
low / medium / high / maximum |
card.get_history() |
Get transaction history list |
transfer(from_card, to_card, amount) |
Transfer between cards |
| Method / Field | Description |
|---|---|
VirtualTerminal(name, category) |
Create a marketplace |
terminal.list_item(name, price, desc) |
List item by name + price |
terminal.list_item(virtual_item) |
List a VirtualItem object |
terminal.get_inventory() |
Get all listings |
terminal.purchase_item(buyer, name, card) |
3-arg purchase |
terminal.purchase(name, card) |
2-arg shorthand |
| Method / Field | Description |
|---|---|
VirtualItem(name, type, base_value) |
Create an item |
item.set_rarity(level) |
common · uncommon · rare · epic · legendary |
item.calculate_value() |
base_value × rarity multiplier |
item.set_attribute(key, value) |
Custom attribute |
item.get_attribute(key) |
Retrieve attribute |
| File | Description |
|---|---|
examples/hello_world.kursar |
Language basics: variables, loops, functions, if/else |
examples/classes.kursar |
Object-oriented programming with classes |
examples/economy.kursar |
Virtual economy with VirtuCards and markets |
examples/advanced.kursar |
while loops, break, continue, inline method bodies |
examples/test.kursar |
Full comprehensive VR economy demonstration |
KursarScript/
├── kursarscript/ # Main Python package
│ ├── __init__.py # Package entry point & exports
│ ├── __main__.py # python -m kursarscript support
│ ├── interpreter.py # KSPL interpreter (parser + executor)
│ ├── compiler.py # KSPL compiler (tokenizer + code gen)
│ ├── runtime.py # Built-in VR types (Avatar, VirtuCard, etc.)
│ └── cli.py # Command-line interface & REPL
├── examples/
│ ├── hello_world.kursar # Beginner example
│ ├── classes.kursar # OOP example
│ ├── economy.kursar # Economy system example
│ ├── advanced.kursar # while, break, continue, inline methods
│ └── test.kursar # Comprehensive demo script
├── tests/
│ └── test_kursarscript.py # 117 automated tests
├── src/ # Original source files (reference)
├── docs/
│ └── ROADMAP.md # Development roadmap
├── index.html # Showcase website
├── pyproject.toml # Package configuration
├── setup.py # Legacy setup support
└── README.md # This file
pip install pytest
pytest tests/ -v
# Quick summary
pytest tests/ -q
# Expected: 117 passed| Status | Milestone |
|---|---|
| ✅ Shipped | Core language interpreter — variables, functions, classes, loops, control flow |
| ✅ Shipped | VR economy primitives — Avatar, VirtuCard, VirtualTerminal, VirtualItem |
| ✅ Shipped | CLI & Interactive REPL |
| ✅ Shipped | 117 automated tests |
| ⚡ In Progress | PyPI publication |
| 🔜 Planned | Extended standard library (networking, physics hooks, NPC modules) |
| 🔜 Planned | VS Code extension — syntax highlighting, IntelliSense, debugger |
See docs/ROADMAP.md for the full development roadmap.
MIT License — © 2024–2025 Cherry Computer Ltd.
See LICENSE for the full license text. KursarScript is free for personal, commercial, and research use.
"Innovating Tomorrow's Virtual World"
KursarScript is a product of Cherry Computer Ltd. — a forward-thinking technology
company dedicated to building the tools and languages that power the next generation
of virtual reality and digital economy platforms.
Built with ❤️ by Cherry Computer Ltd.
