r/csharp • u/WJava_Game_Dev • Jul 08 '26
Switching from Java to C# for custom game development - where should I actually start?
I've been learning Java for a while by trying to make a game, but looking back, I feel like I wasn't really learning. I mostly followed tutorials and used AI to help write code, so I never built a strong understanding of how everything worked.
I'm thinking about switching to C# because it seems like there are a lot more modern game development resources and a larger community.
My long-term goal is not to use Unity or another game engine. I eventually want to build my own engine/framework and make a fun 3D multiplayer game (private multiplayer with friends, not a large online game). I enjoy building systems myself, so that part is actually something I'm looking forward to.
Right now I have a lot of questions:
- What should I learn first before trying to make a game?
- What should I use to code. For Java I used both VSCode and Eclipse, but from what I understand, Eclipse is not good for C#. I would prefer not to pay to code, and my computer is a bit old so nothing huge would be best.
- Should I start with console applications or jump into graphics?
- What graphics library or framework should I use in C# if I don't want a full game engine?
- Are there any books, YouTube channels, or courses you'd recommend?
- Is building a small 2D engine first still the best path before attempting 3D?
- What are some mistakes beginners make when trying to build their own engine?
I'm not in a rush—I want to actually understand what I'm doing this time instead of just copying tutorials. Any advice from people who have taken a similar path would be appreciated.
13
u/wallstop-dev Jul 08 '26
Java and C# are extremely similar, with the exception that C# lets you stack-allocate more, which can impact perf.
However, before doing anything, I'd take a step back. Will switching languages really help you... learn anything, or achieve your goal? If you have all the problems you listed with Java, what's going to stop you from having them with C#? And if you have a whole plan for how to prevent them from happening with C#, why not just... apply those to what you already have with Java?
C# is a great language. Java is also a great language.
One more note - if your goal is building (engines, frameworks, etc), have at it. But if your goal is the product (the game), I would highly, *highly* recommend not rolling your own engine. If you are at the stage where your asking "how do I learn", you are probably looking at 10+ years before you have something close to what your goal is, assuming you invest loads of time. And that isn't even covering the non-code portions (game design, assets, integration, etc)
Just my 2c.
4
u/xbattlestation Jul 09 '26
Can I recommend you look at Monogame? Yes it is a framework, but it is very bare-bones, and lets you pretty much write everything in your own C# classes except the low level graphics rendering.
3
u/DirtAndGrass Jul 08 '26
How's your math? Linear algebra vector calculus, etc? If you want to make your own engine, you need to brush up on that, the platform is probably less of your worries.
How to deal with (and create) assets is the next non programming skill needed.
I'd recommend small bites, and working with an existing engine, like Godot or unity before going down that path.
1
u/TrishaMayIsCoding Jul 09 '26
Some people will tell you to use C++ 🫢
But pure C# is more than capable of building a custom engine/framework or even a full-blown game engine with an editor.
Examples include:
Flax Engine
Wave Engine
Stride Engine
If you're targeting Windows, Linux, Android, iOS, macOS, and Steam, C# is perfectly capable. Porting to consoles is a bit more complicated, and porting to the web through Blazor also requires additional work.
You can:
Use or create your own C# bindings for Vulkan or your preferred graphics API.
Use or create your own math library (e.g., Vector2, Vector3, Matrix4x4, etc.).
Write your own rendering pipeline, material system, and game object architecture (or whatever you prefer to call it: nodes, ECS, actors, etc.).
Warning: Doing this may result in hair loss and a gradual decline in sanity. 🤭
I started learning C#, graphics programming, and gamedev all at the same time last December 2025, I'm a bit slow so it depends on your capability and adaptation.
Good luck,
It's still in the early stages, but it's already capable of rendering 3D skeletal animations, physically based rendering (PBR), and soft shadows.
https://x.com/i/status/2055603381704782223
1
u/ThatzOkay Jul 09 '26
Unity
2
u/TheSwiftOtterPrince Jul 09 '26
The mistake is making an engine while most devs do not really make an engine. Because games run on an engine, people assume to make a game by yourself you need to write an engine or having written a game means having written an engine. Yeah, technically copying floppy bird means you made at least one game engine. Sounds awesome and people kiss each other asses for writing their own engines like real devs. Sounds impressive. Like Unreal Engine top of the class level skills, like building a foundation for success by having an engine.
Using libraries for different stuff like graphics, audio, inputs, physics and using your own code to put it all together is a fine way to make games. It will be fun, you will learn a lot. You can just make a game and in your next game, you can reuse the parts of code you don't hate yet. The engine stuff is mostly expert cosplay.
1
u/marcussacana Jul 09 '26
I think SDL2 is the easiest way to get started with rendering, but since you want to make a 3D game, OpenGL would be a better choice.
I wrote my own OpenGL-based framework in C# a few years ago, with the additional challenge of making it run on the PlayStation 4 (yeah, that definitely wasn't my best idea), and it took me about six months to get it to the point where it could actually run a game.
Since you said you have experience writing game engines, I assume you're looking for libraries you can use. OpenTK is probably what you're looking for, and for audio, I'd recommend NAudio.
1
u/SharpAnarki Jul 09 '26
for 3D You can use a library like OpenTK 5.0 which is an OpenGL, OpenAL, Vulkan wrapper
Things to learn, look up some presentations about performance like High-performance code design patterns in C#. Konrad Kokosa .NET Fest 2019
Learn about structs, how memory works, more data oriented programming instead of OOP.
You will want to try to minimize the work your garbage collector does.
You can use VS community edition to code.
I started by converting an old open source 3D game engine from C to C#
Quake3 CSharp
0
u/RlyRlyBigMan Jul 09 '26
You may not want to use a premade game engine but building both sides from scratch as a beginner sounds like a nightmare to me. On the level of trying to learn how to design a car without being a mechanic on existing cars first. If it were me, I would learn the language using a standard engine like unity first, and then work to replace it with the engine after that so that you've got somewhat of a product to test your engine on. Otherwise you'll have a mountain of untested code when you finally get a simple game stood up and the bugs could be hidden anywhere in the whole project.
0
u/[deleted] Jul 08 '26
[deleted] — view deleted comment