C
C#5mo ago
AbstractAdz

✅ Can I make my own Game Engine with C#?

Title say it. Anyways i'm aware of Unity and Godot support C#, you may ask why would i ask this question, it's simple... I'm just curious about it, i've seen some dev make their own Game Engines via C++ or Java on YouTube but i've searched on YouTube for C# but there's lack of info of making your Game Engine with C#. I could learn C++ since the Unity Engine itself is made in C++ (From what i've heard) But should i really learn C++ and stick to C# still? Because i've used and learnt C# in Unity during 3 years if i remember but i'm not really a professional on C#, I would like to hear some answers, thanks!
7 Replies
Jimmacle
Jimmacle5mo ago
you definitely can you'll need to get familiar with p/invoke or use other wrapper libraries because most game-related libraries like graphics, physics, etc are still C++ C# has some core behaviors that can be hard to work around in games, like not being able to control when the garbage collector runs which can lead to stutters
AbstractAdz
AbstractAdz5mo ago
so i might need to learn bit of C++ to be safe than sorry? seen some devs use this thing called "Raylib" to make their games saw they support C# in their website somewhere
Jimmacle
Jimmacle5mo ago
if you don't use existing wrapper libraries you will need some knowledge of C++ if only to be able to call into native libraries
AbstractAdz
AbstractAdz5mo ago
so from what i'm reading from you just now, lemme recap this for myself. I don't need to learn C++ as long i use existing Libraries like Graphics and Physics like you said? but if i want to make them from ground up i need to learn C++ for the "Libraries" to make the game engine itself?
AbstractAdz
AbstractAdz5mo ago
https://www.raylib.com anyways here's this raylib i saw
raylib
raylib
raylib is a simple and easy-to-use library to enjoy videogames programming.
Jimmacle
Jimmacle5mo ago
yes, with this for example the library itself is written in C so you would need to find a C# library that wraps it or write bindings yourself
AbstractAdz
AbstractAdz5mo ago
ah excellent thank you very much!