RSSAmplifier

Blog

Moonside Games

Recent content on Moonside Games

moonside.gamesRSS feed ↗6 posts

Latest posts

Stop Making Threads

A folk definition of insanity is to do the same thing over and over again and to expect the results to be different. By this definition, we in fact require that programmers of multithreaded systems be insane. Were they sane, they could not understand their programs. -Edward A Lee, “The Problem with Threads” A common question about SDL3 is: “How do I use multi-threading with the…

SDL GPU API Concepts: Sprite Batcher

I am repeatedly asked the question, “Now that there’s an implementation of the SDL Render API on top of the SDL GPU API, why doesn’t the SDL Render API just add shader support?” My response to this question is always the same: “Writing a sprite batcher isn’t that hard. You could do it in an afternoon with a cup of tea.” I stand by that. Extending the…

Introducing: SDL_shadercross

The SDL GPU API has been merged, and SDL3 is now in ABI-stable preview . I&rsquo;d like to draw your attention to the the following datatype of the API. typedef Uint32 SDL_GPUShaderFormat; #define SDL_GPU_SHADERFORMAT_INVALID 0 #define SDL_GPU_SHADERFORMAT_PRIVATE (1u << 0) /**< Shaders for NDA'd platforms. */ #define SDL_GPU_SHADERFORMAT_SPIRV (1u << 1) /**< SPIR-V shaders for Vulkan. */ #define…

SDL GPU API Concepts: Data Transfer and Cycling

Ever since the FNA team&rsquo;s GPU API proposal got approved, the concept I get the most questions about by far is cycling. This is definitely the most unique and conceptually nuanced aspect of our API, so I would like to go into some detail about it here and hopefully clear up the questions people have about it. To understand cycling, why we implement it in our API, and when and why you should…

Layers All The Way Down: The Untold Story of Shader Compilation

Background As a game developer who works primarily in frameworks instead of engines, one of the biggest pain points is the need to render on multiple platforms efficiently. For most platform-level tasks, like window management, input handling, etc, SDL does a beautiful job and I barely have to think about it. Rendering, by comparison, is a huge can of worms. Every platform has their own unique…

Archetypal ECS Considered Harmful?

The Inherent Mendacity of Benchmarks If you&rsquo;ve heard of ECS, you&rsquo;ve probably heard that its primary benefit is in terms of performance. Maybe you&rsquo;ve seen benchmarks showing a million entities on screen, processing at a blazing speed. You should be asking yourself: what conditions make this level of performance possible? I have long argued that the primary benefit of ECS is in…