hckrnws
Langjam Gamejam: Build a programming language then make a game with it
by birdculture
Oh my God, someone has discovered my kryptonite.
Seems ideal for those grumbling about Advent of Code’s shortened schedule this year.
I have been doing something minor - not full language - but I am working on a couple DSLs for my game engine. The games themselves are interpreted by my engine console - then transpiled to webgl and JavaScript.
The DSL is for cutscenes and scripting dialogues and movements and transitions.
The idea was to have a screenplay like language that would run in my game engine so I can write the scenes like a script instead of like code.
—
Then I am using a LUA like subset for the core game logic.
I don’t think I would want to have the entire thing written in a custom language though, as that seems unnecessary
Ok would like to learn more about what you have been building, can we talk? I have thought of similar ideas.
Holy cow the diversity of skill sets required to do this is insane. I'll be very impressed at any Devs who takes this on solo.
I think you can make it as challenging or not challenging as you want. Just implement a simple Forth or Lisp in Lua and make a cute little game with Love2d or even just a simple text game.
Maybe I expect too much from people but like at least being able to write a simple tree-walking interpreter is basic computer science education and who hasn't tried to make a game at least once?
The problem is more that some people just like sharpening the saw and some people like cutting down trees. Both are valid. Some people get really into programming languages and tooling but never ship any product or vice versa. But people need to be skilled enough to do both.
I think I might be the one to expect too much on second thought.
Making a language and a game is one thing, making a good language and a good game is something else entirely.
Very few people can do either of those on their own, let alone both.
The crossover of language design/implementation and game development made me assume this was either a Jonathon Blow (Jai, Braid, The Witness) or Bob Nystrom project (Game Programming Patterns, Crafting Interpreters, 'Is There More to Game Architecture than ECS?' [1]).
Either way, given the time constraints and requirements I'm expecting a lot of text adventures and rogue-likes.
I’m going to blog about whatever I end up building. I hope some of you will join me :)
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 features of Swift, with special constructs just for gameplay logic, which is often a hybrid between inheritance and composition, static and dynamic, declarative and imperative.
I've been toying with what would be the ideal syntax (for me), but I don't have the brains to actually make a language :')
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!
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!
There are many that are specialized for different uses in games, such as:
- ZZT-OOP
- MegaZeux Robotic
- ZIL
- MESH:Hero
- Free Hero Mesh
- Super ZZ Zero
- OHRRPGCE HamsterSpeak
(There are probably a lot more that I had missed)
All of these are specific to the specific kind of games being made with them, though; different kind of games will require a different kind of logic.
MESH:Hero is specific to a specific kind of puzzle games, and Free Hero Mesh is a FOSS clone of MESH:Hero with a different syntax and more features.
There is OpenGOAL[1]. A re-implementation of the language that Naughty Dog used to created Jak and Daxter.
PuzzleScript is the closest to this I can think of. Hyper specialised though.
Well, if you’re interested in text-based games, there have been custom languages for a long time.
https://www.linusakesson.net/dialog/craverly/craverly_side_b...
Also LPC for muds, although that definitely wasn’t built from the ground up.
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.
SQL is deterministic. Julia is deterministic. Gameplay is not deterministic. Constraints are arbitrary and there are no rules.
I think magic the gathering set a pretty good standard.
For Magic the gathering, sure. Not for Eve-Online. Not for Counter-Strike. Not for World of Warcraft. Not for Minecraft. Games are too diverse to limit yourself to a DDL.
lol, I spent 3 years coding a game programming language...
Crafted by Rajat
Source Code