Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

My first game using my own scripting language!

A topic by DavidCS1 created 1 day ago Views: 58 Replies: 3
Viewing posts 1 to 3

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!

Nice. You know you could have used an already established and simple language, like Postscript. Have you thought about making the language a little bit weird?

Originally, I used C# for scripting too. But i wanted to make my own language as a challenge. I don't want it to be weird but to have some useful unusual features - for example, it has loop counters, like

```

foreach x in y : counter c

{

   println("index: " + c + ", item: " + x)

}

```

Have you considered using parser generators like antlr? They can let you maintain control for longer. Specification does not include logical NOT operator. DSLs are supposed to be simpler than GPLs and adjusted to the domain. You’ve made a C# dialect.