Live data from Hacker News

Langjam Gamejam: Build a programming language then make a game with it

langjamgamejam.com

21–30 of 60 posts

Re: Langjam Gamejam: Build a programming language then make a game with it

#21
post #3

I've been wondering about this for some time, that how there really isn't a language that's made from the ground up just for coding gameplay logic. Like we have SQL for databases, Julia etc for maths etc, but gamedevs still have to plod along in general-purpose languages with archaic conventions established 50 years ago by people who had nothing to do with games. I'd love something with the syntax of GDScript and the…

I've actually spent the past 3 years making Easel (https://easel.games) specifically for gameplay logic. It's got behaviors as a first-class language construct, ownership and context is implied hierarchically, it's concurrent and event-driven to match how game worlds work, and the multiplayer is automatic because it's built into the fabric of the programming language.

It also feels like a declarative language because of the high-level constructs, but it is actually imperative because (in general) things get executed in the step-by-step order you specify, which I think is important because games are full of sequences.

It's been a lot of work but also a lot of fun! My aim is for this to be a great next step after Scratch for people learning to code but also a good model for how a more advanced game-making programming language could work in the future!

Re: Langjam Gamejam: Build a programming language then make a game with it

#22
post #3

I've been wondering about this for some time, that how there really isn't a language that's made from the ground up just for coding gameplay logic. Like we have SQL for databases, Julia etc for maths etc, but gamedevs still have to plod along in general-purpose languages with archaic conventions established 50 years ago by people who had nothing to do with games. I'd love something with the syntax of GDScript and the…

Check out Jai, apparently if you ask nicely its author will let you use it. Unofficial docs here: https://pixeldroid.com/jailang/

Jai is just a C-like with manual memory management etc.

I mean something that is divorced from hardware and just focuses on gameplay logic; let the engine continue to be in C++/Rust/whatever.

Re: Langjam Gamejam: Build a programming language then make a game with it

#23
post #3

I've been wondering about this for some time, that how there really isn't a language that's made from the ground up just for coding gameplay logic. Like we have SQL for databases, Julia etc for maths etc, but gamedevs still have to plod along in general-purpose languages with archaic conventions established 50 years ago by people who had nothing to do with games. I'd love something with the syntax of GDScript and the…

I've actually spent the past 3 years making Easel ( https://easel.games ) specifically for gameplay logic. It's got behaviors as a first-class language construct, ownership and context is implied hierarchically, it's concurrent and event-driven to match how game worlds work, and the multiplayer is automatic because it's built into the fabric of the programming language. It also feels like a declarative language becau…

This looks promising. How come I hadn't heard of it??

My own ideas for an ideal syntax included keywords like "on" instead of "func" etc. (i.e. be totally event/signal driven)

Taking a look!

Re: Langjam Gamejam: Build a programming language then make a game with it

#25
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).

Re: Langjam Gamejam: Build a programming language then make a game with it

#26

Earlier quoted context omitted.

I've actually spent the past 3 years making Easel ( https://easel.games ) specifically for gameplay logic. It's got behaviors as a first-class language construct, ownership and context is implied hierarchically, it's concurrent and event-driven to match how game worlds work, and the multiplayer is automatic because it's built into the fabric of the programming language. It also feels like a declarative language becau…

This looks promising. How come I hadn't heard of it?? My own ideas for an ideal syntax included keywords like "on" instead of "func" etc. (i.e. be totally event/signal driven) Taking a look!

Haha I wish I knew how to reach more people like you!

Yeah exactly! I think the event-driven/signal-driven way of coding is the high-level way of coding a game, and so with Easel I was trying to make a game programming language where that is first class. It's different from the frame-by-frame state machine kind of model that is used by a lot of other game engines, and I find it's super productive.

I know that I am unable to single-handedly compete with Godot or Unity so to make the scope achievable it's aimed at being a good 2D programming language for learners at this point. There's a surprising amount of similarity between Scratch and Easel because Scratch is also event-driven and concurrent like Easel. We often send our learners to Python or JavaScript and I've seen that they just lose engagement. The difference is bigger than just going from visual to text-based coding. Easel makes the gap closer and so I am hoping it'll be a great next step from Scratch into text-based coding.

But I also hope Easel can add to the conversation and interest people like you as a example of how game programming languages could be made. One day I hope to actually bring Easel to more serious games, maybe bringing it to other engines or with its own 3D engine. One reason why I am leaning on making my own 3D engine (long term goal) is that in Easel, the multiplayer is automatic and it would be difficult to bring that to another engine.

In either case it's great to meet someone who has been thinking about this kind of problem like I have.

Re: Langjam Gamejam: Build a programming language then make a game with it

#29
post #25

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 th…

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

Re: Langjam Gamejam: Build a programming language then make a game with it

#30

Any recommendations on books / resources to read in order to participate as a beginner (language creator that is..., not beginner with programming games)?

Jack Crenshaw's 1988-1995 series Let's Build a Compiler [1]

Graydon Hoare's 2002 talk `"One Day Compilers" or how I learned to stop worrying and love static metaprogramming` [2] (implements a compiler for a DSL that's a subset of makefile syntax in edit: on second thoughts, aiming to ship a game in a novel _compiled_ language in a 7 day language+game jam is probably a lot more optimistic than aiming for an interpreted language.

[1] https://compilers.iecc.com/crenshaw/

[2] https://www.venge.net/graydon/talks/

Post reply on HN