Lillapojkenpåön Posted January 27, 2019 Share Posted January 27, 2019 (edited) After I've got the closest pfpixel value in var1 var1 = (ballx-18)/4 can I convert it back to a regular position? If i now want the ball to exactly line up or overlap that pfpixel. I could do it with a table indexed by var1 but if there's some + something * something calculation that would be alot easier. SOLVED ballx=(var1*4)+17 Edited January 27, 2019 by Lillapojkenpåön 2 Quote Link to comment Share on other sites More sharing options...
+Gemintronic Posted January 30, 2019 Share Posted January 30, 2019 Of course, depending on which section of the screen your var is it may be reversed. Bogax made a function with DATA tables that flipped the values around in that case. I used it in my Rat Race mock up here: http://atariage.com/forums/topic/218190-smooth-vertical-scrolling-from-data-want-4-way/ R.T.s explanation of why some vars values are reversed: http://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#playfield Quote Link to comment Share on other sites More sharing options...
Lillapojkenpåön Posted January 30, 2019 Author Share Posted January 30, 2019 Hmm, do I need to worry about that with the DPC+ kernel? the horisontal pfpixel positions are 0-31 in correct order, it has worked perfectly so far. On a side note I think DPC+ uses the vars to, I renamed a freed up variable to "var10" and after leaving my game on over the night it had two columns of pfpixels turned on, exactly where var10 is located on RT's chart, it got me thinking of how many extra variables you could possibly get if that's the case, if your background and playfield colors are the same it wouldn't matter if pfpixels where turning on and of, you wouldn't see it. 1 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.