yes, it was created after crtview. I believe it includes the shaders from crtview as well, but I haven’t tried it myself
Mattias Gustavsson
Creator of
Recent community posts
I just played through the demo, and I just wanted to say I was really impressed. The art is obviously excellent, and I absolutely love the vibe, the whole retro-cyberpunk feel, the noir style dialogs. The story so far is engaging and makes me want more of it. The whole things is just very much my cup of tea in every way, I am very much looking forward to the full game :)
No, there is no TTF font support in dos-like. There is support for a custom bitmap font format, and you can call `installuserfont` to load one, which returns a font handle that you can pass to settextstyle.
To create one of these custom bitmap fonts, you use these functions in pixelfont.h https://github.com/mattiasgustavsson/dos-like/blob/2b9c90641f81e19f692866601effdaa8ff79b435/source/libs/pixelfont.h#L81-L89
You would loop through all the glyphs of your font, and pass them one by one to the font builder functions, before calling `pixelfont_builder_font` to get some binary data you can save for loading with `installuserfont`.
It is possible to use a TTF lib like stb_truetype.h to render TTF glyphs and pass them to pixelfont builder, an example (and a good starting point if you want to do it) is this code from a different project https://github.com/mattiasgustavsson/yarnspin/blob/79fd13cab1c5d0df2c2fae98d137edfd553223b5/source/gfxconv.h#L264
Yeah, the way it works, is that the real main func is in dos.h, and it is definitely needed. But it would be possible to move its code (it just does a call to app_run) to your own if needed. However, in the user code (as in the samples) there is *another* main, but this one is actually called dosmain - there’s just a define in dos.h that defines main to be an alias for dosmain. Defining NO_MAIN_DEF disables this, and your user main has to be named dosmain instead of main
actually, yes 🙂 https://mattiasgustavsson.itch.io/dosbox-crt
Thank you, that is great feedback, and I appreciate you taking the time!
I guess there is a bit of a balance in making the tutorial game, like how much detail to go into, what to leave out. But reading your thoughts on it makes me want to go over it and maybe add a few more things to anwer those questions.
Ah, I think I understand what was happening, and I think I can repro it now. It seems like a location section can not have a "chr/act" pair before the txt/img declarations. That is something I want to fix for a later version, thanks for finding that!
I am glad you like the engine so far. And hey, no donations needed (but thank you for offering), I do not in fact accept any :) The best way to show your support for Yarnspin is to use it and enjoy it, that is all I want it to be :)
Hey, I've been a little slow replying, but it seems like you have got it working now, yes?
I must admit that I am a little surprised that you had to move sections around - that should definitely not be necessary, you should be able to declare sections in any order. I will try myself if I can reproduce it, because that sounds like a bug!
Is there anything that is not working at the moment? Don't hesitate to ask I will do my best to try and help (maybe even a bit faster next time :P)
Ah, yeah, I am very happy that you got error messages working, it must have been so difficult to try and work out what was going wrong. I've tried to put in a decent amount of error checking, but it is also something I want to improve going forward.
I think if there's one good thing that comes of your struggles to get it to work, it is that I've realized I should be a lot clear about this in the documentation, and I will really improve this section, including screenshot of what is expected to show on screen and how to deal with errors!
Making a GUI or editor is something I've been thinking about (likely as a standalone Yarnspin Studio), but to be honest, it is not something I have in my plans for anywhere soon. I have a lot of ideas for features to add to Yarnspin going forward, and having to maintain a visual tool for it will just make those much harder and more time-consuming, and I don't want to be slowed down like that. But I do think it would be a fun thing to make and a useful thing to have, so I could see myself tackling it some day.
But hey, since this is free open source software, we can always hope that someone else decides they can't wait and starts making one - not very likely maybe, but we can hope :)
Yes, this is indeed a bug! Or rather, a regression, as it was working correctly at some point. The player text should really be cleared before options are displayed. I will fix that, but in the meantime, I suggest putting an extra "carol:" line, with nothing after ":" which will clear the player text, but also (annoyingly) require an extra click. But yes, will fix!
I don't know why you @VP does not not see the carol portrait though, that works for me... perhaps if you try deleting the .cache folder? this would cause all intermediate files to be regenerated. it shouldn't be necessary, but maybe there's a glitch happening when changing back and forth with an image with the same name and different extensions, so worth a shot
hmm, ok, when I try to run that script, I do get an error, saying that it is missing the version declaration. It is a bit unexpected that you don’t get that… what platform are you on?
Anyway, if i add
version: 1.0
to the start of the file, it works (after fixing filenames of two images that are otherwise missing)
I just released a major update to this, and again I would be very interested in feedback on pretty much everything about it - in particular your first impressions of the project and how it is presented: https://mattiasgustavsson.itch.io/yarnspin
I am very happy that you enjoy the lib :)
The font format is a custom one, and it is handled by pixelfont.h in the libs folder. The lib has a set of "builder" functions here, which are used to create a font in the format. Basically you call builder_create, then call builder_glyph for each character you want to add, and when you are done you call builder_font which gives you a pointer to a pixelfont structure. The first field in the structure is its size in bytes, and you can just save it as a binary blob, that can then be used in doslike by calling installuserfont. The same lib and builder is used in this other project, here, to build a pixelfont from ttf data using stb_truetype, but it is the same principle regardless what your input data is. What you probably want to do is make a standalone command line program that just includes pixelfont.h and makes your conversions.
let me know if it doesn't make sense, and feel free to ask followup questions!
and btw, I will clean up the readchar a bit at some point based on the issue logged in github, getting the full range should be easier, and besides, I probably want to look into unicode support as well, using UTF8.
I am not familiar with Heroic, but maybe someone else knows. This version of dosbox is for windows only, and I don't know if it is possible to run it with Wine or similar.
When I buy DOS games from GOG, to play on windows, it is usually not a problem to locate the bundled dosbox.exe and replace it with my modified one (just rename it)