Simple 2D graphics in C#
I want to make a 2D physics engine (mostly for learning), and I need a way to visualise the simulations I run. I want something that is simple to use, lightweight and (ideally) cross-platform. I need it to provide a direct way to open a window and draw basic shapes onto a canvas (circles/ellipses, polygons), providing me with full control over aspects like colour and line width. In brief, I'm looking for something like Processing but for C#.
5 Replies
Take a look at monogame
I've also heard good things about the osu engine
iirc drawing primitive shapes in monogame isn't straightforward
Indeed, it ins't straightforward at all. From what I read, I'd need to add a texture for every primitive I wanted. I'm looking for something that allows me to do something like:
(syntax is merely illustrative)
Yeah, you have to either construct textures at runtime or use 3rd primitive stuff.
Idk if you need a feature rich framework, but raylib is very good for basic graphics
https://github.com/ChrisDill/Raylib-cs
GitHub
GitHub - ChrisDill/Raylib-cs: C# bindings for raylib, a simple and ...
C# bindings for raylib, a simple and easy-to-use library to learn videogames programming - GitHub - ChrisDill/Raylib-cs: C# bindings for raylib, a simple and easy-to-use library to learn videogames...
Thanks! That is exactly what I was looking for!