Posts

Showing posts from June, 2020

VGA Mode-X Sprite Rendering

As part of my SilkWorm project, I've got a transparent sprite-rendering system going. It's over-complicated, but it works quite quickly.  I'm writing this more as a reminder to my future self than as a HOWTO, so I'll not go into the gory details. The system is inspired by a really nice idea from StaticSaga and 36rKATPURPY on the Discord server linked to a DOS game jam .  Their system is simpler and more data-efficient.  My code is clunky but for the moment seems to work, so I'm leaving it as is until it breaks or needs speeding-up. The problem Mode-X stores pixel data in planes.  It can use VGA hardware to copy 4 pixels at a time, but only on 4px-aligned boundaries.  Michael Abrash' Black Book covers one method of how to do transparent sprite rendering without the 4px alignment, but it involves uploading 4 copies of each sprite to VGA RAM, and setting the plane mask for every 4-pixel copy.  To me, this seemed like a waste of VGA RAM, and any speed boost would

June Monthly Projects

Last month's projects They weren't 100% successful, but I got some stuff done. Wall-mounted PC: completed Coding make: demo submitted to game jam. Still plenty of work that could be done to it, but I'm pleased with what I achieved. Non-coding make: Westworld-style Shadowrun setting.  This was slightly disappointing.  I read plenty about San Francisco and pored over maps and such.  I came up with some nebulous ideas, but with nothing concrete to show for it.  A particular stumbling block for me was that I know nothing about San Francisco.  Making a setting based on a real-world location I know nothing about seems like I'm setting myself up to fail - it'd never be believable to anyone who actually knows the city. Reading: This was hella slow going, but I wanted to study the book (and still do). Despite incomplete projects, I feel like making a shortlist was pretty useful for helping me focus on particular ideas.  So here's this month's projects: June'