My own version of GML...

My own version of GML...

A little game I'm making with my engine

So, the thing in this screenshot is the IDE of my own game engine ("ArcadeMaker"), which is a hobby C# project I've been working on for years. It shows a little snippet of code written in the custom language I made for the engine.

The project is heavily inspired by GameMaker, but I want to share one little thing where I took a different approach than GM.

You can see in the code in the screenshot (not the GIF, the other screenshot) that it calls the placeMeeting function, but the syntax is a bit different from what it would look like in GML: there are these <> symbols around the object name (placeMeeting(x, y <obj_player>)). These <> mean that we're referencing the TYPE (or "asset" in GM) of the object, rather than a specific instance.

In GML, an object name can also be used to reference an instance (like obj_player.x = 200). GML was my first programming language (back in GM8!), and I remember how confusing this was for me. In my language, you can write obj_player.i.x to reference a single instance of an object in the room.

It's not about mocking GML or anything! GM is 30 times more powerful than my little engine, and I know that. I really think GM is a great (and underrated, by the way) engine. I just wanted to point out this little difference.

Would love to hear your thoughts about it 🙂

by the way, my engine is open source, and if you know C# and looking for cool projects to join, you are more than welcome to contribute! There're a few opened "good first issues" in the repo, and there's me who is happy to answer any question... :)

u/Alert-Neck7679 — 9 days ago
▲ 330 r/dotnet

Got my first contributors for my .NET project 🙂

In the last few weeks, my repo got its first few PRs, and it feels so nice! I had been trying to get contributors for a long time, but this is my first open-source project, and I just didn't realize how things work on GitHub.

I didn't understand that a good way to get people to contribute is to open issues yourself, with the "good first issue" label when possible. I thought issues were mainly for other people to report bugs or request new features.

Just wanted to share that here :)

The project is a game engine called ArcadeMaker, which I've already posted about here a few times. What makes it unusual is that it uses a custom scripting language that I made myself.

u/Alert-Neck7679 — 18 days ago

My biggest project: game engine with its own scripting language & IDE

[GitHub repo]

So this post is about my biggest side project, which is a game engine with its own IDE and interpreted scripting language, all written by me in C#.

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! there are some opened good first issues in the repo.

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!

u/Alert-Neck7679 — 1 month ago

My game engine with a custom scripting language!

GitHub repo: http://github.com/ArcadeMakerSources/ArcadeMakerWanted to share here a big project: 2D game engine with its own scripting language and IDE.

It's written in C# (with no AI code) and open source (MIT licence) and latestly I've got my first few contributors and a lot of people found it interesting, so I thought I'll try to share it here, for case there are people here who know C# and want to join a cool project (there are a few opened "good first issues" in the repo) / people who want to try the engine.

It's heavily inspired by old good GameMaker8, but cross platform (MonoGame backend) and with a stronger language.

The scripting language is executed by a C# interpreter written by me (I did it as a personal challenge) and contain some custom nice features, like "loop counters", which is a counter you can easily attach to any kind of loop:

foreach x in ["apple", "banana", "watermelon"] : counter i
{
    println(i + ": " + x)
}

// output: 
// 0: apple
// 1: banana
// 2: watermelon

so just check the repo, I promise that this is a real thing.

Would love to here what u think🙂

u/Alert-Neck7679 — 1 month ago

Is this tutorial easy to understand for one who is familiar with GameMaker?

I am building a GameMaker based engine with a custom language, and I'm working on a "make your first game" tutorial for it. I would like to know if this is understandable for one who is coming with a basic knowledge of GameMaker.

If you can check it and give some feedback I'll really appreciate that: https://github.com/ArcadeMakerSources/ArcadeMaker/tree/master/Make%20Your%20First%20Game

Thanks in advance!

reddit.com
u/Alert-Neck7679 — 1 month ago
▲ 12 r/foss+1 crossposts

Cool open source MonoGame project to contribute to

https://preview.redd.it/5msq4t4myunh1.png?width=1599&format=png&auto=webp&s=42fa800581aed11191c5d2d5c192a0dcefdc2b37

https://preview.redd.it/dd09zy4myunh1.png?width=1599&format=png&auto=webp&s=5aa49375cfed615a954b5e7d5f7321c64fa70834

https://preview.redd.it/pm789x4myunh1.png?width=1599&format=png&auto=webp&s=b3d6cbf79e5e82980168faea59297c8705a70d53

This is ArcadeMaker, a 2D engine with its own scripting language & IDE, with MonoGame backend.

It's all written in C# (with no AI code) and open source (MIT licence) and latestly I've got my first few contributors and a lot of people found it interesting, so I thought I'll try to share it here, for case there are people here who want to join a cool project (there are a few opened "good first issues" in the repo) / people who want to try the engine.

It's heavily inspired by old good GameMaker8, but cross platform (well, it uses monogame) and with a stronger language.

The scripting language is executed by a C# interpreter written by me (I did it as a personal challenge) and contain some custom nice features, like "loop counters", which is a counter you can easily attach to any kind of loop:

foreach x in ["apple", "banana", "watermelon"] : counter i
{
    println(i + ": " + x)
}

// output: 
// 0: apple
// 1: banana
// 2: watermelon

so just check the repo, I promise that this is a real thing.

github.com
u/Alert-Neck7679 — 1 month ago

Game engine with its own scripting language

This is a big project I'm working on for years.

2D game engine (inspired by GameMaker8), with its own IDE and scripting language. Everything is written in C#, including the interpreter of the custom language. Latestly, I got a few first contributors, and I publish it here because I really want more people to get involved. I think it's a really cool and fun project to join to. There is some basic documentation, some "good first issues" and there's me who is here to help with any question 🙂

If you know C#, you have to check it: https://github.com/ArcadeMakerSources/ArcadeMaker

Any feedback is welcome 🙃

u/Alert-Neck7679 — 1 month ago

Game engine with its own scripting language

This is a big project I'm working on for years.

2D game engine (inspired by GameMaker8), with its own IDE and scripting language. Everything is written in C#, including the interpreter of the custom language. Latestly, I got a few first contributors, and I publish it here because I really want more people to get involved. I think it's a really cool and fun project to join to. There is some basic documentation, some "good first issues" and there's me who is here to help with any question 🙂

If you know C#, you have to check it: https://github.com/ArcadeMakerSources/ArcadeMaker

Any feedback is welcome 🙃

u/Alert-Neck7679 — 1 month ago
▲ 0 r/csharp

We should decide on a naming convention for extension members

We have a specific naming convention for interfaces (starting with a capital I followed by the interface name) and for fields (starting with an underscore), but extension members currently look just like regular members. When reading someone else’s code, I want to be able to tell when a function or property comes from a third party.

But that’s not even the main point.

Extension members have a unique behavior that normal members cannot achieve — they can be invoked on null references. This opens up a very nice opportunity to make code more readable and less error‑prone. For example, a few months ago I wrote here that you can have an IsNullOrWhiteSpace extension property for strings, instead of using the standard string.IsNullOrWhiteSpace(str) method. People commented that even though it works, it doesn’t look like it should, and that it’s a bad idea.

Now imagine that extension properties and methods always start with an underscore. With such a convention, you could implement extension members that are valid to call on null values, and anyone reading the code would immediately know it’s safe — because the member starts with an underscore, signaling that it’s an extension.

Continuing with the string examples, here are a few cases where this would be useful:

str.StartsWith(substr) — calling on null returns false instead of throwing

str.Contains(substr) — same

Do you agree that this could be a very useful idea?

reddit.com
u/Alert-Neck7679 — 1 month ago

Linux-like IO API

I'm building my own interpreted language.

I had an idea, to base my I/O API on the linux terminal commands, that many developers already know, so a user wouldn't need to learn an entire new API.

This is a basic example:

using io  
  
// create a directory  
mkdir("notes")  
cd("notes")  
  
// create files with content  
echo("Do my math.", "A note about homework.txt")  
echo("Buy milk and bread.", "shopping list.txt")  
  
const currentCD = pwd()  
const allFilesAndSubDirs = ls()  
  
debug(cat("shopping list.txt")) // prints "Buy milk and bread."

but I'm not that sure that this is a good idea, maybe some techniques are good for terminals but bad for programming, and some of the function names might be confusing (like pwd() which is "print working directory" but in my language it does not exactly PRINT anything, but just returns a string value).

What do you think?

reddit.com
u/Alert-Neck7679 — 2 months ago

The first game I made with my engine!

So this is just a little game inspired by "G-Switch". It's a multiplayer game where the goal is to pass a maze by switching your player's gravity.

What's special about it is that i made it with my own programming language and game engine! It's open source (github) if you want to check it, and the project file of this game is also there in the repo.

Hope you like it🙂

youtu.be
u/Alert-Neck7679 — 2 months ago
▲ 165 r/dotnet

Made a game with my own C# engine and scripting language!

Game Video on YouTube

So this post is about my biggest .NET project, which is a game engine with its own IDE and interpreted scripting language, all written by me in C#.

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!

u/Alert-Neck7679 — 2 months ago

My first game with my own game engine and scripting language!

https://reddit.com/link/1vh1jl1/video/i1786wb7pqhh1/player

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.

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!

u/Alert-Neck7679 — 2 months ago

Made a game with my own game engine and scripting language!

https://preview.redd.it/qsojl8fpxchh1.png?width=1599&format=png&auto=webp&s=f129c5144435cc13143e2d6190402c1c0ac3eb5c

https://preview.redd.it/jdu5y7fpxchh1.png?width=1599&format=png&auto=webp&s=797aeb00b1d2534c3a4650efde71b2cabd4d35c4

https://preview.redd.it/z5lw28fpxchh1.png?width=1599&format=png&auto=webp&s=ab59560a71fa5d12ec083ca7c3e2dd9fe4517914

Game & Engine in GitHub

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!

u/Alert-Neck7679 — 2 months ago

Made a game with my own GameMaker8-based engine and scripting language!

Game Video on YouTube

A few yrs ago, I decided to make my own version of GameMaker 8, replacing the old GML syntax with C#. I've made a long process with it but abandoned it after few months.

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, instead of C#

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'd love to hear what you think!

u/Alert-Neck7679 — 2 months ago

Made a game with my own MonoGame based engine and scripting language!

https://reddit.com/link/1vf4ao8/video/iq0dnprnhbhh1/player

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!

And a question - I really want to be able to add web export to my engine - yesterday I've tried running this game on the web using KNI Engine (a fork of monogame with BlazorGL export) - but performances were terrible. I blame myself for this, as the performances of my scripting language are probably just bad on browser - but has anyone here successfuly exported his monogame game to the web and can share any tips?

u/Alert-Neck7679 — 2 months ago
▲ 221 r/csharp

Made a game with my own C# engine and scripting language!

Game Video on YouTube

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!

u/Alert-Neck7679 — 2 months ago

My first game with my own game engine and scripting language!

https://reddit.com/link/1vep64x/video/pnbjg3azw7hh1/player

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.

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!

u/Alert-Neck7679 — 2 months ago
▲ 6 r/csharp

Fields with [Using] attribute

I wrote a small interface that automatically disposes any disposable fields in a class when that class itself is disposed. If you add this file somewhere in your project:

public interface IAutoDisposable : IDisposable
{
    void IDisposable.Dispose()
    {
        Exception? ex = null;

        // dispose all fields marked with the [Using] attribute
        const BindingFlags flags = BindingFlags.NonPublic | BindingFlags.Instance;
        foreach (var fld in GetType().GetFields(flags))
        {
            if (fld.GetCustomAttribute<UsingAttribute>() != null)
            {
                if (fld.GetValue(this) is IDisposable d)
                {
                    try // keep going even if disposal throws
                    {
                        d.Dispose();
                    }
                    catch (Exception e)
                    {
                        ex ??= e;
                    }
                }
            }
        }

        // if any exceptions occurred, throw the first one
        if (ex != null)
            throw ex;
    }
}

public class UsingAttribute : Attribute;

You can then write classes like this:

class Item : IAutoDisposable
{
    [Using]
    private readonly Image icon = DownloadIcon(...);
    ...
}

And use them like:

using (Item item = new(...))
{
}
// item.icon is now disposed

What do you think?

reddit.com
u/Alert-Neck7679 — 3 months ago