Re: Adjusting animations between NTSC and PAL/Dendy...
Posted: Mon Dec 04, 2017 9:00 am
A lot of interesting things here.
For information, and if it can help anyone, I'll explain what I'm doing in Twin Dragons since Derek (Gradual Games here) asked me on Twitter.
I'm using two arrays where I store all my speed and acceleration values (16 bits). One for NTSC and one for PAL.
Something like that :
Then I'm using constants for the values :
And finally, I got other constants to index everything :
Then in my boot code I'm doing this :
And finally when I need to update speed :
(I'm actually using a variable to store the speed index used with Y).
It may seems heavy, but it works pretty well so far, and the difference between the two console is totally acceptable, even hardly noticeable I would say (at least for me).
I'm doing the same thing for frame counters (PAL_SPEED*60/50 in this case); when I need timers, or for cutscenes for example.
Fun fact : I'm always testing the game using NTSC settings, and once in while using PAL to check that everything is working the same.
I'm not saying here that it's THE way to do thing, or the BEST way, it's just the way I'm doing it for Twin Dragons, and I'm happy with the result. Every game is different and may need a different approach. However, I think that offering (quite) the same gameplay on PAL or NTSC consoles is a plus and a good way to add polish to a game. I don't understand why PAL users shouldn't be considerate, I know that it's more work to do on our games but it's not like people here are trying to release new games every 6 months.
Well, that was just my point of view
For information, and if it can help anyone, I'll explain what I'm doing in Twin Dragons since Derek (Gradual Games here) asked me on Twitter.
I'm using two arrays where I store all my speed and acceleration values (16 bits). One for NTSC and one for PAL.
Something like that :
Code: Select all
actorsPalSpeeds:
.word PLAYER_WALK_X_ACCEL
.word PLAYER_WALK_X_DECEL
.word PLAYER_WALK_MAX_X_SPEED
........
actorsNtscSpeeds:
.word PLAYER_WALK_X_ACCEL*50/72
.word PLAYER_WALK_X_DECEL*50/72
.word PLAYER_WALK_MAX_X_SPEED*50/60
........
actorsSpeeds:
.word actorsNtscSpeeds, actorsPalSpeeds, actorsPalSpeeds ; NTSC, PAL, DENDY
Code: Select all
PLAYER_WALK_X_ACCEL = $0040
PLAYER_WALK_X_DECEL = $0080
PLAYER_WALK_MAX_X_SPEED = $0220
........
Code: Select all
PLAYER_WALK_X_ACCEL_IDX = $00
PLAYER_WALK_X_DECEL_IDX = $02
PLAYER_WALK_MAX_X_SPEED_IDX = $04
........
Code: Select all
jsr detectTVsystem ; 0 : NTSC / 1 : PAL / 2 : DENDY
asl
tax
lda actorsSpeeds+0,X
sta ptrActorsSpeeds+0
lda actorsSpeeds+1,X
sta ptrActorsSpeeds+1
Code: Select all
; X = actor index
ldy #PLAYER_WALK_X_ACCEL_IDX
lda actorSpeedLo,X
clc
adc (ptrActorsSpeeds),Y
sta actorSpeedLo,X
iny
lda actorSpeedHi,X
adc (ptrActorsSpeeds),Y
sta actorSpeedHi,X
It may seems heavy, but it works pretty well so far, and the difference between the two console is totally acceptable, even hardly noticeable I would say (at least for me).
I'm doing the same thing for frame counters (PAL_SPEED*60/50 in this case); when I need timers, or for cutscenes for example.
Fun fact : I'm always testing the game using NTSC settings, and once in while using PAL to check that everything is working the same.
I'm not saying here that it's THE way to do thing, or the BEST way, it's just the way I'm doing it for Twin Dragons, and I'm happy with the result. Every game is different and may need a different approach. However, I think that offering (quite) the same gameplay on PAL or NTSC consoles is a plus and a good way to add polish to a game. I don't understand why PAL users shouldn't be considerate, I know that it's more work to do on our games but it's not like people here are trying to release new games every 6 months.
Well, that was just my point of view