Mattias Gustavsson πŸ’– Profile Banner
Mattias Gustavsson πŸ’– Profile
Mattias Gustavsson πŸ’–

@Mattias_G

4,496
Followers
320
Following
922
Media
6,078
Statuses

Hobby game dev, making retro style games: and public domain C libs: He/him. 🌈

Stockholm, Sweden
Joined July 2009
Don't wanna be here? Send us removal request.
Pinned Tweet
@Mattias_G
Mattias Gustavsson πŸ’–
3 months
I’m going to do a 🧡 about making retro-style games in C/C++, and also about getting them to run in a browser.
Tweet media one
Tweet media two
Tweet media three
Tweet media four
6
88
637
@Mattias_G
Mattias Gustavsson πŸ’–
3 months
Personally, I like C, as a programming language. I like writing things in C from scratch, without frameworks. Doing this, patterns emerge, repeated ways of doing things, and it's different from using a library or helper I want to look at a simple construct: dynamic arrays
28
79
1K
@Mattias_G
Mattias Gustavsson πŸ’–
2 months
Have you ever thought about playing around with the original DOOM source code? I'd recommend it, it is really nice. But if you grab the original source code release, it is not very easy to get it to build. So I wanted to share this quick fix-up for it, making it easy to build
Tweet media one
18
187
1K
@Mattias_G
Mattias Gustavsson πŸ’–
2 months
I thought I'd share this, for thos who'd like to try making a game without using a library, just with the windows win32 API directly. This code here (link to it in reply) is probably the minimum needed to create a window and set up a screen buffer that you can plot pixels to
Tweet media one
45
110
951
@Mattias_G
Mattias Gustavsson πŸ’–
3 years
For the last couple of weeks I've made a tiny "engine"/framework which can be used to make games or programs that feel like they are from the MS-DOS era. It's super easy to get started with, using C (compiler included) to program it
Tweet media one
Tweet media two
Tweet media three
Tweet media four
20
190
865
@Mattias_G
Mattias Gustavsson πŸ’–
5 years
I love stb-style single header libs - it is the most important idea in the C/C++ space in modern time. I am using some by other people, and have many which I’m making myself (in various stages of completion). This is a thread where I will list the more useful ones.
17
134
617
@Mattias_G
Mattias Gustavsson πŸ’–
2 years
I’m going to do a 🧡 about making retro-style games in C/C++, and also about getting them to run in a browser.
Tweet media one
Tweet media two
Tweet media three
Tweet media four
16
117
608
@Mattias_G
Mattias Gustavsson πŸ’–
2 years
Here’s a couple of close-ups of what my CRT shader looks like really zoomed in
Tweet media one
Tweet media two
25
47
577
@Mattias_G
Mattias Gustavsson πŸ’–
3 years
As some people have asked for it, I've put a pre-built executable (for Windows) of my CRT viewer on itch
@MrmoTarius
Mrmo Tarius
3 years
Trying out @Mattias_G 's CRT viewer. I want to put this CRT postprocessing over EVERYTHING :D #pixelart
Tweet media one
Tweet media two
Tweet media three
7
50
503
17
90
399
@Mattias_G
Mattias Gustavsson πŸ’–
21 days
Here are my bookshelves (for games/programming). What does yours look like? What books am I missing?
Tweet media one
53
16
397
@Mattias_G
Mattias Gustavsson πŸ’–
7 months
A quick and easy way to start making something fun in C. 1. Clone this repo: 2. Download tcc and unzip it 3. Execute `tcc\tcc source\main.c` You now have window that you can plot pixels in - all you need to get started :)
Tweet media one
10
44
369
@Mattias_G
Mattias Gustavsson πŸ’–
3 years
My mini framework "dos-like" for making DOS style productions for Windows/Linux/Mac, just got the addition of a simple code editor, and with the included C compiler (on Windows) this makes it a pretty much complete package for making DOS-style programs
Tweet media one
Tweet media two
Tweet media three
Tweet media four
6
70
367
@Mattias_G
Mattias Gustavsson πŸ’–
3 years
I have made a Windows port of the original DOOM, with my CRT shader applied to it. Try it out here:
Tweet media one
Tweet media two
Tweet media three
14
47
342
@Mattias_G
Mattias Gustavsson πŸ’–
3 months
What are your favourite C (not C++) game engines?
Tweet media one
71
12
342
@Mattias_G
Mattias Gustavsson πŸ’–
2 months
Been thinking about maybe doing a series of tweets showing step by step how you could make a simple game using C and only stb-style single-header libs, no engine, no build systems. Not sure if it’s a good idea though. Just feels like lower barrier for me than writing tutorials
24
10
260
@Mattias_G
Mattias Gustavsson πŸ’–
2 years
If you have seen my "dos-like" framework, you might have asked the question "But does it run DOOM?" The answer is Yes, yes it does run DOOM. It runs DOOM rather well 😎 Try it here: ---
Tweet media one
8
44
217
@Mattias_G
Mattias Gustavsson πŸ’–
2 years
When compiling C projects to WASM to run in a browser, I noticed that it is possible to package all the code, data, html & js wrapping into one single .html file. I did that for my DOOM port for example: I think there is something very nice about this...
2
23
193
@Mattias_G
Mattias Gustavsson πŸ’–
1 year
Finally got around to merging my three crt shader variants into a single lib, making it easier to have apps that switch between them. The "lite" one is the most recent, and I think I'm going to be using that quite often, as I think it adds a nice feel without being overbearing
Tweet media one
Tweet media two
Tweet media three
Tweet media four
8
21
184
@Mattias_G
Mattias Gustavsson πŸ’–
5 months
I wanted to share something I've been playing around with recently: a image processing thingy for taking "digital" comics (retouched re-releases of old comics in digital form), and make them look a bit more like old comics printed with low-quality ink on pulp paper.
Tweet media one
19
21
182
@Mattias_G
Mattias Gustavsson πŸ’–
3 years
Have you wanted to try running an emulator, but never got around to get one set up and running? Then this is for you, MS-DOS emulator with CRT shader, and a bunch of game demos bundled and ready to go. Just download, run it, and choose a game from the menu
Tweet media one
Tweet media two
Tweet media three
Tweet media four
1
54
175
@Mattias_G
Mattias Gustavsson πŸ’–
2 years
Books are awesome πŸ™‚ Here’s my collection of programming & videogame books. Would love to see your bookshelf!
Tweet media one
28
12
172
@Mattias_G
Mattias Gustavsson πŸ’–
4 years
It's done :) I have modified SteemSSE Atari ST emulator to run with my CRT shader, and bundled a bunch of game demos so you can just download and run. It boots into a nice menu which you can launch the games from. Enjoy!
Tweet media one
Tweet media two
Tweet media three
13
35
152
@Mattias_G
Mattias Gustavsson πŸ’–
2 months
If you want to learn more about how DOOM works, how the code and engine is structured, and just in general want a really good read, I really recommend Game Engine Black Book: DOOM by @fabynou , available here: It is really great, as is his other books
Tweet media one
3
13
151
@Mattias_G
Mattias Gustavsson πŸ’–
4 years
I've been doing some DOS code again, and so been using Turbo Pascal. And it's obviously old (1992), and I was not at all familiar with shortcuts and such anymore. But once I got into it a bit, I did feel like some aspects of it made it a lot nicer to work in than modern IDEs.
Tweet media one
12
18
145
@Mattias_G
Mattias Gustavsson πŸ’–
2 months
Found this old, old code I wrote back in... 90/91 or so I guess?
Tweet media one
19
7
137
@Mattias_G
Mattias Gustavsson πŸ’–
6 years
Check out my custom DOSBOX, featuring a CRT filter for that proper retro feel. Bundled with a bunch of playable game demos - just download, unpack, run, and select a game from the handy menu. #DOSgaming #retrogaming #dosbox
Tweet media one
Tweet media two
Tweet media three
9
42
132
@Mattias_G
Mattias Gustavsson πŸ’–
2 years
I’d like to make a 🧡 about Yarnspin, my mini ”game engine” for telling interactive stories.
Tweet media one
5
42
134
@Mattias_G
Mattias Gustavsson πŸ’–
3 years
Over the weekend, I started making a tiny "game engine" in C, specifically for making DOS-style game. It is not for writing DOS code, just to make it a bit more easy to make things which has a DOS look-and-feel. It's just for fun though, not expecting it to amount to much πŸ™‚
4
12
134
@Mattias_G
Mattias Gustavsson πŸ’–
2 years
I just merged a major update to my C framework dos-like. I didn’t do any of the work for this one though, credit is all to @B_Schelling It gives dos-like full WebAssembly support, and with a very nice, compact toolchain Run the wasm samples here:
Tweet media one
8
22
127
@Mattias_G
Mattias Gustavsson πŸ’–
3 years
What if, my CRT View app, but with support for displaying animated GIFs? Check out v1.1 This was a quick and frantic hack over lunch, but hopefully it works and I haven’t broken anything 😝 Keeping the previous version up as well just in case…
10
26
127
@Mattias_G
Mattias Gustavsson πŸ’–
3 years
If you liked the crt filter in my Crt View, and want to see it in action, you can try this customized Dosbox which has my filter and a bunch of game demos bundled with it - no complicated setup, just download, run and enjoy!
Tweet media one
Tweet media two
Tweet media three
Tweet media four
8
31
126
@Mattias_G
Mattias Gustavsson πŸ’–
3 months
I’ve been programming in C for about 5 years now (and only on my hobby projects). Before that it was all C++ (and it still is for my day job). So I’m not really one of those people who’s been doing C since it was invented πŸ™‚
12
2
126
@Mattias_G
Mattias Gustavsson πŸ’–
2 months
The repo is here: and to build it, you just go: cl doom.c or tcc doom.c no need to install any dependencies or use any build systems. This version is for windows and wasm, but might not be too difficult to port to mac/linux
5
5
122
@Mattias_G
Mattias Gustavsson πŸ’–
3 years
I’ve been playing around with generating isometric tiles from textures and displacement maps (from a texture pack I bought years ago). The idea is to make a late DOS era style 2D iso engine at some point. I think they work nicely πŸ™‚
Tweet media one
4
11
116
@Mattias_G
Mattias Gustavsson πŸ’–
6 years
For some time, I've been working on a C/C++ game engine for retro 2D games, made up entirely from single-file header-only library. I've just released a very early preview of the source code, for those who might want a peek. Not quite ready for use though.
Tweet media one
4
38
114
@Mattias_G
Mattias Gustavsson πŸ’–
2 months
If you’ve been thinking of trying C programming, what’s the main thing holding you back? What would you want, to feel like you could get started?
63
11
111
@Mattias_G
Mattias Gustavsson πŸ’–
2 years
I like playing emulators with CRT filter, so I made a modified version of DOSBOX, with CRT built in. I think too often, emulators can be hard to figure out for beginners, so I bundled a bunch of game demos with it, and made a menu to launch them from
Tweet media one
Tweet media two
Tweet media three
Tweet media four
5
23
108
@Mattias_G
Mattias Gustavsson πŸ’–
3 months
This is how I create a dynamic (or growable) array in C, when I'm not using any library or framework "capacity is" the initial capacity, which we will grow as needed. I do sizeof(*myarr) instead of sizeof(float), as I find it makes it more robust if having to change the type
Tweet media one
5
2
103
@Mattias_G
Mattias Gustavsson πŸ’–
3 years
I hacked in some basic support for exporting animated GIFs from my Crt View app. I have only tried it on windows, but might work on mac/linux too. Press F8 when displaying an animated gif, and it will save a crtview.gif file with the filter applied.
5
10
90
@Mattias_G
Mattias Gustavsson πŸ’–
3 years
Screenshots from my WIP dungeon crawler #AfterworldRPG , and the custom editor I made for it. I really should get back to this and finish it up at some point...
Tweet media one
Tweet media two
Tweet media three
Tweet media four
5
6
88
@Mattias_G
Mattias Gustavsson πŸ’–
3 years
Making a simple code editor for dos-like. Yeah, sure, mostly we will all be using real editors to write code for it, but I thought it would be fun to include a dos-styled one. I guess I want to add some simple syntax highlighting as well, but then it will be pretty much useableπŸ™‚
Tweet media one
6
7
87
@Mattias_G
Mattias Gustavsson πŸ’–
2 years
My first computer was a C64. But my second one was an Atari ST, and it is the one I have the fondest memories of. It was there I really started making things, games at first, and later demos. As I like CRT shaders, I’ve modified the steem emulator here:
Tweet media one
5
17
85
@Mattias_G
Mattias Gustavsson πŸ’–
3 years
This is the game dev environment that undoubtedly had the biggest impact on me as a programmer- STOS The Game Creator on Atari ST, created by @LionetFrancois Anyone else have fond memories of this?
Tweet media one
Tweet media two
Tweet media three
Tweet media four
20
11
82
@Mattias_G
Mattias Gustavsson πŸ’–
3 months
Even though I personally prefer to use C, I try to make sure all my libraries can compile as C++ as well, to make them available to C++ developers too (even if they are still very much C libs at their core, just that compilation shouldn't fail with a C++ compiler).
8
1
82
@Mattias_G
Mattias Gustavsson πŸ’–
3 years
Thanks to @badlogicgames we now have Mac and Linux builds for CRT View πŸ₯³ And in addition, support for dragging and dropping images onto the window when the app is running πŸ₯³ Get it here, version 1.2 is the one you want:
9
25
79
@Mattias_G
Mattias Gustavsson πŸ’–
2 years
I have a single header C lib, app.h, which I use all the time to create a surface I can draw on. It is what I use for most of my stuff. I just made a template project for it, including github actions to build it om win/mac/linux/wasm
2
18
77
@Mattias_G
Mattias Gustavsson πŸ’–
4 years
Sketch of a made up floppy disc format. I imagine these being somewhere between a 3.5" floppy and a Zip disc. Maybe 32MB capacity or so. Thick like a Zip disc, slightly bigger than a 3.5" floppy. I like the idea of a square label - especially for game discs, to fit more artwork.
Tweet media one
Tweet media two
5
7
76
@Mattias_G
Mattias Gustavsson πŸ’–
1 year
During the months I was away from twitter, one thing I did which I haven’t shared yet, is get into book binding. What I’ve been doing is printing old swedish rpg books, making new hardcover versions of them, all by hand, to replace my old stapled booklets which are falling apart
Tweet media one
6
7
77
@Mattias_G
Mattias Gustavsson πŸ’–
5 years
First up is app.h by me: I use this one all the time: it simply creates a window and lets you display a bitmap, play sound, read input. Like a trimmed down SDL, only 35 or so functions. Also sets up an OpenGL context for when sw rendering is not enough.
3
5
74
@Mattias_G
Mattias Gustavsson πŸ’–
2 years
This is really awesome! It means this very simple code, written in C and originally only made for producing native executables, can now run in a browser! All the dos-like sample can be run here: Try it out! It even works on your phone πŸ™‚
Tweet media one
Tweet media two
Tweet media three
2
11
73
@Mattias_G
Mattias Gustavsson πŸ’–
2 years
Last year, I made a mini-engine called β€œdos-like”, which helps you make games/apps in a DOS style - both regarding the end result and how you write the code - but running on modern platforms. I wanted the code to feel as simple as in the old days πŸ™‚
Tweet media one
Tweet media two
3
9
71
@Mattias_G
Mattias Gustavsson πŸ’–
2 months
I also made it so you can build it for WebAssembly, so you can run it in a browser. Try it here: Full instructions for building for WASM is in the README in the repo (it is just another one-liner, and a build tool you just download and unzip).
Tweet media one
2
7
71
@Mattias_G
Mattias Gustavsson πŸ’–
2 years
For me, this simplification process led me to move away from C++ and object oriented programming, in favor of C and procedural programming. It also led me to exclusively use stb-style single-file header-only libraries, like stb_image (which is not the same as C++ template libs)
@Mattias_G
Mattias Gustavsson πŸ’–
5 years
I love stb-style single header libs - it is the most important idea in the C/C++ space in modern time. I am using some by other people, and have many which I’m making myself (in various stages of completion). This is a thread where I will list the more useful ones.
17
134
617
1
6
70
@Mattias_G
Mattias Gustavsson πŸ’–
3 months
So, I wanna do a 🧡about the *code* for recently released Yarnspin engine. Specifically, I want to look at the code from a more zoomed out point of view - what libs does it use, and for what, and how much code is there? The main idea is to tell you about libs you could use too
Tweet media one
3
3
69
@Mattias_G
Mattias Gustavsson πŸ’–
2 years
As a more comprehensive test of the β€œdos-like” engine, I made a port of the original DOOM to run on it. And you can indeed run it in the browser: If I may say so myself, this is a pretty damn good port. Smooth, responsive, and has sound+music too
Tweet media one
1
8
65
@Mattias_G
Mattias Gustavsson πŸ’–
2 years
At ggj2020 I made a small shoot-em-up game in my old C++ game engine. Now I’ve taken a couple of days to redo the code in C, using only stb-style single file libs. I’m still very happy with this game! Try it in your browser here:
Tweet media one
Tweet media two
Tweet media three
6
15
63
@Mattias_G
Mattias Gustavsson πŸ’–
3 months
Now, I could make a helper macro or something like that, do something to "hide complexity" or "reduce repitition" in the code. But I find that over time, having these couple of lines everywhere I need an array is actually fine. And, they are self sustained.
2
2
62
@Mattias_G
Mattias Gustavsson πŸ’–
3 months
Five years ago, I wrote ”I β™‘ Music”, my own mp3 music player/organizer app, and I’ve been using it every day since. It’s fast, responsive, efficient, not cluttered or bloated. Well worth the investment of time I’m now making ”I β™‘ Comics”, a similar thing but for digital comics
Tweet media one
3
9
63
@Mattias_G
Mattias Gustavsson πŸ’–
3 months
@Mattias_G
Mattias Gustavsson πŸ’–
2 years
I’m going to do a 🧡 about making retro-style games in C/C++, and also about getting them to run in a browser.
Tweet media one
Tweet media two
Tweet media three
Tweet media four
16
117
608
2
0
60
@Mattias_G
Mattias Gustavsson πŸ’–
2 years
All the samples for my dos-like engine can be run in the browser (dos-like can build for web assembly). Try them out here:
Tweet media one
2
14
61
@Mattias_G
Mattias Gustavsson πŸ’–
3 years
One thing I’ve wanted to do for some time, is take the original source code release for DOOM, the one that only had linux support, and make my own port to windows, utilizing my single header libs and putting my crt filter on top of it. I started it yesterday.
5
7
59
@Mattias_G
Mattias Gustavsson πŸ’–
3 years
As I am getting very close to releasing it now (like, a matter of days only), I thought I'd talk a bit about the MP3 player application I am making. I call it "I β™‘ Music"
Tweet media one
2
16
57
@Mattias_G
Mattias Gustavsson πŸ’–
3 months
And that was how I implement dynamic arrays :) sometimes it is good to revisit fundamentals.
2
0
60
@Mattias_G
Mattias Gustavsson πŸ’–
2 years
So, for a good few years now, I’ve been working on various game projects and jam entries, all in a retro style, using C/C++. All the while, I’ve been looking to simplify things - fewer dependencies, simpler code, simpler build process, etc
Tweet media one
Tweet media two
Tweet media three
Tweet media four
2
4
59
@Mattias_G
Mattias Gustavsson πŸ’–
2 years
This really was such a game changer for me. A single 60mb zip you can just download and unpack, and you have a full build system for making C programs run in the browser. Nothing to install, no setup, no config, no additional dependencies. How cool is that? 😎
2
4
59
@Mattias_G
Mattias Gustavsson πŸ’–
3 years
If you liked the crt filter in my Crt View, and want to see it in action, you can try this customized DOOM version, which has my filter and the original shareware WAD - no complicated setup, just download, run and enjoy!
Tweet media one
Tweet media two
Tweet media three
Tweet media four
3
18
57
@Mattias_G
Mattias Gustavsson πŸ’–
3 years
I find it fascinating that the old Sierra adventure games (sci) were programmed in a custom object-oriented LISP, which compiled to byte code and was run on a virtual machine. In the 80s 😲 (source: )
Tweet media one
4
11
57
@Mattias_G
Mattias Gustavsson πŸ’–
2 years
I got to thinking about another old project that I started, but which got shelved. This one I’m definitely picking up again at some point…
Tweet media one
8
5
55
@Mattias_G
Mattias Gustavsson πŸ’–
2 years
Here is a 🧡 about a game I started working on 8 years ago, called Afterworld. I’ve gotten back to it many times, but not yet finished it. Not because it’s big - it’s a small game - but because I work slow, in short bursts, and sometimes life gets in the way πŸ™‚ #AfterworldRPG
Tweet media one
4
6
56
@Mattias_G
Mattias Gustavsson πŸ’–
3 months
Ok, so to add an item, resizing the array when necessary. So yeah, there's a bit of repetition if you are adding things items in multiple code locations. But I find that it is something you can quickly become used to
Tweet media one
4
0
55
@Mattias_G
Mattias Gustavsson πŸ’–
2 months
One cool thing about the web build, is that if you just open it in your browser and then just save the html file, you get a single, fully self-contained html file that you can run locally. And it is about the same size as the doom.exe+doom1.wad. Cool!
2
3
54
@Mattias_G
Mattias Gustavsson πŸ’–
2 years
Using C and only single-file header-only libs, I get impressively fast compile times (especially using Tiny C Compile, tcc), pretty much instant. It also eliminates the need for any build systems. Building is just a matter of invoking the compiler for the single C file
Tweet media one
1
2
54
@Mattias_G
Mattias Gustavsson πŸ’–
2 years
Did you know that you can run all the samples for my dos-like framework in the browser - and even on your phone?
Tweet media one
Tweet media two
Tweet media three
Tweet media four
2
12
53
@Mattias_G
Mattias Gustavsson πŸ’–
3 years
If you liked the crt filter in my Crt View, and want to see it in action, you can try this customized Steem Atari ST emulator, which has my filter and a bunch of game demos bundled with it - no complicated setup, just download, run and enjoy!
Tweet media one
Tweet media two
Tweet media three
Tweet media four
6
4
53
@Mattias_G
Mattias Gustavsson πŸ’–
2 years
If you want to try the filter on your own artwork - or maybe on screenshots of you favourite retro games - there’s a stand-alone viewer here: Feel free to share images you like πŸ™‚
1
8
53
@Mattias_G
Mattias Gustavsson πŸ’–
2 years
I thought I’d share this thing I did back when I was into C++ (these days I stick with C), in case it turns out useful for others. I often found it very useful to be able to determine the type of something without having RTTI enabled, as that can add quite a bit of bloat
Tweet media one
4
4
52
@Mattias_G
Mattias Gustavsson πŸ’–
5 years
The best coding style/paradigm is the one you enjoy and which lets you accomplish your goals. So: it is different for every person. Do your thing πŸ’–
5
11
51
@Mattias_G
Mattias Gustavsson πŸ’–
2 years
Just the other week, I ported the original source code release of Doom to my ”dos-like” framework, and made a build that runs in the browser This game is almost three decades old, and yet the code is amazingly easy to work with and port to new platforms
@romero
John Romero 🀘🏽
2 years
Happy 28th birthday DOOM. Dec 10, 1993. I left a piece of my soul in DOOM, and it's a great place for it to be (and it matches my head in DOOM II, I suppose). We poured everything we had into it, and I can't begin to express how grateful I am to the DOOM community for everything.
Tweet media one
251
3K
14K
1
11
50
@Mattias_G
Mattias Gustavsson πŸ’–
2 months
Sometimes, you just have to go retro for a bit πŸ™‚ Playing around with my Atari ST setup, got myself an OSSC, works a treat
Tweet media one
4
3
49
@Mattias_G
Mattias Gustavsson πŸ’–
3 years
Here it is, my free MP3 player for Windows: I β™‘ Music. I hope you'll enjoy it! If you try it, let me know what you think πŸ™‚
3
12
49
@Mattias_G
Mattias Gustavsson πŸ’–
3 years
A more "real" test case 😎 (quick port of )
Tweet media one
4
7
50
@Mattias_G
Mattias Gustavsson πŸ’–
2 years
To demo the dos-like engine I made a bunch of example programs, most of them ports of various tutorial projects found around the web, which also means there’s good write-ups on how they work
Tweet media one
Tweet media two
Tweet media three
Tweet media four
1
3
51
@Mattias_G
Mattias Gustavsson πŸ’–
11 months
What are your favorite books on C programming (not C++)?
32
2
51
@Mattias_G
Mattias Gustavsson πŸ’–
11 months
I enjoy working on my little projects, and that's the main reason why I make them. And I usually like to share what I do as well. But sometimes, when it comes to sharing, it feels like, "what's the point?". Been feeling like that a lot lately...
22
1
49
@Mattias_G
Mattias Gustavsson πŸ’–
3 months
@supahvee1234 I only use C++ if I get paid to :) If I want to enjoy myself, be productive, and get things done, I stick to C. Just a personal preference though, if you find yourself more productive in C++, or if you enjoy it more, then go for it, you do you! :)
3
0
50
@Mattias_G
Mattias Gustavsson πŸ’–
3 months
Note that I'm not bothering to check for failed allocations. That's an effect of the platforms I run on and the kind of projects I make. It's just never a thing for me that realloc fails, not unless I am doing something very unusual and, well, in that case, I can opt to check it
1
0
49
@Mattias_G
Mattias Gustavsson πŸ’–
2 months
I find fantasy consoles to be very very cool! Some day I will make one myself :) What is your favorite fantasy console, and what do you like about it?
18
0
47
@Mattias_G
Mattias Gustavsson πŸ’–
4 years
I really hate this thing in programming culture, where people forcefully champion their preferences as the One True Way, the Correct approach. Sure, share your experience and what works for you and what didn’t. But why you have to be an asshole about it?
7
3
46
@Mattias_G
Mattias Gustavsson πŸ’–
3 months
Well, how about that, Yarnspin 2.0 was just released! You'd do well to check it out :) Yarnspin is a great little engine for telling stories in a "choose-your-own-adventure" style, and it is made to be easy to use for non-programmers too.
1
29
48
@Mattias_G
Mattias Gustavsson πŸ’–
2 years
For my website I use my own static website generator written in C. I’m thinking of making it open source. I need suggestions for what to name it. I’d rather not call it Webgen McBlogface, but I will if I have to 😝
14
3
47
@Mattias_G
Mattias Gustavsson πŸ’–
2 years
I want to do a 🧡 about the code for this game I rewrote recently. It was originally done as a jam game over a weekend, using a C++ game engine. The rewritten version is in C using only stb-style single header libs, and no generic engine.
@Mattias_G
Mattias Gustavsson πŸ’–
2 years
At ggj2020 I made a small shoot-em-up game in my old C++ game engine. Now I’ve taken a couple of days to redo the code in C, using only stb-style single file libs. I’m still very happy with this game! Try it in your browser here:
Tweet media one
Tweet media two
Tweet media three
6
15
63
2
6
47
@Mattias_G
Mattias Gustavsson πŸ’–
3 months
For me, this simplification process led me to move away from C++ and object oriented programming, in favor of C and procedural programming.
2
3
46
@Mattias_G
Mattias Gustavsson πŸ’–
12 days
My page is What’s yours? If you make things, I want to follow you
32
11
49
@Mattias_G
Mattias Gustavsson πŸ’–
3 years
I’ve also experimented with generating transition tiles between tile types, by blending the maps before generating the tile. I think it works better than I had expected it to do. The second example use different blur level for the masks blending the heightmap vs the other maps
Tweet media one
Tweet media two
4
6
45