

It shouldn't take you more than a few hours to maybe 2 days to get the ball rolling, depending on your prerequisites.

2d top down block shooter software#
(It will be running at software rasterizer speeds, of course - but it should be easy to get very good performance at say 640x480). That allows you to go wild, you can proceed to write your own 3D game engine with nothing to distract you - it's you, the CPU, and the backbuffer memory.

Optionally, later you move to a custom memory-backed backbuffer allocated using CreateDIBSection(), so you can just set each pixel using the CPU as a uint32_t RGBA value. To put something on the screen, look up the drawing context HDC, the RECT structure, and use FillRect() to draw colored axis-aligned quads.
2d top down block shooter how to#
For example on Windows, you roughly need to know about HANDLE, HWND, WNDCLASSEX, RegisterWindowClass(), CreateWindow(), how to write a window proc to handle events coming from the OS, how to write a simple message loop to pump those events. It's not that scary, just a few concepts to learn. But I think it may be interesting to skim relative to space-shooter.c just to see how differently one can structure these things, since it too is quite small and pure C with a smattering of GLSL. There are some git submodules but they're in-house developed vendored stuff I try to reuse in the interests of saving time and not repeating bugs/fixes across projects.īeing a 24-hour hack it's super rushed and messy in places. It uses GLAD, SDL2+OpenGL, and autotools in terms of third-party dependencies. I took some boilerplate code from another C game I had shipped and hacked something together in an all-nighter we called SARS: Always a pleasure to look at someone's self-contained small game written in C, especially when the source is relatively well organized.ĭuring the pandemic lock-downs a musician buddy pulled me into a 24-hour IRC-hosted "wild" compo, which usually sees mostly ANSI/music submissions.
