Progress on the QtQuick LCARS Todo App

I further refined the UI and added some responsiveness, so it’s usable now on a phone. I’m missing some UI debugging/inspection features that are normal in other layout-solutions. Finding out where a gap or width is coming from is a bit clunky.

Continue reading →

LCARS Todo App Experiment

Progress of my LCARS Todo-App. Played around with animations, but that’s something for later. First I’d like to have a “clean” look, with a color-scheme I’m happy with. Went with Lower-Decks-LCARS-Colors for this one. Also got the iOS-Simulator-Build to run today. At first I got cryptic errors, but I just had to install the whole iOS-dev-package with XCode. I think I’ll keep this one just for Desktop. I could add some interface-sounds from Star Trek.

Continue reading →

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

Yoda Stories Screenshot

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.

The whole process works now! Opening file, editing and saving to JPEG.

I managed to get the correct resulting image-crop from OpenCV. I passed the wrong Vector2 to CV as the destination-size before, and got the original images ratio for some reason. Opening an image via Drag&Drop also works. The only thing left is to add saving the file.

Added Drag & Drop and Raygui Panels and Styles. Next will probably be to load and save images. Currently the image is hardcoded. Planning to add some more ornament. A nice-to-have would be to crop the destination-image to the final crop without the “outside”.

It kinda works now. At least the straightening part. I’m feeding the images into OpenCV, and converting them back to a Raylib-compatible format. The whole load/save-cycle is still missing. Thinking about doing a crop-selection on the resulting image.

Switched to trying to use OpenCVs Transformation Matrix with Raylib. I’m getting some pixels, but nothing really working yet. Feels adventurous.

Currently playing around with C++ and Raylib. Trying to re-create Skewbacca, the tool I created to un-skew laptop-images. I got pretty much everything down except getting the correct transformation matrix. I got a little help from Claude, but the the calculation didn’t do quite the right thing, so now attempting to come up with it myself. I really don’t want to introduce OpenCV or ImageMagick.

Deno and Skia-Canvas

I have used Deno for Advent of Code, and I like the OOTB Typescript-Support. It’s also pretty simple to add Skia-Canvas for graphical stuff without having to use Raylib (which is great, but if you don’t need Input or Sound, and want to use canvas-API, may be too much). $ deno add npm:skia-canvas Add "nodeModulesDir": "auto" to deno.json $ deno install --allow-scripts $ deno run --allow-all main.ts This example can be used as a starting-point:

Continue reading →

The current thingie I’m working on is a game inspired by Golden Idol. The main loop is sorting chat-threads. Discover a story by sorting chats. Making a little prototype in HTML. The most annoying part is coming up with a story. Generated some moods for inspiration.

Changed the approach to only get the possible solutions for each next step, which sped up the board-solving from infinity to an instant. The “hardest Sudoku” is now being solved instantly. The only thing that doesn’t really work quickly or at all, is to fill a completely empty board. Not sure if it should, anyways. Will clean up the modules next.

The brute-force-method caused a major headache but it works! I can solve all Sudokus in theory, but for more than a couple 0s, it takes longer than a few seconds. I’m generating a list of 0s and their possible numbers, then recursively trying out all possible combinations. So far without “cleaning up” the list as the process happens, so it’s highly ineffective. My next goal would be to manage solving any board in an “awaitable” time.

So currently I’m checking the Sudoku board for 0s with only one possible solution. This works for most easy boards, but as soon as it gets medium-hard, it’s not possible to finish the board only by analyzing rows, cols and quads. I don’t know if there are any other algos for solving this in a smarter way (there 100% are), but I didn’t want to just look up a solution before I didn’t do at least a brute force method first.

This sounds heavy but maybe I can reduce the attempts in some way.