Thursday, June 21, 2007
Wednesday, June 20, 2007
Androids so do not dream of electric CP
Alright, last week I quashed a bug in my food display code, but was dismayed when I realized that I couldn't change the odds of food changing (down from 100% every single time). I kept debugging the code and it seemed like it should work... except... it didn't. I got my trusty pseudo random number generator (shout out, once again, to z80.info ) to generate a pseudo random number and then set up a CP operation with a value in the C register. Then I implemented a conditional jump depending on whether the sign flag was minus or plus. Everything except for that last bit seemed to work fine. You know the drill - I was crushed, was driven before my failed code, and audible were the lamentations of my women. Well, my wife did wonder why I was crying so much.
Skip ahead one week. I tried just using the zero flag instead. That worked fine (and obviously, with 1 in 256 odds, quite glacially). So my code worked fine. It was just me who was totally retarded. CP has no effect on the sign flag. Duh!
So I'll work on that. Clearly I need to go ahead and use a subtract operation.
Oh, and DMEnduro sent me some awesome smoke grafx. This was a week ago. Anyway, it looked so good in however many shades of gray that I decided to implement these as sprite animations. Pretty risky, what with that finicky, fussy VDP whining even more than I tend to, but life is about risk. I'll post the tiles later once I get this conditional jump all squared away.
Skip ahead one week. I tried just using the zero flag instead. That worked fine (and obviously, with 1 in 256 odds, quite glacially). So my code worked fine. It was just me who was totally retarded. CP has no effect on the sign flag. Duh!
So I'll work on that. Clearly I need to go ahead and use a subtract operation.
Oh, and DMEnduro sent me some awesome smoke grafx. This was a week ago. Anyway, it looked so good in however many shades of gray that I decided to implement these as sprite animations. Pretty risky, what with that finicky, fussy VDP whining even more than I tend to, but life is about risk. I'll post the tiles later once I get this conditional jump all squared away.
Friday, June 8, 2007
Wednesday, June 6, 2007
Monday, June 4, 2007
Fish à l'Orange
I've finally updated the project (yes, life got really busy). All food items are now tile-based, and once every 8 vblanks each item gets 50-50 odds of remaining. You'll notice from the video* that this would make the game virtually unplayable, but that'll be a simple tweak.
What won't be such a simple tweak is how in tarnation all of those fishes, oranges, and eggplants get chosen. Weird. Well, it could be my code, or else the pseudorandom number generator subroutine I stole from www.z80.info . I'll have to check that out.
*As soon as Google determines it is of sufficient quality to upload to their stupid video thingy. Jerks
What won't be such a simple tweak is how in tarnation all of those fishes, oranges, and eggplants get chosen. Weird. Well, it could be my code, or else the pseudorandom number generator subroutine I stole from www.z80.info . I'll have to check that out.
*As soon as Google determines it is of sufficient quality to upload to their stupid video thingy. Jerks
Subscribe to:
Posts (Atom)