u/joanmiro

▲ 4 r/TrGameDeveloper+1 crossposts

turkiye'deki yazilimcilar icin sosyal medya. proof of concept asamasinda.

kafama gore is yapmak istemiyorum topluluk ne isterse onu yapmak istiyorum o yuzden temelini attim ama nereye dogru gidecegini kullanacak kisiler belirlesin istiyorum.

gelip denemek, olmamis olmus demek, su da olsun bu da olmasin demek serbest. yorumlarinizi cok kiymetli. <3

kodiler.org
u/joanmiro — 3 days ago

A few months ago I kept finding myself wanting to prototype Reigns-style games — weighted card draws, flag-gated story chains, counters that kill you when they hit 0 or 100. Every time I started, I ended up either drowning in JSON or wiring up a spreadsheet monstrosity.

So I built a DSL for it. It's called TahtLang. A card definition in this language looks like this:

Tax Proposal (card:tax)
    bearer: character:advisor
    weight: 1.0
    weight: 3.0 when counter:treasury &lt; 20
    &gt; The merchants request lower taxes, Your Majesty.
    * Lower taxes: counter:treasury -15, counter:people 10
    * Raise taxes: counter:treasury 20, counter:people -20

The format is plain text, tab-indented, git-friendly, easy to read and follow. Card groups can be spread across different files to work on different parts of the game separately.

Cards have weights (conditional or flat), require guards, lockturn cooldowns, and story chains. Here's a more involved example:

War Declaration (card:war)
    bearer: character:general
    weight: 0.5
    weight: 2.0 when counter:army &gt; 70
    require: !flag:war, counter:army &gt; 40
    lockturn: 15
    &gt; Enemies threaten our borders!
    * Go to war: +flag:war, counter:army -10, card:_battle@5
    * Seek peace: counter:treasury -30

Battle (card:_battle, ring)
    bearer: character:general
    require: flag:war
    &gt; The battle rages!
    * Attack: counter:army -15, [card:_victory, card:_defeat]
    * Retreat: -flag:war, counter:army -5

The War Card: weight: 0.5 is its base chance to be drawn from the deck, but it gets 2.0 more when your army is strong. require blocks the card unless there's no active war and army is above 40. lockturn: 15 prevents it from showing up again for 15 turns. Choosing war sets +flag:war and schedules card:_battle@5 — a ring card that fires exactly 5 turns later. The battle's attack choice uses [card:_victory, card:_defeat] to branch: the engine picks the first one whose require passes.


The toolchain:

pip install git+https://github.com/tahtlang/tahtlang.git

Then you get these commands:

tahtlang game.taht              # play in terminal to see how it feels
tahtlang compile game.taht      # export to JSON for Unity/Godot/web
tahtlang stats game.taht        # run 100 simulations, analyze balance

For compile — you get a clean JSON with all counters, flags, characters, cards, conditions, and weights. You need to build your own runtime/rendering layer, but the structure is documented and straightforward. The Python runtime in the repo is a good reference.

The stats command is the part I'm actually proud of:

Cards never seen:        card:forest_ambush, card:peace_treaty (0/100 runs)
Deadliest counter:       counter:people (killed in 61% of runs)
Avg reign length:        23.4 turns
Cards seen &lt; 5 runs:     card:volcano_event, card:tax_reform

If you have 60 cards and one of them never shows up in 100 simulations, something's wrong with your weights. This has saved me from shipping broken content more times than I'd like to admit.


Other stuff:

  • Tree-sitter grammar + LSP server (syntax highlighting, autocomplete, diagnostics in Neovim/VSCode)
  • tahtlang stats --runs 500 if 100 isn't enough
  • tahtlang init scaffolds a starter game you can play immediately

If you've ever thought about making a Reigns-style game, a narrative card game, or anything with weighted random draws and state flags — I'd genuinely like to know if this is useful to you or if I'm solving a problem nobody has.

Repo: https://github.com/tahtlang/tahtlang

reddit.com
u/joanmiro — 14 days ago
▲ 8 r/Beepbox+1 crossposts

So I've been spending way too many hours on this thing. The idea is simple — you place balls and draw lines on a canvas. Balls fall with gravity, and when they hit a line, they play a note. You pick the instrument, the note, the angle of the line, etc.

I added a bunch of stuff like ghost trajectory preview, a metronome grid, reverb, multiple instruments... but honestly every time I try to compose something that sounds musical, it just sounds like a wind chime having a seizure.

I can't tell if:

  • a) the concept is fundamentally broken for making actual music
  • b) I'm just bad at this
  • c) it needs more features to be usable

If anyone wants to mess with it and tell me I'm not crazy (or that I am), here's the link:

https://baller.mirat.dev/

You can share compositions via URL so if you actually make something that sounds good please send it back to me so I can feel better about my life choices :D

reddit.com
u/joanmiro — 16 days ago