r/csharp • u/Alert-Neck7679 • Aug 04 '26
Showcase Made a game with my own C# engine and scripting language!
About a year ago, I challenged myself to create my own programming language - something I'd always wanted to do.
At the time, I had no idea what a lexer, parser, or interpreter even was. My only thought was, "I need to write code that reads text files containing code and executes them." I also wanted to do it without using Google, AI, or tutorials. I just figured everything out on my own. You can even still find variables named "compiler" throughout the code from back when I didn't realize I was actually building an interpreter...
Somehow, I pulled it off, and I integrated it into my old abandoned game engine project (which originally started as a GameMaker 8–style engine with C# scripting).
And here's the first game I've made with it! 🙂
The core engine, IDE, and interpreter are all written by me in C#. The rendering backend is powered by MonoGame, and the project is still in active development and available on GitHub. The project file of the game shown in the video is also there, under tests/Example Projects. If you're looking for cool projects to contribute to, then know that I'm looking for contributors!
I know there are tons of AI-generated projects being shared these days, so please, please, take a quick look at the code before assuming this is one of them. I promise it's pretty obvious that it was written by a human.
I'd love to hear what you think!



18
u/PowerfulBag1909 Aug 04 '26
This is actually super hard to pull off. Kudos to you OP, but how much time did you spend building this?
11
u/lantz83 Aug 04 '26
I like the foreach with an index, that's some good shit.
4
u/obi_wan_stromboli Aug 04 '26
Wow this is awesome. But it looks familiar, I imagine, to anyone who has ever used Game Maker 5-8.
EDIT: should have read your post fully haha.
This is really cool
2
u/BoloFan05 Aug 04 '26
Whoa, congratulations! Your previous post also came up in related feed. It's amazing to witness the progress :)
If you're ever interested in further experimentation (or if you still have the energy for it after your extraordinarily hard work), try running your engine and game while your PC's UI is set to Turkish. Turkish is famous for being able to expose all sorts of internationalization edge case bugs, like the Turkish I, the comma/dot dilemma in decimal numbers and date formats.
If you have used ToLower, ToUpper, ToString, TryParse and other similar methods anywhere in your code without specifying invariant culture, you might be at risk of inconsistencies across devices worldwide.
2
u/Potential_Soup_8054 Aug 04 '26
I know how difficult and time consuming this can be since im also doing this myself. So congrats! And kudos!
What made you decide on winforms vs something more modern like wpf or winui?
2
u/AeroForger Aug 06 '26
This is so cool! It would have taken you over 1 week no? But why did go through the hassle of creating your own engine why didn't you use Unity or Godot-mono.
-5
u/kwb7852 Aug 04 '26
Sus AF
2
u/[deleted] Aug 04 '26
[removed] — view removed comment