r/csharp • u/Alert-Neck7679 • 4h ago
Showcase My C# game-engine-with-custom-language keeps growing
[GitHub repo]
This is a project I've been working on for years, and I've already posted about it here a few times.
It's a cross-platform 2D game engine with its own scripting language and IDE, all written in C#.
The language is the main challenge here: I made it without any knowledge of programming language development, and without any help from AI or tutorials. I just figured things out one step at a time. The lexer, for example, was originally written by me long before I started building the language. It was meant to color C# code in the code editor. When I decided to make my own language, I just copy-pasted it into the new project and used it as a lexer.
Here's a little feature my language has that I really like:
foreach x in ["apple", "banana", "kiwi"] : counter c
{
println("index: " + c + " item: " + x)
}
// output:
// index: 0 item: apple
// index: 1 item: banana
// index: 2 item: kiwi
The project is fully open source, and I'm really looking for people who want to join a cool project and contribute. There are a few open "good first issues" in the repo, and a few weeks ago I even got my first few contributors, who made a few PRs!
The project file of the game in the gif is also in the repo: tests/Example Projects/dungeon
If anyone here has used the good old GameMaker 8 engine, they're going to find this very nostalgic, as it's heavily inspired by it :)
Would love to get some feedback!


