Castlevania Stairs

Nathaniel

New member
Hello all,
Could anyone point me in the right direction on how to make stairs like in the Castlevania games? I'm guessing it would be like a modified version of the ladder code?

Thanks
 
I've been studying this code trying to figure it out to for a while and one of the things about this code is understanding the X and Y coordinates for every step that you take.

There is a write-up online about the game a kids and It shows you basically how to program slopes and do things like that if you're clever enough. But as for just taking the latter code a doesn't work I've already tried it it's too loose and allows you to be all over the place.



so you would have your collision that you'd have to figure out you'd have to figure out your XY cordons for your player plus the stairs would also have to be walkthrough if you just wanted him that way at then when you press up then your players going up snap in Into that code assembly so it's it input script as well.
 

SciNEStist

Well-known member
an easier workaround might be to hide the player, create a new object that looks like the player and its only job is to move along the stairs, and when its finished put the player back at the other side of the stairs. it would work more like the character in elevator action.

not ideal and would create some other issues (cant control while on the stairs, wouldnt interact with enemies properly) but it could be something you do as a temporary solution until a proper method can be in place.
 
Thats an interesting Idea. It would be tile and input based.it would have to have the inputs not work during the stair climb. Would you just place a tile at too and bottom of the stairs? You would still have to tell the code what angle to move the Object in which right now as far as I know, no one has coded X,Y vales for angles and slopes yet.
 
Very interesting I'd like to take a look at that code and see if they can be utilized for a player movement. I know that castle vainya style stairs could be beneficial to everybody here in the groups.
 
I say this macro and thought maby this could be used.
MACRO MoveTowardsPoint arg0, arg1, arg2, arg3, arg4
;; arg0 = point of origin, x
;; arg1 = poinrt of origin y
;; arg2 = point to move towards x
;; arg3 = point to move towards y

GetAngle:
Atan2:
LDA arg0
SBC arg1
bcs noEor
eor #$ff
noEor:
TAX
rol octant

lda arg2
SBC arg3
bcs noEor2
eor #$ff
noEor2:
TAY
rol octant

lda log2_tab,x
sbc log2_tab,y
bcc noEor3
eor #$ff
noEor3:
tax
lda octant
rol
and #%111
tay
lda atan_tab,x
eor octant_adjust,y
;; now, loaded into a should be a value between 0 and 255
;; this is the 'angle' towards the player from the object calling it

TAY
LDA AngleToHVelLo,y
STA myHvel
LDA AngleToVVelLo,y
STA myVvel




ENDM
 
Here is a code I have been working on, if any one has any input please feel free. I dosent compile
I know this would need to check for gravity too, doesnt matter if anything is underneath the player




Code:
LDX Player1_Object
GetCurrentActionType player1_object
Cmp#$02;;
BEQ++;;
CMP#$03
BEQ++;;
CMP#$01
BEQ+;; if an action type already equals 1, jump forwards
ChangeObjectState #$01, #$04; animation for stairs
+
;; Startmoving
StartMoving Player1_Object, Move_Right_Up
;;change direction
FaceDirection Player1_object,#%00000011
++
Rts
 

Dirk

Member
Electric cat said:
Here is a code I have been working on, if any one has any input please feel free. I dosent compile

Code:
Rtd
I think it is supposed to be
Code:
Rts
ReTurn from Subroutine and this might be the reason your code doesn't get compiled.
If you use [ code ] your code here [/ code] in your posts (without the spaces), your code will get displayed in a nicer and easier to read way.
 
Top Bottom