Thursday, June 21, 2007

Even Odds


The great thing about coding, particularly in assembly, is that if one is out of their element with a particular operation or concept, there are usually several other directions to take to get the desired outcome. This is a maxim that has given great comfort to me in my efforts.

Apparently my desire to use a subtract operation has caused me to hit that thick wall separating my comprehension from many, many Z80 assembly concepts. I guess these operations use signed bytes, so half the time the pseudo number generator spits out values that this operation considers negative. Well, that's what it looked like while debugging.

Anyway, that's no good. So instead I used an addition and used the carry flag for my conditional jump. This worked like a charm. I set it to less than 1-10 odds so things aren't insane, gameplay-wise.

Oh, and here are DMEnduro's smoke tiles. Time to get this party started!

No comments: