tschak909 Posted August 17, 2016 Share Posted August 17, 2016 Hi guys, Am currently trying to perfect the basics of player, missile, and ball motion. Right now, I have a ball which is rendering correctly at 2 clocks by two scanlines, but due to the way I am quantising the ENABL strobing (by ANDing #$FC), I get a ripple when I increase X by 4 lines each time. What...should I be doing in addition to what's being done here? -Thom enc: Code attached. scratchpad.asm Quote Link to comment Share on other sites More sharing options...
Mr SQL Posted August 17, 2016 Share Posted August 17, 2016 Can you post the version with the ripple for comparison? Quote Link to comment Share on other sites More sharing options...
Omegamatrix Posted August 17, 2016 Share Posted August 17, 2016 Try doing what vdub_bobby does here. lda BallHeight dcp BallY sbc BallAdjuster sta ENABL ;+14Where BallAdjuster = BallHeight - 2 The beauty is your ball is always the same size, so it can be simplified to just 12 cycles: lda #3 dcp BallY sbc #1 sta ENABL ;+12 Quote Link to comment Share on other sites More sharing options...
tschak909 Posted August 18, 2016 Author Share Posted August 18, 2016 What a clever piece of code! How in the hell does that work?! I had to consistently re-set BallY in my vblank, because the dcp destroys the Y position, as it scans-out, but it works beautifully. -Thom Quote Link to comment Share on other sites More sharing options...
tschak909 Posted August 18, 2016 Author Share Posted August 18, 2016 This seems to work for missiles, too. How will this be affected if I put this in a 2LK? -Thom Quote Link to comment Share on other sites More sharing options...
tschak909 Posted August 18, 2016 Author Share Posted August 18, 2016 nevermind... I see the result... Going to see what I can do to make it better...will post here anyway... scratchpad.bin scratchpad.asm Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.