|
Post by mikiex on May 12, 2014 17:11:24 GMT -5
Tables is just a name for data stored in a sequence, that could be in ROM or RAM. You might think of it like an array in higher level languages. Or a LUT (look up table) as you mentioned. a table in ram might be a list of x,y positions of aliens that are moving every frame a table in rom might be the x,y vector list used to draw one single alien (which you reuse for each alien) Also something such as the string "Hello World" could be thought of as a table, this string is really just bytes in sequence in memory, its the assembler that takes the string and converts it back to it's ascii values - which are just numbers. When you're calling bios routines, its worth referring to the bios source code to see whats happening. www.playvectrex.com/designit/chrissalo/bios.htmIt might not make sense for now, but you will again see things like F192 again and the actual code it actually runs when you JSR to it.
|
|
|
Post by christophertumber on May 12, 2014 21:20:37 GMT -5
Table = list
A table might be something like:
;Score value for killing aliens score_table: DW 50 ; 50 points - enemy missile DW 100 ; 100 points - enemy scout DW 200 ; 200 points - enemy trooper DW 500 ; 500 points - enemy leader
And the subroutine for adding to the players score would be:
lda alien_type ; get what kind of alien, 0 = missile, 1 = scout, 2 = trooper, 3 = leader lsla ; double it (2 byte value (word) ldx #score_table ; put the start of the table in X ldd a,x ; Starting with the table at x, go down a bytes and put the score value in d jsr increase_score
|
|
|
Post by xefned on May 15, 2014 13:11:32 GMT -5
Awesome! That's so helpful.
Rather than ask an annoying question (What does DW stand for?) - I looked in the AS09 assembler manual to discover it stands for "Define words." <-- if that's helpful for other beginners.
"The words are placed in the current (code or data) segment. This pseudo-instruction is identical to the Motorola-defined fcw and fdb pseudo-instructions."
Example:
JumpTable dw Function0 dw Function1 dw Function2
In the spirit of "learning by doing" I'm anticipating everyone following along will slightly modify their sprites so for example, one person's 'bottom of screen' character will be shaped like a carrot, another's like a shoe, another's like a mini-spike, etc. So we'll end the project with 10 or so demos that look different but function the same.
|
|
|
Post by mikiex on May 15, 2014 14:09:23 GMT -5
In the spirit of "learning by doing" I'm anticipating everyone following along will slightly modify their sprites so for example, one person's 'bottom of screen' character will be shaped like a carrot, another's like a shoe, another's like a mini-spike, etc. So we'll end the project with 10 or so demos that look different but function the same. Yes, I was just going to use simple triangles , I've never even written a game like space invaders before - so I'll be muddling my way through it myself. When you say 10 demos you might be being optimistic, the way I see it - if you're the only one who follows it right now that's fine because you can give good feedback about what isn't clear. In the future there might be a few others that it helps to. when I say space invaders, it could be a different game... maybe with attack waves or something.
|
|
|
Post by xefned on May 15, 2014 20:28:59 GMT -5
I suspect there's more interest than it appears. As for me, I'm trying to rush through the pre-requisites before I get left behind. Probably others in the same boat.
I like the idea of attack waves - in the style of galaga, or phoenix, or demon attack, or what have you - seems more flexible than a regimented line of space invaders, which I'd think would be harder to modify. Plus, YASI has already perfected the Space Invaders genre.
Even if it's just me for now, I'm committed. Still working through part 1, but excited for the challenge!
|
|