Skip to main content

rubenwardy's blog

Hi, I'm rubenwardy! Welcome to my blog, where I write about my projects and various tech-related topics.

My favourite posts

Here are some of my favourite posts:

Posts

1-20 of 69 posts
The cover of "Detox and React Native: UI testing Android permission flows"

Detox and React Native: UI testing Android permission flows

I’m currently learning React Native and Expo as an alternative to native app development. To do this, I’ve been working on an app so that I can get hands-on experience with React Native app development. This includes end-to-end UI testing, using Detox.

I was surprised that Detox doesn’t have an API to interact with permissions. The device.launchApp function does have a permissions field, but this only works on iOS and runs on app start-up - it doesn’t allow you to test the actual user flow.

In this article, I will explain how you can do end-to-end testing with Android permissions, including simulating user interaction with the Android permission request modal.

Read more of "Detox and React Native: UI testing Android permission flows"

Better word counts and reading time in Eleventy (11ty)

I recently switched to using Eleventy to generate my blog. As part of this process, I needed to implement word counts for each of my posts. I made my own plugin for this as I was unable to find an existing one that met my requirements - they either used regex to parse HTML or included non-text like scripts and code snippets in the count.

Read more of "Better word counts and reading time in Eleventy (11ty)"

The cover of "I have joined the IndieWeb"

I have joined the IndieWeb

The collapse of Twitter last year got me thinking about closed platforms and reducing the hold that privately owned platforms have over the Internet.

I’ve been blogging for nine years now on my personal website. I like owning my own domain as it allows me to retain control and stay independent of particular services. Private platforms have a tendency to be bought out and/or ruined by commercial interests, especially now with tech growth slowing down and investors getting uneasy.

Read more of "I have joined the IndieWeb"

The cover of "Ten years of Capture The Flag"

Ten years of Capture The Flag

Ten years ago today, I uploaded the first version of Capture The Flag. Capture The Flag is a multiplayer game where two teams of players battle to claim the other team’s flag whilst defending their own. Capture The Flag is played in a destructible voxel environment, allowing players to build defences and place traps.

Capture The Flag started life as a persistent kingdoms game but quickly pivoted to a match-based team game. It was developed iteratively, taking into account player feedback. I hosted a server for the game for many years and a community formed around it. In 2021, I handed over the reins to CTF to very capable hands; it remains Minetest’s most popular server to this day.

This article covers the history of CTF, the lessons I learned, and the changes I made along the way.

Read more of "Ten years of Capture The Flag"

The cover of "Make games not engines: why I'll be using Godot engine"

Make games not engines: why I'll be using Godot engine

One of the reasons I learned how to program was to make games. Games are a unique form of creative medium, combining art, interactive storytelling, and vibrant worlds. But as a software engineer, it’s easy to lose sight of my goals and get trapped by the technical details. It’s common for software engineers in game dev to roll their own engine, which I believe reduces productivity and is ultimately a distraction to making a game.

Note that I’m not just referring to making reusable or generic game engines; for this article, I consider using low-level technology like OpenGL, SFML, or SDL to make games to include the act of rolling your own game engine, even if the focus is specific. It’s more manageable, but you still end up reinventing the wheel and having to solve many of the same problems.

There are plenty of other articles about whether or not to make your own game engine. This article is personal to me; it’s an exploration of my journey in game dev, a discussion of what motivates me, and a promise for the future.

Read more of "Make games not engines: why I'll be using Godot engine"

The cover of "Conquer: a deep-dive into my Minetest mod jam entry"

Conquer: a deep-dive into my Minetest mod jam entry

In 2020, the Minetest Discord community ran a mod-making competition with “combat” as the theme. Participants had one week to create a mod with all the code written within the time, but pre-existing art was allowed. I made a Real-Time Strategy (RTS) minigame called Conquer; it received first place.

In this article, I will discuss some of the interesting challenges that Conquer needed to solve. I believe that Conquer is a great example to learn from as it demonstrates best practices for Minetest modding; it is well-structured and unit-tested.

Read more of "Conquer: a deep-dive into my Minetest mod jam entry"

The cover of "Thoughts on native Android development"

Thoughts on native Android development

I love making apps. I like making stuff and it’s even better when I can interact with the stuff I make. App development feels especially real as I can hold and touch what I made. So why don’t I have many Android hobby projects? This article is a reflection on the projects I’ve worked on, the problems I have, and what I want to try in the future.

Read more of "Thoughts on native Android development"

The cover of "Bing (and DuckDuckGo) shadow banned my website"

Bing (and DuckDuckGo) shadow banned my website

Bing has now unbanned my blog. My site is still penalised/low in the results, but at least it's appearing now. See the bottom of this article for their response.

My domain was shadow banned by Bing and DuckDuckGo last year, and I don’t know why. Since then, my root domain (rubenwardy.com) has been unbanned but my blog remains banned. The event also negatively impacted the search placement of my root domain; another site that reuploaded some of my content is appearing as the first result when searching for it.

Read more of "Bing (and DuckDuckGo) shadow banned my website"

The cover of "3D-printed IoT lock box using ESP32"

3D-printed IoT lock box using ESP32

My eventual goal with electronics is to create autonomous robots and drones; I’d like to make a quadcopter with my own flight controller that can take off, land, and follow a target. This will be quite an ambitious project, and I’m nowhere near capable enough for that yet.

Previously, I created a simple plant monitor that reported stats to an online dashboard. This allowed me to learn soldering, stripboards, and 3d printing. To work on future projects, I need to be able to produce ever more complicated circuits and mechanical designs.

After watching some Lock Picking Lawyer on YouTube, I was inspired to think about different locking mechanisms. A locking box would be a good experiment with mechanical design, and if combined with IoT, would be good for electronics too.

In this article, I will cover how I created my lock box - from the problems I had, the iterations I made, and the final design I settled on. It’s a bit of a random project, I didn’t have set goals in mind. I started by exploring different locking mechanisms, and then moved to focusing on the electronics and getting it working.

Read more of "3D-printed IoT lock box using ESP32"

The cover of "SDL_GameController: Making gamepads just work"

SDL_GameController: Making gamepads just work

When implementing controller support in a game, it’s desirable for gamepads to just work without a lot of user configuration. Platform APIs are pretty useless for this, the solution is an API like SDL_GameController that allows you to target a large number of gamepads without much effort.

Each operating system has its own API for gamepad input. Windows has XInput, and Linux has the joystick and evdev APIs. When a gamepad button is pressed, applications will receive a button id. This is a number, there’s no OS way to know which button id corresponds with which button. The ids for a button are not the same on different gamepads and platforms, making it super hard to support more than a couple of devices.

if (SDL_JoystickGetButton(joystick, 8)) {
    std::cerr << "no idea what button 8 is" << std::endl;
}

One thing platforms do give you is the name, model, and manufacturer of the game controller. If you test with a large number of gamepads, you can create a database from gamepad name to layout. Luckily, SDL_GameController has already done this for you. Instead of a random number, you can use a named button that will work no matter the gamepad and platform:

if (SDL_GameControllerGetButton(controller, SDL_GameControllerButton::SDL_CONTROLLER_BUTTON_X)) {
    std::cerr << "X was pressed!" << std::endl;
}

Read more of "SDL_GameController: Making gamepads just work"

The cover of "Large spike in Minetest traffic caused by YouTube video"

Large spike in Minetest traffic caused by YouTube video

Last month, ContentDB received a large spike in traffic. ContentDB is the website I created that allows you to install mods/games/texture packs from within Minetest’s main menu. On Saturday 5th, Bobicraft, a Spanish-language Youtube channel with 5M subscribers, posted a video about Minetest. At the time of writing, it has reached 1.3 million views and is now the most-watched Minetest video.

In this article, I will show the data about this increase in traffic. As the tools that I use to monitor ContentDB are ephemeral, this will keep the data around for future reference.

Read more of "Large spike in Minetest traffic caused by YouTube video"

The cover of "Minetest on Steam Deck: usage and review"

Minetest on Steam Deck: usage and review

A few months ago, my Steam Deck arrived. So, obviously, one of the first things I did was play Minetest. Whilst Minetest isn’t available on Steam yet, it is available on Flatpak and so can be installed from desktop mode.

Minetest plays very well on the Steam Deck, it performs great and Steam Input makes setting up controls easy. The Deck is an open console, so there’s full support for modding and you can cross-play with other platforms.

In this article, I will explain how to set up Minetest on the deck, and review the controls, performance, and experience. I’ve already written my thoughts about the Deck in another article, and recommend checking that out.

Read more of "Minetest on Steam Deck: usage and review"

1-20 of 69 posts