Comment by shoo
1 month ago
What is a minimal-ish programming language that could be used to express some interesting class of games?
It's easy to think of pathologically trivially useless "languages" that could "make a game". E.g. the single instruction language where the instruction P is defined to mean "execute a game of pong". Or a zero instruction language where the empty program is defined to mean "execute a game of pong".
Also easy to think of existing minimal programming languages that could technically be used to implement games. E.g. brainfuck is a beautifully minimal language with only 8 instructions, supporting character IO - so you could make a text based adventure game with it, but this would be unpleasant and there isn't anything about brainfuck that makes it suited to game dev.
Another idea could be to have a non Turing complete language where you declare data for entities etc to be executed by some game engine/runtime. E.g. it might be possible to define a language for declaring data & entities to express a few different but similar games (e.g. spanning pong --- breakout, or one specialised for simple card games, or so on).
Let D be the language used to express the gameplay, C be an implementation of a compiler for D in a language L. You want to minimise the length of D + C across all languages L. This gives you a unique language D (a DSL) for each game which is the most semantically dense and expresses the essence of the problem domain the best.
The language or languages D is discovered (not designed) and is the essence of the problem, will never change and is true in all universes. Any general purpose programming language solving the same problem (a solution using L) will have a structure of D with a bunch of boilerplate and design patterns (design pattern = boilerplate = hints at a special form in D).
Using a hierarchy of these minimal languages D with one compiling into another for each little problem is the only way to get ‘clean code’ free of boilerplate.
Software engineering is minimising D + C for all L
I’m hearing FORTH, but surely that’s not what you meant to say. :)
I like to lisp but it might be time to finally learn FORTH :)
I think building an interpreted language with a basic but usable feature set - arrays, structs, expressions, control flow, functions etc. - is totally doable in a couple of days if you dont spend a lot of time ruminating on syntax and semantics.
If I had a spare week that I wanted to spend on this game jam, I would be making a dynamically typed language and an interactive fiction game.
Dynamic types make it much easier to whip up a little language and interpreter. Interactive fiction doesn't have any difficult performance requirements so even a very slow interpreter is still probably fast enough. And IF doesn't require graphics or any kind of tricky bindings. Just printing to a terminal.
a variation of lisp is SUPER easy to do, give it some primitives to graphics/sounds/inputs and away you go