What library should I use to make basic 2D graphics which is simple to use and that is able to quickly draw a bunch of particles (circles) on the screen with updating positions every frame? (Not the best description ever. I explain it better in the post's text)

This page summarizes the projects mentioned and recommended in the original post on /r/csharp

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • SkiaSharp

    SkiaSharp is a cross-platform 2D graphics API for .NET platforms based on Google's Skia Graphics Library. It provides a comprehensive 2D API that can be used across mobile, server and desktop models to render images.

  • ComputeSharp

    A .NET library to run C# code in parallel on the GPU through DX12, D2D1, and dynamically generated HLSL compute and pixel shaders, with the goal of making GPU computing easy to use for all .NET developers! 🚀

  • If you don't mind being Windows only, I would also recommend trying out (shameless plug) ComputeSharp. You can find it on NuGet and it's available for UWP and WinUI 3 as well with ready to use XAML controls. The point is that it would allow you do your entire rendering via pixel/compute shaders, so it could basically run entirely on the GPU. That'd allow you to render even millions of particles with pretty good performance 🙂

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • Win2D

    Win2D is an easy-to-use Windows Runtime API for immediate mode 2D graphics rendering with GPU acceleration. It is available to C#, C++ and VB developers writing apps for the Windows Universal Platform (UWP). It utilizes the power of Direct2D, and integrates seamlessly with XAML and CoreWindow.

  • Alternatively you can also try Win2D, which is an official wrapper for D2D available for UWP and WinUI. You could use its CanvasAnimatedControl panel and then do your drawing from there, and just manually draw all your particles. The actual drawing would still be GPU accelerated, so it'd be relatively efficient (though less than using a custom shader, as you'd be queueing each particle from the CPU side).

  • simulationframework

    A simple and user-friendly framework for writing small graphical apps in C#.

  • this is late, but I’ve been working on a project for exactly this: https://github.com/Redninja106/simulationframework

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts