Gå videre til hovedindholdet

Opslag

Viser opslag fra marts, 2026

Building Swarm Entropy: From Rock-Paper-Scissors to Neon Auto-Battler

  Building Swarm Entropy : From Rock-Paper-Scissors to Neon Auto-Battler What started as a simple coding experiment quickly spiraled into absolute neon chaos. I set out to build a simple rock-paper-scissors simulation in a single HTML file: Leaf beats Water, Water beats Fire, Fire beats Leaf. Throw 60 units onto an HTML5 Canvas, make them chase each other, and see who wins. But as the engine took shape, the scope exploded. I introduced flocking algorithms, rigid-body physics, class-based combat (Snipers, Healers, Shields), environmental hazards like wormholes, and game-breaking powers. The result is Swarm Entropy : a zero-dependency, vanilla JavaScript auto-battler. Here is a look at how the game plays, and a deep dive into the custom engine running under the hood. The Game: Chaos on the Grid In Swarm Entropy, you don't directly control your units. You act as a commander: you pick your army, draft a game-breaking power, and release them onto the grid. The battles are broken into tw...

Deep Dive: Visualizing Raw KNX TP Telegrams

[ TRY IT OUT HERE: https://marcdahl.dk/knx/ ] If you spend enough time working with KNX, you eventually find yourself staring at the ETS Bus Monitor, trying to decode telegrams. While ETS provides a great high-level view, it doesn't show you the raw electrical reality of the twisted-pair (TP) bus. The way KNX TP telegrams are explained to beginners To bridge this gap, I built the KNX TP Telegram Visualizer. It is a tool designed to take standard KNX inputs and generate the exact physical bitstream and timing parameters as they would appear on the wire. Here is a look under the hood at how the visualizer works and how it models the KNX TP1 standard. 1. Stripping Away cEMI: Logical vs. Physical One of the biggest hurdles in understanding KNX telegrams is the difference between cEMI (Common EMI) and raw TP formats. The ETS Bus Monitor displays telegrams in the cEMI format. This format adds a two-byte wrapper (Message Code and AddIL) at the beginning of the frame and splits the routin...

Pixel Chess by Namik Zade

  What is Pixel Chess? Pixel Chess is Namik Zade’s, simple attempt to see how far down can a chess board can be scaled down digitally in order to keep the size of the board minimal in dimensions, while being able to recognize the different pieces. Dimensions What Namik Zade has made, is the minimum dimensions for a chess piece that can be recognized, and not confuse the player. It is 3 pixels wide and 3 pixels high chess pieces, placed in a 5 by 5 pixel square.   These dimensions give just enough freedom to create the 6 different chess pieces (Pawn, Knight, Bishop, Rook, Queen, King) in a manner to be able to see the difference between them. Design decision While the chess board can still be scaled down to 24 by 24 (3×8) pixels in dimensions, Namik Zade could see that 1 pixel of free space is still needed around a chess piece in order to have a visually pleasant and recognizable chess set, that adds extra 16 pixels in both dimensions to the overall design. Summary It is not ...

The Mythical 1-50: Reclaiming a Missing Piece of 90s Eastern European Childhood

If you grew up in Eastern Europe or a post-Soviet state in the 1990s, you don’t need me to explain what a piece of Turbo gum meant. It wasn't just chewing gum. In a world still shaking off the grayness of the Soviet era, that bright yellow, rock-hard piece of chemical-smelling taffy was a brick of condensed, Western exoticism. But let’s be honest: no one bought it for the gum. We bought it for the treasure hidden inside. We bought it for the wrappers (or "vkladyshi / вкладыши," if you will). The Gateway to a World of Horsepower For us, those wrappers were our first encyclopedias of automotive desire. In a reality where the roads were dominated by Ladas, Zhigulis, and the occasional aging Volga, Turbo wrappers offered us a vibrant, full-color portal to a magical world of Ferraris, Lamborghinis, and Porsches. We didn't just collect them. We traded them, gambled them in playground games involving vigorous hand-slapping, and tacked them to our bedroom walls. We memorized ...

Russisk Fonetisk Tastatur Layout i Linux Mint /Ubuntu

Baggrund :     Som tosproget (dansk, russisk) støder jeg tit i problemer med at have to tastatur layouts på samme computer. For mange år siden fandt jeg en homofont russisk tastaturlayout for windows, som jeg brugte i mange år. Homofont layout betyder at de forskellige bogstaver placeret samme sted på tastaturet som de danske bogstaver. F.eks. Ved at trykke på " W " på de n danske tastatur ville give " Ш " på russisk, en " L " ville give " Л " osv.  Denne homofont layout kunne jeg ikke finde til linux, og derfor i samarbejde med Google Gemini, fik jeg skabt min egen. Billedeksempel: Her kan du se placeringen af russiske bogstaver på tastaturet. Implementering: Åbn din Terminal og kopiér denne kommando ind for at tage en backup af systemets russiske fil: sudo cp /usr/share/X11/xkb/symbols/ru /usr/share/X11/xkb/symbols/ru.bak Åbn filen og indsæt dit nye layout Nu skal vi redigere den fil, der indeholder det layout: sudo xed /usr/share/X11/xkb/symbo...