Object Trajectory

Prime

Object Trajectory

Post by Prime » Mon Sep 22, 2014 10:38 am

As to I've said physics code for object trajectory,if anyone wants to know how jump trajectory works(Soulless,Guns&Ghosts,Anything by Richard Bayliss)let me know and i'll show how there table velocity works(If your new to programming George and Richard's code is very easy to implement.
After this i'll go onto sprite tile colision and how to handle $d010 with it.
If any Question write here or pm me as I want everyone to have a good grasp on my code and how programming works.
Kroc is there not a Code tag that would make the code clearer bro?

.const Button = 16
.const _joypad = $dcoo
.var _oldjoypad - $20
,var _blobvelocity = $21
.var _blobconstgravityf = $22
.var _blobgravityf = $22
.var _blobjumpingflag = $22
.var _blobvelocity = $23
.var _Objectjumpingflag = $30
.var _Yobject $40

Do_jumping:
lda _Objectjumpingflag
bne Objectvelocity
lda #Button
bit _joypad
beq JumpngExit
bit _oldjoypad
bne JumpngExit
do_initObjectjumping:
lda #4
yu:
sta _blobvelocity
lda #44
sta _blobconstgravityf
ldx #0
stx _blobgravityf
inc _blobjumpingflag
Objectvelocity:
ldx #0
lda _blobvelocity
cmp #$fc
bne Objectvelocitycont
stx _blobconstgravityf
Objectvelocitycont:
lda _blobgravityf
sec
sbc _blobconstgravityf
sta _blobgravityf
lda _blobvelocity
sbc #0
sta _blobvelocity
lda _Yobject
sbc _blobvelocity
sta _Yobject
Objectfeetchk:
lda _Playerdeathflag
bne JumpingExit
; jsr do_Objectfeetchk
JumpingExit:
rts