Sr. Content Developer at Microsoft, working remotely in PA, TechBash conference organizer, former Microsoft MVP, Husband, Dad and Geek.
166408 stories
·
33 followers

AI Cryptography Threat

1 Share
From: AIDailyBrief
Duration: 32:10
Views: 390

The AI Daily Brief helps you understand the most important news and discussions in AI.
Subscribe to the podcast version of The AI Daily Brief wherever you listen: https://pod.link/1680633614
Get it ad free at http://patreon.com/aidailybrief
Learn more about the show https://aidailybrief.ai/

Read the whole story
alvinashcraft
5 hours ago
reply
Pennsylvania, USA
Share this story
Delete

Flash, Local AI, and the Software Factory! 🏭

1 Share
Ben Marte on running a crew of AI agents on hardware he owns.
Read the whole story
alvinashcraft
5 hours ago
reply
Pennsylvania, USA
Share this story
Delete

Porting Retro Racing Game to .NET

1 Share
&&
C# Advent 2026 Cross-Platform .NET Gaming

This post is part of the 2026 C# Advent calendar: Two C# posts a day, Dec 1–25.

Some sounds are permanently burned into the memory of a certain generation of developers. The screech and hiss of a dial-up modem negotiating its way onto the internet. The Windows 95 startup chime. And, somewhere in the background of every after-school gaming session β€” the angry buzz of a motorcycle engine, a guitar-heavy soundtrack, and the unmistakable thwack of a boot connecting with a rival rider.

That last one is Road Rash. And this is the story of how I brought it back to life with C#, SkiaSharp and Uno Platform β€” one codebase, every platform.

Nostalgia

Gaming Nostalgia

Rewind to the early days of home computing. Windows 95 and 98 machines, beige towers, CRT monitors that doubled as space heaters. A game was something you installed from a CD β€” or, if you were lucky, from a stack of floppy disks a friend had copied for you.

Road Rash was the game that made a PC feel like an arcade. Electronic Arts' motorcycle combat racer put you on a bike, on a winding highway, with a pack of rivals who had absolutely no intention of letting you win cleanly. You could race. You could also kick, punch and swing a chain at the competition while doing 150 mph. And that was the whole genius of it. Racing games were about the perfect line β€” Road Rash was about survival, and about the pure joy of knocking someone off their bike.

Why was it so popular? A few reasons, and developers will recognize every one of them:

  • Speed you could feel β€” the pseudo-3D road swooped and curved toward the horizon, and the sense of velocity was real
  • Combat as a game mechanic β€” racing plus brawling was a combination nobody had seen before
  • Personality β€” the rivals, the roadside scenery, the attitude, the music
  • Instantly learnable β€” steer, brake, kick. Anyone could pick it up in a minute

And the soundtrack of an afternoon after school? Dial-up modem noise from the next room, motorcycle engines from the speakers, and a rock soundtrack that made a spreadsheet-grade PC feel like a Friday night. Many of us 80s/90s kids spent hours β€” hours β€” on this game.

So here is the question that kept nagging at me: wouldn't it be nice to recreate that iconic experience for the next generation?

Tech Stack

Choosing the Tech Stack

This generation games differently. It isn't on one beige tower in the corner of the house. Modern digital lives demand flexibility of platforms and continuity of experiences β€” a laptop at the desk, a desktop at home, maybe a different machine at school. If I was going to port Road Rash, why not have it run everywhere?

That sounded easy. Then I wrote down what the tech stack actually needed to be:

  • Foundationally solid, and cross-platform from a single shared codebase. I did not want three ports to maintain. One game, one set of logic, one place to fix a bug.
  • A powerful, consistent UI rendering pipeline. A racing game lives and dies by its frame. If the road looks different on Windows than it does on macOS or Linux, that's a bug I can't live with.
  • AI-forward. Here's the part that changes the equation. AI Agents change the economics of migration β€” what used to take a team weeks can now be sketched, built and verified in a far shorter loop. The chosen stack needs to meet agents where they are, with the tools to build, run and check the work.

Which stack checks every one of those boxes? Uno Platform.

  • Cross-platform .NET β€” C# and XAML, running on Windows, macOS, Linux and beyond
  • One shared codebase β€” the game logic, the rendering and the UI are written once
  • Modern design tools β€” Hot Reload and Hot Design keep the inner developer loop tight when you are tweaking a HUD
  • AI-ready out of the box β€” Skills, Agents and MCP tools so an AI agent has real context, plus real "eyes and hands" on the running app

Without further ado, here is Road Rash recreated in Uno Platform as a cross-platform .NET app:

Screenshot: Road Rash as Uno Platform App

Let's unpack. The project file tells the story. This is the entire feature list for the game:

<Project Sdk="Uno.Sdk">
  <PropertyGroup>
    <TargetFrameworks>net10.0-desktop</TargetFrameworks>
    <OutputType>Exe</OutputType>
    <UnoSingleProject>true</UnoSingleProject>
    <UnoFeatures>
      SkiaRenderer;
      Mvvm;
    </UnoFeatures>
  </PropertyGroup>
</Project>

Two features. SkiaRenderer gives me pixel-consistent drawing on every target, and Mvvm brings in the CommunityToolkit.Mvvm source generators for the menus and HUD. That's it.

Under the Hood

Implementation Nuances

Let's unpack how the game is put together. The repo is deliberately small and readable β€” a handful of files, each with one job:

UnoRoadRash/
β”œβ”€β”€ Game/            Race simulation: RaceEngine (physics, AI, combat), Racer, Track
β”œβ”€β”€ Rendering/       RoadCanvas (pseudo-3D projection) and Painter (bikes, scenery, HUD drawing)
β”œβ”€β”€ ViewModels/      GameViewModel: screens, input mapping, game state
β”œβ”€β”€ Themes/          XAML styles for the menus and HUD
β”œβ”€β”€ MainPage.xaml    Game page and frame loop (CompositionTarget.Rendering)
└── Platforms/       Desktop entry point

The big design decision: the simulation knows nothing about drawing, and the drawing knows nothing about input. The engine updates numbers. The renderer reads them. The view model sits in between. That separation is what made the whole thing easy to reason about β€” for me and for the AI agents helping me.

The frame loop: MainPage

Everything is driven by a single heartbeat. MainPage subscribes to CompositionTarget.Rendering β€” once per rendered frame, it advances the simulation and asks the road to redraw:

private void OnLoaded(object sender, RoutedEventArgs e)
{
    _clock.Restart();
    _lastTime = 0;
    CompositionTarget.Rendering += OnRendering;
}

/// <summary>Game loop: one simulation step and one redraw per rendered frame.</summary>
private void OnRendering(object? sender, object e)
{
    var now = _clock.Elapsed.TotalSeconds;
    var dt = now - _lastTime;
    _lastTime = now;

    ViewModel.Tick(dt);
    Road.Time = now;
    Road.Invalidate();
}

No timers, no threads, no platform-specific tricks. Delta time in, one tick, one invalidate. Keyboard input gets the same treatment β€” the page hooks KeyDown and KeyUp with handledEventsToo: true, so a focused button never swallows a steering key.

Race simulation: RaceEngine, Racer and Track

RaceEngine is the brain: player physics, rival AI, kicks, crashes and standings. It uses the classic pseudo-3D racer conventions β€” Z is distance along the road, X is lateral position measured in road half-widths. Throttle is automatic. You steer, you brake, you kick.

Steering, with a nod to physics, looks like this. Centrifugal force pushes you outward on curves, proportional to your speed:

var dx = dt * 2 * speedPercent;
if (left)
    p.X -= dx;
else if (right)
    p.X += dx;

p.Lean = Approach(p.Lean, left ? -1 : right ? 1 : 0, dt * 5);

p.X -= dx * speedPercent * segment.Curve * Centrifugal;

// Throttle is automatic: the bike always pulls unless you brake.
if (Input.Brake)
    p.Speed += Braking * dt;
else
    p.Speed += Accel * (1.15 - speedPercent * 0.5) * dt;

Hit the grass at speed and you shed velocity. Hit a tree out there and β€” well, that's a wipeout.

The rival AI is where the personality lives. Seven rivals β€” Axel, Moxie, Dax, Jinx, Rook, Bruno and Vex β€” each with their own skill level. They cruise at a fraction of top speed, wander between lanes, and get mild rubber-banding so the pack stays interesting rather than leaving you alone at the front or the back:

// Mild rubber-banding keeps the pack around the player.
var gap = Player.Z - r.Z;
var rubber = 1 + Math.Clamp(gap / 30000, -0.12, 0.14);
var desired = r.Finished ? MaxSpeed * 0.35 : r.Skill * MaxSpeed * rubber;

And just like the originals, they come looking for you. When a rival rides alongside the player, there's a random chance per frame that they throw a kick:

r.AttackCooldown -= dt;
var sideGap = Player.X - r.X;
if (nearPlayer && !r.IsKicking && r.AttackCooldown <= 0 &&
    Math.Abs(dz) < 320 && Math.Abs(sideGap) > 0.04 && Math.Abs(sideGap) < 0.4 &&
    _rng.NextDouble() < dt * 2.2)
{
    StartKick(r, Math.Sign(sideGap));
    r.AttackCooldown = 1.6 + _rng.NextDouble() * 2.5;
}

Combat is resolved when the kick connects β€” a little way into the animation, not at the button press, which makes it feel like the foot actually lands. It finds the closest valid target on the correct side, applies damage and knock-back, and drops the victim into a wipeout when their health runs out:

var damage = attacker.IsPlayer ? 22 + _rng.Next(14) : 9 + _rng.Next(7);
target.Health -= damage;
target.PushVelocity += dir * (attacker.IsPlayer ? 1.5 : 1.1);
target.Speed *= attacker.IsPlayer ? 0.9 : 0.95;

Notice the asymmetry: the player hits harder than the rivals do. That's not a bug β€” it's game feel.

Racer is intentionally a plain bag of state: position, speed, health, lean, kick and crash timers. It even exposes tiny animation curves β€” KickExtension is a 0..1..0 sine so the renderer can draw a leg swinging out and back without knowing anything about combat rules.

Track builds the road as a list of short segments, each with a curve value and a hill height. A handful of helpers β€” AddCurve, AddHill, AddSCurves, AddBumps β€” stitch together eased sections, and the course repeats until it's about a minute long:

t.AddCurve(Len.Medium, Curve.Medium, Hill.Low);
t.AddHill(Len.Medium, Hill.Medium);
t.AddSCurves();
t.AddStraight(80);
t.AddCurve(Len.Long, -Curve.Easy, Hill.Medium);
t.AddBumps();

Scenery is scattered by biome β€” forest, farmland, dry coast β€” and every tree, rock, barn and billboard has a hit width. Clip one off the road and you're in the dirt.

Rendering: RoadCanvas and Painter

This is where Uno Platform's Skia renderer really earns its keep. RoadCanvas derives from SKCanvasElement β€” a control that hands you a raw SKCanvas to draw on, right inside the XAML visual tree:

public sealed class RoadCanvas : SKCanvasElement
{
    public RaceEngine? Engine { get; set; }

    protected override void RenderOverride(SKCanvas canvas, Size area)
    {
        // sky, ridges, then the road
        DrawBackground(canvas, w, h, Engine.SkyOffset);
        DrawRoad(canvas, w, h, Engine);
    }
}

The pseudo-3D trick is a classic: no real 3D at all. Each road segment is projected from world coordinates to screen coordinates with a single perspective formula, and nearer segments are drawn larger and lower on screen:

private static void Project(double camX, double camY, double camZ, float w, float h,
    out double sx, out double sy, out double sw, out double scale)
{
    scale = RaceEngine.CameraDepth / Math.Max(camZ, 1);
    sx = w / 2 + scale * camX * w / 2;
    sy = h / 2 - scale * camY * h / 2;
    sw = scale * RaceEngine.RoadWidth * w / 2;
}

The renderer walks the segments front to back, keeping track of the highest screen row already painted, so hills naturally hide the road behind them. Each visible segment is a handful of filled quads β€” grass, gravel shoulder, rumble strips, asphalt, lane markings β€” blended toward a fog color with distance. Then sprites are painted back to front: scenery, rivals, and finally the player's bike.

Painter draws everything else. And here's a fun detail: there isn't a single bitmap sprite in the game. Every bike, rider, helmet, tree, billboard and HUD flourish is drawn procedurally with Skia primitives β€” rounded rects, ovals, lines and paths β€” in local units, then scaled by depth. Rival bikes get their own BikeLook color schemes, and kicks are simply a leg's position interpolated along the kick curve.

Why SkiaSharp rendering helps

This is the part I'd call out for any developer weighing a port. Because Uno's Skia renderer draws the entire UI through SkiaSharp, the road, the bikes and the XAML HUD sit in the same pipeline, and the result is consistent across platforms. I write the drawing code once, and the pixels come out the same on Windows, macOS and Linux. For a game where the look of a curve matters, that consistency isn't a nice-to-have. It's the whole point.

ViewModels and Themes: the menus and HUD

Not everything needs to be hand-drawn. The menus, pause screen, results screen and the in-race HUD are plain XAML, bound to a GameViewModel built with CommunityToolkit.Mvvm. The view model owns the screen state and exposes commands for starting, pausing and stopping a race:

public partial class GameViewModel : ObservableObject
{
    public RaceEngine Engine { get; } = new();

    [ObservableProperty]
    [NotifyPropertyChangedFor(nameof(IsMenuVisible), nameof(IsHudVisible), nameof(IsPauseVisible), nameof(IsResultsVisible))]
    private GameScreen _screen = GameScreen.Menu;

    [RelayCommand]
    private void StartRace()
    {
        Engine.Reset();
        ClearInput();
        _finishDelay = 0;
        RefreshHud();
        Screen = GameScreen.Racing;
    }
}

Tick advances the engine and refreshes the HUD strings β€” speed in MPH, place, race time, health, the nearest rival's health bar. HandleKey maps arrow keys and Z/X (or A/D) to steering, braking and kicks. The XAML just binds to the result with x:Bind:

<TextBlock Text="{x:Bind ViewModel.Speed, Mode=OneWay}" Style="{StaticResource RashDisplayTextStyle}" />
<ProgressBar Style="{StaticResource HealthBarStyle}"
             Value="{x:Bind ViewModel.Health, Mode=OneWay}" />

The look comes from GameTheme.xaml β€” a palette of asphalt blacks, rumble-strip red and warning-sign yellow, with Impact-style display text for that unmistakable arcade-poster feel. Restyle the HUD? Edit a resource dictionary. No code changes.

How the agents verified gameplay

Here's where the AI-forward choice paid off. Writing a game with an agent is easy to start and tricky to trust β€” "it compiles" tells you nothing about whether the bike steers the right way, or whether a kick actually knocks a rival down.

The Uno App MCP tools gave my AI agents "eyes and hands" on the running game. Instead of guessing, the agent could launch the app, take a screenshot of the road, press keys, and look at what actually happened β€” did the countdown appear, did the HUD update, did the place change, did the results screen show up? Gameplay logic and UI behavior were verified against the live app, not just reasoned about in code. When something looked off, the agent saw it, fixed it and checked again. Context is everything β€” and a screenshot is a lot of context.

Get the code

The full game is on GitHub: github.com/samidip/UnoRoadRash. You need the .NET 10 SDK, then from the repo root:

dotnet run --project UnoRoadRash/UnoRoadRash.csproj -f net10.0-desktop

Controls are simple: ← / β†’ to steer, ↓ to brake, Z/A to kick left, X/D to kick right, Enter to start and Esc/P/Space to pause. Throttle is automatic. Fork it, tune the rivals, add a new track β€” the structure is meant to be played with.

Play

Generational Fun

Enough reading. Here's the game in action:

🎬 Video

What made Road Rash iconic wasn't graphics β€” it was physics and feel. The tug of a curve, the lean of the bike, the half-second where a kick is in the air and you don't know yet whether it will land. Those little rules are what pulled gamers in, and rebuilding them meant paying attention to exactly those details: the centrifugal drift, the knock-back, the rubber-banding that keeps the pack close.

So did the port work? Honestly β€” it's a success story for Uno Platform. A pseudo-3D racer, seven AI rivals, combat, crashes, a HUD, menus and a results screen, rendered consistently through SkiaSharp, written in C# and XAML, from a single shared codebase, and verified by agents that could actually see the running app.

But the best moment had nothing to do with architecture. It was watching my kid sit down, grab the keyboard, and play the recreated Road Rash β€” laughing, leaning into the turns, kicking rivals off their bikes. Three decades after those after-school sessions, a new generation of players has the same grin. That's the satisfaction no benchmark can give you.

Now it's your turn β€” clone the repo, kick a few rivals off their bikes, and let us know what you build next. Cheers developers!

Go Build

Next Steps

The post Porting Retro Racing Game to .NET appeared first on Uno Platform.

Read the whole story
alvinashcraft
5 hours ago
reply
Pennsylvania, USA
Share this story
Delete

Interesting links December 04 -

1 Share
Automated translation going wrong, the web without JavaScript, the world before AI got awkward.
Read the whole story
alvinashcraft
12 hours ago
reply
Pennsylvania, USA
Share this story
Delete

Is OpenAI Stuck?, Jensen's Washington Disaster, AI Cybersecurity Madness

1 Share

Ranjan Roy from Margins is back for our weekly discussion of the latest tech news. We cover: 1) OpenAI's revenue growth stagnation 2) Whether competition is the reason for OpenAI's stagnant revenue growth stagnation 3) OpenAI's need for an application like Claude Code 4) Amazon's Open Source push 5) Anthropic's strong course on the public markets so far 6) Jensen Huang's disastrous testimony in Washington 7) How Jensen should've presented his arguments 8) Two worlds: In Silicon Valley everyone forgets and moves on, the general public doesn't however 9) Will Jensen stay on as CEO? 10) Is encryption going to break?

---

Enjoying Big Technology Podcast? Please rate us five stars ⭐⭐⭐⭐⭐ in your podcast app of choice.

Want a discount for Big Technology on Substack + Discord? Here’s 25% off for the first year: https://www.bigtechnology.com/subscribe?coupon=0843016b

Learn more about your ad choices. Visit megaphone.fm/adchoices





Download audio: https://pdst.fm/e/tracking.swap.fm/track/t7yC0rGPUqahTF4et8YD/pscrb.fm/rss/p/traffic.megaphone.fm/AMPP8693029298.mp3
Read the whole story
alvinashcraft
12 hours ago
reply
Pennsylvania, USA
Share this story
Delete

RNR 378 - SwiftPM for React Native with Riccardo Cipolleschi & Christian Falch

1 Share

Riccardo Cipolleschi and Christian Falch join Mazen Chami and Tyler Williams to explain how SwiftPM fits into React Native and what it means for app teams and library maintainers. They dig into the tradeoffs with CocoaPods and what to check before trying SwiftPM in an existing app.

Episode Links





Download audio: https://cdn.simplecast.com/media/audio/transcoded/1208ee61-9c16-43c1-bc4c-ca790717f4a8/2de31959-5831-476e-8c89-02a2a32885ef/episodes/audio/group/5f1e0118-dfce-4d62-a5ba-562ad3848d31/group-item/d735ed2a-34d2-459c-a47d-5265b2980abf/128_default_tc.mp3?aid=rss_feed&feed=hEI_f9Dx
Read the whole story
alvinashcraft
12 hours ago
reply
Pennsylvania, USA
Share this story
Delete
Next Page of Stories