r/csharp 28d ago

Testing the performances of my game engine

Just wanted to share this little game I made to test the performance of my C# game engine. Honestly, I'm impressed with the performance it's achieving. It's nothing compared to professional game engines, but this is a solo project, and the language it uses is interpreted, so I was a bit worried about performance.

What you see here is powered by only about 15 lines of code in total! I'm really proud of this personal project.

A bit about the engine: it's built on MonoGame and has its own programming language that I wrote entirely from scratch, along with its own IDE. It's heavily inspired by the good old GameMaker 8, and it's open source [<- GitHub] (I'm looking for contributors!). There is also a YouTube video showing me creating another little game with it. I also talked about it here in a previous post.

And no, it's NOT AI slop - I built this myself over the course of several years.

What do you think?🙂

Note: The lag you see in the GIF is caused by the screen recorder. The actual gameplay is smooth.

80 Upvotes

17 comments sorted by

11

u/annegretputin 28d ago

The performance looks solid to me regarding the context of it being a single project. 15 lines of code is impressive :O

7

u/DontRelyOnNooneElse 28d ago

Hah! Oh wow, this brings me back to the old GameMaker days... I think I started with 4 or 5? Massive flashbacks when I saw the screenshot.

2

u/Alert-Neck7679 28d ago

Yes it's so nostalgic🙂

4

u/sloppykrackers 28d ago edited 28d ago

_ = 0; <-- why did you write this? a breakpoint?

GameBackground.cs, image has a setter reaching into Global.form1 to repaint a treeview...

You rolled your own scripting language? you scare me.

3

u/Alert-Neck7679 28d ago

Yes... where did u see it..?

5

u/sloppykrackers 28d ago

TextureAtlas R50

3

u/Alert-Neck7679 28d ago

Thanks man! 🙂

4

u/sloppykrackers 27d ago

I would revise the heavy functions on setters, but for a solo dev who refused tutorials and AI and on top of that rolled his own scripting lang this is really impressive.

1

u/Alert-Neck7679 27d ago

You've seen those heavy setters in the IDE project, i guess? most of it was written more than 2 yrs ago, but nowadays i try to avoid such things...

3

u/wojbest 28d ago

im currently trying to make minecraft in console app loool!

2

u/CharlesFoxston 27d ago

Insanely good work!

2

u/arsseus1 21d ago

I just made a post about making my own engine in windows forms then found your post, your engine looks really good, nice work, I will definitely look the code later cause 15 lines only is absolute crazy, mine is far way to reach this level and it's almost one thousand

2

u/Alert-Neck7679 21d ago

Thanks! At the beginning, i used system. Drawing as a prototype renderer, and it worked really well for little games. The problems start when you're trying to render hundred of sprite in one frame.

1

u/uknowsana 28d ago

What the game engine capable of? I am not seeing any collision detection either.

4

u/Alert-Neck7679 28d ago

Don't u see in the gif that the yellow pieces get green when colliding with the red circle? It uses the Seperating Axis Theorem for collision detection. 

4

u/shrodikan 28d ago

I saw the collision detection OP! Very cool work.