We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.

Fishing Minigame

From Esolang
Jump to navigation Jump to search
Fishing Minigame
Designed by Corbin
Appeared in 2025
Computational class Polynomial
Reference implementation [1]

Fishing Minigame is a declarative language for describing idle games. It is an S-expression language which describes two sorts of objects: resources which evolve over time and actions which allow the user to interact with resources. It was originally introduced by Corbin[1] for Langjam Gamejam 2025[2] as an alternative to writing an imperative graphics-oriented language.

Syntax

Fishing Minigame is described by the following Raku grammar:

grammar Sexp {
    token id { <[-a..zA..Z]>+ }
    token s { '"' <-["]>+ '"' }
    token n { <[0..9]>+ ('.' <[0..9]>+)? ('e' <[0..9]>+)? }
    proto rule ratop {*}
          rule ratop:sym<count> { '.count' }
          rule ratop:sym<n> { <n> }
          rule ratop:sym<div> { '(/' <ratop> <ratop> ')' }
    proto rule boolop {*}
          rule boolop:sym<lt> { '(<' <ratop> <ratop> ')' }
    proto rule strop {*}
          rule strop:sym<s> { <s> }
          rule strop:sym<rat> { '(str' <ratop> ')' }
          rule strop:sym<cond> { '(if' <boolop> <strop> <strop> ')' }
    rule view { '(view' <id> <strop> ')' }
    proto rule lineitem {*}
          rule lineitem:sym<costs> { '(costs' <n> <id> ')' }
          rule lineitem:sym<pays> { '(pays' <n> <id> ')' }
          rule lineitem:sym<enhances> { '(enhances' <id> <id> <n> '->' <n> ')' }
          rule lineitem:sym<enables> { '(enables' <id> <id> <id> ')' }
    proto rule rate {*}
          rule rate:sym<eats> { '(eats' <n> <id> '/s' ')' }
          rule rate:sym<growth> { '(growth' <n> '/s' ')' }
          rule rate:sym<converts> { '(converts' <n> <id> '->' <n> <id> '/s' ')' }
    proto rule rmod {*}
          rule rmod:sym<lineitem> { <lineitem> }
          rule rmod:sym<rate> { <rate> }
          rule rmod:sym<view> { <view> }
    proto rule thing {*}
          rule thing:sym<resource> { '(resource' <id> <n> <s> <rmod>* ')' }
          rule thing:sym<action> { '(action' <id> <s> <lineitem>* ')' }
    rule TOP { '(venture' <s> <thing>* ')' }
};

References