[TI Asm] Tron Project
Posted: Tue 16 Dec, 2008 9:26 pm
Well, I started getting back into assembly (but I'm still too lazy to spend the full 28 days taking the tutorial). I started by making a tron clone in basic, then refining it to make it run as fast as possible. I've reached the limits of Ti-basic, however, and anything with a halfway decent AI is pretty dang slow. Naturally, I turned to assembly.
Here's the pseudocode for what i did in Ti-Basic:
The first problem I see is that I don't know how to display the 1 pixel lightcycle. Can a sprite be defined as one pixel? Ideally there would be a pixel-on and pixel-text command that I could use.
Here's the pseudocode for what i did in Ti-Basic:
Code: Select all
Lbl A
pxl-on(x1,y1)
pxl-on(x2,y2)
prgmAISUB
getkey
determine direction based on input
inc / dec x and y variables according to direction
check if the pixel about to be turned on is already on, if so goto B
goto A
Lbl B
determine winner/loser