Comment by Razengan
1 month ago
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!
If I understand correctly, the language is not open source, right? Not even the interpreter?
That's a hard sell
tldr I plan to make the singleplayer at least source available, but keep all parts related to multiplayer/persistence/hosting (anything that requires a server) closed for a few practical reasons:
1. Cheating: There has to be some security by obscurity because in Easel, multiplayer and persistence are actually client authoritative. Why client authoritative? We don't simulate on the server to keep costs down. Why keep server costs down? Easel will never run ads because it is aimed at teenagers/children and we want to be able to vet all content shown on Easel. Without ads, combined with the fact that we want Easel to be free for teenagers, the budget is extremely tight. I would rather die than get VC funding because they would force Easel to put profit before principles, so we have to keep the costs low.
2. Development speed: Easel has changed a lot over the past 3 years, and been constantly refactored over and over again. If you look at Easel now, you might think "I could make that" but when I made it, I didn't have any reference points, so I had to iterate and iterate on a lot of things from first principles and take a lot of wrong turns. My GitHub history shows me adding about 2 million lines of code even though the project is about 150000 lines, which shows how much it has been written and re-written. Anyone who tried to contribute would just get in the way at this point. I want to spend my days coding rather than arguing with people on GitHub.
3. Survival: I don't want someone else to take all the code to make a competing platform which does not have the same principles (like putting profit ahead of child safety and showing ads). My dream is for Easel to be a place where most players are makers, like Scratch, except with more actual real games on it because the engine has built-in game features like a physics engine, particle systems and multiplayer. Like Roblox except actually beginner-friendly coding. I have a vision quest and I want Easel to fund Easel so I can make Easel.
I am looking to open source Easel but only in a way which solves the above 3 problems. The way that I have come up with is that open sourcing the singleplayer parts is the best compromise between everything. It just requires stopping development to splitting it all out, and having all the code split out will mean development would be slower, and I am prioritising development speed at the moment. The engine is not complete enough yet and missing a bunch of key features which would stop numerous games from being made. So maybe in a couple of years I will have the bandwidth to look into this. But I actually want to open source Easel, but I just need those problems solved.
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.
2 replies →
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.
Don't forget: SCUMM
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.
There is OpenGOAL[1]. A re-implementation of the language that Naughty Dog used to created Jak and Daxter.
[1] https://opengoal.dev/
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.
PuzzleScript is the closest to this I can think of. Hyper specialised though.
https://www.puzzlescript.net/
In my opinion, Free Hero Mesh is better, although each has its own advantages and disadvantages compared with the other(s).
(There are also some variants of PuzzleScript, which add a few extra functions.)
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.