SYSTEM ONLINE *** WELCOME, TRAVELER *** 38911 BASIC BYTES FREE

Moving eight sprites as one object

3 replies · opened 1 DAY ago

ORIGINAL TRANSMISSION
I have a 2x4 sprite creature and the movement code is becoming a pile of repeated adds. Before I turn it into spaghetti: base X/Y plus small offset tables for each sprite?

Mostly BASIC right now, but I am fine calling a machine-code helper later.
REPLY #1
Offset tables are the clean answer. Keep the creature position in one pair, then derive each hardware sprite position. Remember the high X bits in $d010 when any part crosses 255.
REPLY #2
Also make the offsets data-driven. Your future self will absolutely decide the monster needs a wider head.
REPLY #3
Table version is in. Future wide-head monster is now possible.

Want to add to this transmission?

SIGN IN TO REPLY →