sol (0.0.1)

Programming language and toolchain for creating game assets.

software
assets
compiler
game-development

A programming language for custom apps/game content.

Warning

Sol is in early development and should not be used for real projects yet. Feel free to become part of the conversation, though, and help me determine its future :-)

Sol is an implementation-agnostic format for creating arbitrary game data. Think items, enemies, rooms, etc.

By defining your assets in SOL, you can use them in Rust, C, Godot, Unity, etc. SOL files are plain text files, so they can be version-controlled with git, and manually authored if necessary.

Features

A check means it is already implemented.

[Jude smiling]
- Hello, {PLAYER_NAME}!
- It is dangerous to go alone... take this!

Inventory.acquire_item(kind: IronSword, amount: 1)
model Item
  field name : text
  field unbreakable : truth
  field icon : Image
  if not unbreakable then
    field durability : nat
  end
end

Syntax (for nerds)

Each .sol file is a "module." This module is populated with "fields":

-- weapons/iron_sword.sol
@model Item

-- Dependencies on other modules!
using Icons

-- Static (Constant) fields
display_name = "Iron Sword"
durability = 4
icon = Icons.iron_sword

-- Fields can be procedures!
action on_use(target: Character)
    target.try_equip_weapon(weapon: self)
end

Sol files can be used to specify not just "resources" like items, but also scenes.

using Chars.(Juniper, Milo)

--todo Add portraits to those dialogues;
scene main_scene
  [Juniper]
  - Jude, could you please move a little?

  [Milo]
  - nah

  [Juniper]
  - Imma hit you in the head with a pan.

  [Milo]
  - *moves*

  Milo.move(by: [1, 0])
end

...or levels layouts.

@model Room

def player_spawn as Marker
  position = [-10, -3]
  facing = DOWN
end

def chest1 as Chest
  position = [0, 0]
end

Installing

You can compile from source as a rust project, or install from crates.io via cargo.

cargo install sol-lang

Integration with engines, such as Godot, are not yet available. Sol LSP is being worked on, as well as a Zed extension.

Contributing

Not yet available.