OK, I gotta hand it to CoPilot.
-
This is the image I started from. Not exactly 1:1, but I think it works pretty well for an afternoon/evening and given the limitations of the C64. I'll try to tackle animating overlay sprites at some point, so I can also import that fine black line as a second high res sprite. That's a lot more complicated, though, as it needs to accommodate different resolutions and such. (From here: https://arks.itch.io/dino-characters)
Jebus. Packaging Qt apps is terrible. And, a Qt Quick app is huge. I mean, my binary is under 200k, but by the time the Qt runtime libs are included the install footprint is going to be 10+MB. Obviously still much smaller than the hundreds of MB of an Electron package. But, this still isn't sitting right with me...I set out to learn how to make compact, portable, applications and this aint it.
Qt Quick is nice to develop for, but it's so unpleasant to package and deploy and quite big.
-
Jebus. Packaging Qt apps is terrible. And, a Qt Quick app is huge. I mean, my binary is under 200k, but by the time the Qt runtime libs are included the install footprint is going to be 10+MB. Obviously still much smaller than the hundreds of MB of an Electron package. But, this still isn't sitting right with me...I set out to learn how to make compact, portable, applications and this aint it.
Qt Quick is nice to develop for, but it's so unpleasant to package and deploy and quite big.
So, I was planning to focus on packaging, documentation, and getting this thing published this weekend, but, I think I'm actually going to use the time to rebuild the UI in something else. Slint has a kinda cranky license, but seems to have a tiny runtime and looks great. Dear Imgui is not really accessible (not super relevant for a drawing program maybe, but if I'm learning a new thing, I want to be able to make accessible software with it, it's the minimal bar for a GUI toolkit, IMHO).
-
So, I was planning to focus on packaging, documentation, and getting this thing published this weekend, but, I think I'm actually going to use the time to rebuild the UI in something else. Slint has a kinda cranky license, but seems to have a tiny runtime and looks great. Dear Imgui is not really accessible (not super relevant for a drawing program maybe, but if I'm learning a new thing, I want to be able to make accessible software with it, it's the minimal bar for a GUI toolkit, IMHO).
I stumbled on Webview (https://github.com/webview/webview) as an option, which uses web technology for the UI in a way I hadn't even considered, and results in a tiny package and tiny executable with few extra dependencies. Web tech is very accessible. Plenty fast, runs everywhere (Linux, Windows, Mac OS, mobile, BSDs, all seemingly have Webview support out of the box or via a single package install) with minor tweaks. And, web browsers don't break backward compatibility.
Still considering my options. -
I stumbled on Webview (https://github.com/webview/webview) as an option, which uses web technology for the UI in a way I hadn't even considered, and results in a tiny package and tiny executable with few extra dependencies. Web tech is very accessible. Plenty fast, runs everywhere (Linux, Windows, Mac OS, mobile, BSDs, all seemingly have Webview support out of the box or via a single package install) with minor tweaks. And, web browsers don't break backward compatibility.
Still considering my options.Decided on Slint, after a think on the subject. I've started rewriting, and I guess it won't be terribly painful, but it's going to be at least another week before I can call the thing done.
Seems like a lot just to avoid packaging Qt, but if you think so, you've probably never tried to package Qt (where all deps are bundled, so the user doesn't need to install anything other than the package).
-
Decided on Slint, after a think on the subject. I've started rewriting, and I guess it won't be terribly painful, but it's going to be at least another week before I can call the thing done.
Seems like a lot just to avoid packaging Qt, but if you think so, you've probably never tried to package Qt (where all deps are bundled, so the user doesn't need to install anything other than the package).
Slint doesn't have a file dialog? What have I gotten myself into? https://github.com/slint-ui/slint/discussions/1959
-
Slint doesn't have a file dialog? What have I gotten myself into? https://github.com/slint-ui/slint/discussions/1959
@swelljoe You rewriting in C++, Rust, or something else?
-
@swelljoe You rewriting in C++, Rust, or something else?
@matt I'm keeping the C++ back end, which was about half the code (for the sprite objects, various functions for dealing with loading and saving, etc.). At least for now. I may end up rewriting to Rust in the end. The reason I chose C++ was because I thought that got me a better GUI development experience with Qt. But, now that I know I hate Qt (not really, I just don't like the deployment and packaging and runtime story), I don't have any reason to use C++ and I don't really like C++, either.
-
Slint doesn't have a file dialog? What have I gotten myself into? https://github.com/slint-ui/slint/discussions/1959
We're so back. (Animation works again, and most features from the Qt version are back.)
I cannot, for the life of me, figure out how Slint decides where to put things. No matter what I try, there's something hanging out of its container or a color that's nearly invisible or behaves weird or boxes that are all different sizes. And, the standard components were designed with mobile in mind...they don't have most of the regular desktop stuff I would expect, and what they do have behaves weird.
-
We're so back. (Animation works again, and most features from the Qt version are back.)
I cannot, for the life of me, figure out how Slint decides where to put things. No matter what I try, there's something hanging out of its container or a color that's nearly invisible or behaves weird or boxes that are all different sizes. And, the standard components were designed with mobile in mind...they don't have most of the regular desktop stuff I would expect, and what they do have behaves weird.
Not only did I fix PNG importing, I made a whole new import window that allows selecting which images from a sprite sheet to import. I was pre-processing before by slicing them into rows of just the images I wanted. And, that was fine, not terribly painful to use...but, this is better. Still a bit quirky, not sure why some of the ducks on the import grid only have the feet, for example.
I'll try to sort out the foot fetish bug before calling it done...
-
Not only did I fix PNG importing, I made a whole new import window that allows selecting which images from a sprite sheet to import. I was pre-processing before by slicing them into rows of just the images I wanted. And, that was fine, not terribly painful to use...but, this is better. Still a bit quirky, not sure why some of the ducks on the import grid only have the feet, for example.
I'll try to sort out the foot fetish bug before calling it done...
95% of the time was spent finding thread/state bugs. I should have written this thing in Rust. (Admittedly, a skill issue. I'm definitely not good at C++.)
-
95% of the time was spent finding thread/state bugs. I should have written this thing in Rust. (Admittedly, a skill issue. I'm definitely not good at C++.)
Overlay feature is back, and can also be previewed in the animation player. I'm running out of things to fix, I think I'm going to have to release it at some point.
Other fixes: Transparency in the editor canvas has been fixed so it's a checkerboard again (as it was in the Qt version), changed the UI elements that didn't match to custom versions (they didn't match because Slint doesn't allow directly styling Checkbox and select).
-
Overlay feature is back, and can also be previewed in the animation player. I'm running out of things to fix, I think I'm going to have to release it at some point.
Other fixes: Transparency in the editor canvas has been fixed so it's a checkerboard again (as it was in the Qt version), changed the UI elements that didn't match to custom versions (they didn't match because Slint doesn't allow directly styling Checkbox and select).
This works better than I could have ever hoped. It can now import quite complicated images, optimally split colors across two sprites, detect borders and fine details and try to put them in the high res overlay sprite. I was expecting to need to do a lot more cleanup on imported assets, but it sometimes works optimally (or at least as good as I could do by hand) right off with no tweaks.