Skip to content

Releases

v0.0.2: Improve video corruption when rendering complex scenes on HexGL FMV for Sega Master System.

Choose a tag to compare

@haroldo-ok haroldo-ok released this 17 Aug 20:16

Full Changelog: v0.0.1...v0.0.2

HexGL FMV (Sega Master System) — Video Corruption Fix Notes

This update addresses visual scrambling, corrupted sky graphics, and leftover "ghost" buildings during gameplay, ensuring clean video playback on original hardware and emulators.


What Was Causing the Scrambling?

The visual glitches were caused by two combined issues in the video processing code:

  1. "Ghost" Graphic Fragments (Encoder Sync Bug):
  • The Issue: The video converter assumed the game wiped the screen clean every few frames, but during normal gameplay, the video only updates changed graphics. When buildings scrolled off-screen, the converter thought they were already gone and stopped updating those areas—leaving broken building fragments frozen in the sky indefinitely.
  • The Fix: The video encoder now tracks graphic changes continuously across the entire race. Empty background tiles are prioritized and cleared out immediately as objects move off-screen.
  1. Hardware Video Memory Overload (Sharp Turns & Complex Buildings):
  • The Issue: Panning quickly through sharp hairpin turns or past large buildings required updating more graphic tiles than the Master System's display chip could handle in a single frame. This caused updates to back up and scramble the image.
  • The Fix: The game's video engine now uses 2-frame adaptive loading. Complex video updates are split across two frame draws (up to 24 tiles per frame), doubling the maximum graphic update capacity without causing screen tearing on real hardware.

Key Improvements & Results

  • Dramatically Cleaner Picture: Graphic error rates dropped from over 35% down to ~4%, eliminating frozen building artifacts and scrambled roads.
  • Hardware-Safe Video Loading: Keeps graphic updates safely under the Master System's strict hardware limits to prevent display corruption.
  • Adaptive Turn Pacing: Video sampling now automatically places more detail into tight hairpin turns while keeping straightaways smooth, resulting in a natural easing motion into corners.

What to Expect in Gameplay

  • Slight Speed Variation in Dense Areas: Highly detailed sections (like passing big structures or taking tight hairpin turns) now take a split-second longer to render smoothly. Player steering remains responsive every single frame.

v0.0.1: Implement initial proof of concept of WebGL for Sega Master System using Claude.

Choose a tag to compare

@haroldo-ok haroldo-ok released this 14 Aug 20:18

Full Changelog: https://github.com/haroldo-ok/hexgl-fmv-sms/commits/v0.0.1

image image image

Here is a plain-language summary of the HexGL Master System FMV Port project:

What Is This Project?

This project is a technical proof-of-concept that ports HexGL---a famous 3D futuristic racing game originally built for web browsers---to the Sega Master System (SMS) from 1985.

Because the Master System's 8-bit processor is far too weak to draw complex 3D tracks and city skylines in real time, this project uses a clever workaround: it pre-renders the track on a modern computer into a video stream that the console plays back based on your driving.

How it Works

  1. Capturing the Track:

    • A custom computer script "drives" an automated path through HexGL's original 3D city track and captures every single frame of the lap (1,120 frames total).
  2. Stylized "Cel-Shaded" Visuals:

    • Detailed 3D textures would take up way too much memory for the old console. Instead, the track is rendered with a clean, comic-book style ("cel-shaded") featuring solid color bands and dark outlines.
  3. Interactive Video "Seeking":

    • Rather than playing like a standard movie, the game uses the player's throttle to "seek" through the video stream. Hold the accelerator, and the video track rushes forward; let go, and your ship coasts to a stop.
  4. Hardware Sprites for the Ship:

    • Your player ship is drawn separately on top of the video using the console's built-in sprite hardware, complete with 5 different leaning angles for turning left and right.

Current Features & Controls

  • Game Mode: Includes 1 track (Cityscape) and 1 ship.

  • Controls:

    • Button 1 / Up: Accelerate

    • Left / Right: Steer and bank the ship

  • ROM File Size: 4 MB (uses a Sega memory mapper to load across 256 different memory banks).

Key Requirements & Notes

  • Emulator Support: Because the game file is unusually large for an 8-bit console (4 MB), it requires an emulator capable of handling 4 MB Sega mappers (such as Emulicious or MEmu). Basic emulators capped at 1 MB will show a black screen after you drive past the first megabyte of video data.

  • Visual Trade-off: The game swaps out realistic 3D textures for a clean, vector-style aesthetic (sunset sky, solid road bands, outlined skyscrapers). This optimization reduces visual clutter so the console can smoothly load frame updates without lagging.