I’ve never joined a game jam. I’ve thought about it but never prioritized enough to actually participate. I recently came across a very intriguing game jam on itch.io that has piqued my interest enough to participate:

The object of this 7 day game jam is build a programming language and then build a game using the new language. I don’t think i’ve ever seen something like this. Luckily I think i have the right prerequisites to participate - I’ve had to build a small language before for a previous employer and I happen to love games.

The rest of this blog post is my experience (day by day) with this game jam as I work through getting something submitted by day 7.

Day 1

Unfortunately I started day 1 pretty late, the day already nearly ending as I write this, and have no working code in place. I did manage to spend some of the day with the problem in my head and have some mental organization around what I am going to do.

Years ago, I wrote a domain specific language (DSL) that was a based on the TOML file specifications. This language was essentially toml syntax with expression support and was used for configuration. Toml files look like segmented blocks of data such as

[section]
name = "Billy"
dob = 1979-05-27T07:32:00-08:00

[other_section]
enabled = true

[person]
name = 'jim'

These segmented blocks of data can be used to model language blocks such as the lexical scope of a function and can be used to build out some general purpose language that looks much like toml. To make this a little bit more game oriented, I am instead thinking of creating a higher level language that can be used to create simple games such as most grid based games that people think of - snake, pong, perhaps even tetris.

Ultimately games are a complex set of rules and entities that respond to said rules. I imagine a syntax where a programmer can just establish the rules of the grid world like so:

[game]
name = "snake in TOML"
width = "20"  # 20 grids across
height = "20"
grid_size = "50" # pixel size of grid


[entity.player]
health = 100


# define an input
[[rule]]
name        = "turn_left"
trigger     = "input:left"
scope       = "player"
where       = "<some expression that needs to evaluate to true>"
where_not   = "<some expression that needs to evaluate to false. This is an alternative>"
effect      = 'setDirection("left")'  # part of a standard library

This is not an extensive definition of the environment I am envisioning, but hopefully I can settle down on what exact specifications are by tomorrow (Day 2)

Additionally, I am also envisioning a run time environment that allows for the player to edit the game source and reload the game immediately. I am structuring the deliverable for day 2 to be a stripped down version of the idea in the screenshot below:

yoml-mockup

Even a rudimentary version of a split environemnt like this would provide a space to iterate on both the run time environment and language implementation.