-
In QtQuick whenever you change data within a QAbstractListModel, you have to notify Qt in some way. It’s not as straightforwardly reactive as in modern web-frameworks. When adding, moving or removing items from the list, the operation needs to be enclosed by beginInsertRows/beginRemoveRows/etc and endInsertRows/endRemoveRows/etc.
Changing data inside the list-items needs to be followed by an emit of dataChanged, which takes the item-position in the list as argument.
-
Qt is fun! I spent some later nights now getting my ToDo-List to work. I’m also not very versed in C++ so it’s two new things. Thankfully, Qt has fantastic documentation!
It had to be LCARS colors of course.
You can connect a C++ Class to a QML-View by making it a Q_OBJECT (a macro that gets called in the header-file), and in order to work with a list, it needs to be an AbstractListModel, with some required methods that help the ListView getting the right data for rendering, and knowing when the data has changed.
It’s a great way to learn to first do a course-project (Youtube, Article etc.), and then do a small similar thing by yourself. Use the course-code as reference when you’re stuck. Helps to persist the material so much better.
-
Still haven’t gotten around to finish that e-ink-thingie from the last post.
Played around with Linux Ubuntu in the last few weeks. I’m considering getting the son an old machine for his 10th birthday. It would be pretty locked down, no online-connectivity in the beginning. And with Linux on it, because why not.
I went with VMWare first, and while it ran Ubuntu ARM fine, there were lots of small issues I needed to fix (sound was buggy etc.). Also 3D in general just didn’t work very well. Then I tried it in Parallels, and the difference is huge! 3D is still not great but at least WebGL works in browsers, any my favorite ThreeJS-Example Littlest Tokio is running smoothly, compared to VMWare.
Also learning a bit QT, which I haven’t checked out so far. QtQuick seems to be the nice and modern way to go, while QtWidgets is the older, more mature, more accessible, but harder and more complex variant. If I don’t get frustrated along the way, I might try to do a Desktop-version of Corridors, which is a clone of Dungeons&Diagrams.
IDK why but I love simple games that look like desktop-apps. Games like Yoda-Stories, Solitaire, Minesweeper, Julietta-Pinball-Factory…
-
I regularly (every year or so) checked out e-ink-displays for the RPi since I had my first one (2014ish). Lately I found that the Pimoroni Inky Impression is a good candidate. It works as a “hat”, so you just plug it onto the Pi and off you go. Also finally a use-case for the Pi. I have two, I used them for some gaming stuff, but ultimately they ended up in the drawer. I got the Pi 4 B, and the older 2.
I ordered which now seems to have been the last one from the UK, which arrived quickly and was about 70€.
The project for the display is showing todays entries from our family-calendar. For that I already made a program in Golang, which grabs the dates from Google and generates an Image that will be sent out to the E-Ink-Display.
We use emojis for categorization, which don’t seem to render with the fogleman/gg library, but for a first version this is sufficient. I really don’t want to do this via headless-browser-screenshot, although it would be easier and more flexible, but not everything has to be web.
I wanted to get started with the Pi today, but I didn’t have a Micro-SD for it, so it will have to wait until next weekend.
-
I still have a game-scenario-idea in my head, but haven’t been able to think up a game-design for it that I like: A space-port-manager where the player has to manage landing-pads, and certain resources to ensure happy visitors, and making sure that enemy fractions don’t land next to each other.
I did a text-based version where you have 5 pads and make rent when a ship lands, and you have to make sure the fractions police/corporate/cartel don’t land next to each other. The alliances between the fractions may change, or even be unknown at first.
The second one was like a puzzle-game, where the player needs to place Tetris-shaped ships, and resources on a grid.
Both of them got a working prototype, but ultimately didn’t seem that fun to play.
Another approach I tried was a Solitaire-Like card-game, where you have a 5x5 grid, and approaching ships happen via the card deck, or dice throw, you have resource cards etc.
I still think there’s a game in there, preferably a more casual one that I can manage to do myself.
-
One of my current WIPs is a GTA1 clone/experiment in Godot 4. Using some Kenney and HumbleBundle Low-Poly Assets, I implemented some of the simpler things like entering/exiting cars, nearing NPCs with a speech-display and NPCs following the player within a restricted area. As long as it’s fun I may introduce some other mechanics, like a music-track playing on entering a car, some get-the-car-mission, or a mini-map.
-
This is still my most favorite CSS-hack of all time, from jQuery-times.
subscribe via RSS