Mattias_G

@Mattias_G@mastodon.gamedev.place
417 Followers
433 Following
396 Posts
Hobby game dev, making retro style games: mattiasgustavsson.itch.io and public domain C libs: github.com/mattiasgustavsson
I write about things at mattiasgustavsson.com
Feel free to DM me about anything
itch.iohttps://mattiasgustavsson.itch.io
githubhttps://github.com/mattiasgustavsson
websitehttps://mattiasgustavsson.com

Updated my app.h C library to support standard gamepads, for both windows, osx/linux and wasm.

There's a web build here for trying it: https://mattiasgustavsson.com/wasm/gamepad.html

Library can be found here: https://github.com/mattiasgustavsson/libs/blob/main/app.h

I also updated the app.h template project: https://github.com/mattiasgustavsson/template_project

My app.h library is sorely missing gamepad support. But not for long 🙂

Know what’s great? Good old .ini files. Very easy to understand and edit, even for non-programmers.

Here’s my single-header C library for reading and writing .ini files.

One of the first single header c libs I wrote, and I still use it all the time 🙂

https://github.com/mattiasgustavsson/libs/blob/main/ini.h

For those of us who still do software rendering, these alpha-blending tricks are still useful 🙂

https://gist.github.com/mattiasgustavsson/c11e824e3d603d0c86e5e0dde4ecf839

rgb_blend.c

GitHub Gist: instantly share code, notes, and snippets.

Gist

Here’s a small single-header C library for generating pseudo-random numbers.

It includes four different rng’s, including PCG and WELL, with a consistent API.

They all expose internal state for easy saving and restoring of state.

https://github.com/mattiasgustavsson/libs/blob/main/rnd.h

libs/rnd.h at main · mattiasgustavsson/libs

Single-file public domain libraries for C/C++. Contribute to mattiasgustavsson/libs development by creating an account on GitHub.

GitHub

If you haven’t tried it, give my game Neon Lies a go. It’s free and plays in the browser. I’m quite proud of it, I think it’s among the better things I’ve made. If you play it, I’d love to hear what you think of it 🙂

https://mattiasgustavsson.itch.io/neon-lies

Neon Lies by Mattias Gustavsson

A Cyberpunk Adventure

itch.io

For those of us who still do software rendering, these alpha-blending tricks are still useful 🙂

https://gist.github.com/mattiasgustavsson/c11e824e3d603d0c86e5e0dde4ecf839

rgb_blend.c

GitHub Gist: instantly share code, notes, and snippets.

Gist
I’ll be releasing this as a public domain single header c library some time soon, in case anyone finds it useful

If you try it out, I'd love to hear your thoughts. The idea would be to have 6 to 8 of these, along with maybe 4 pcm sample channels (but it would all have to be shared with game sound effects as well).

On a low level, it would be controlled using memory mapped registers, on a higher level by a midi-like note-on/note-off API, and at the highest level by a music composition tool.

I’ll be releasing this as a public domain single header c library some time soon, in case anyone finds it useful