Hi. Just wanted to show my code for Dragon Warrior-like character animation.
Code: Select all
PlayerFieldAnimation:
LDA PlayerFieldDirection
CLC
ADC PlayerFieldFrame
TAX
LDY #$01
-
LDA herofield, x
STA SpriteRam, y
INX
INY
LDA herofield, x
STA SpriteRam, y
INX
INY
INY
INY
CPY #$11
BNE -
RTS
It basically sums up player frame and player direction and loads a sprite based on that.
Code: Select all
Dir_South = $00
Dir_North = $10
Dir_East = $20
Dir_West = $30
FieldFrame1 = $00
FieldFrame2 = $08
Code: Select all
herofield:
;south1 south2
.db $00, %00000000, $01, %00000000, $10, %00000000, $11, %00000000, $02, %00000000, $01, %00000000, $12, %00000000, $13, %00000000
;north1 north2
.db $04, %00000000, $05, %00000000, $14, %00000000, $15, %00000000, $04, %00000000, $07, %00000000, $16, %00000000, $17, %00000000
;east1 east2
.db $08, %00000000, $09, %00000000, $18, %00000000, $19, %00000000, $08, %00000000, $0B, %00000000, $1A, %00000000, $1B, %00000000
;west1 west2
.db $0C, %00000000, $0D, %00000000, $1C, %00000000, $1A, %01000000, $0E, %00000000, $0D, %00000000, $1E, %00000000, $18, %01000000
By the way, I'd like to use NES Screen Tool for mapping but every time I save a project and try to open it I get an error (attachment). I have no idea how to make a metasprite either, it just doesn't react with anything I click in that section.
As I understand, NSS only allows you to see how your map will look but you can't really export it in a format that ASM6 will read, right? Are there any better tools to do map stuff?
Also, few questions about doing a map. Would you guys use 16x16 or 32x32 chunks as metatiles for an overworld RPG map?
How about vertical/horizontal flipping of single 8x8 BG tiles? Impossible because attribute tables correspond to the whole 16x16 chunk?
Thanks.