kisrael Posted January 15, 2018 Share Posted January 15, 2018 (edited) So, here's a stripped down version of my golem moving - the most relevant bit is this loop, which I do to erase all the old squares of it and then again to put them in the new place cursorX = golemX cursorY = golemY for counter = 0 to GOLEM_END cursorX = golemShapeX[counter] cursorX = golemX + cursorX cursorY = golemShapeY[counter] cursorY = golemY + cursorY pfpixel cursorX cursorY on next counter GOLEM_END is 21 (because golemShape data goes up to 22) If i set GOLEM_END to like 10, things are fine. Am I running into a simple out of time problem, so dropping a frame? Trying to confirm that is the problem, and ways around it: * maybe sread() is more efficient? * maybe drawing pixels "hardcoded" (though each would be an offset from golemX and golemY) and/or doing pfvlines would be faster? * in theory i could just used fixed playfields for a set number of positions of the golem, and do a full screen clear Of course there's always * just accept the screenflick and say the earth shakes as the golem walks I don't know if a hardcoded set of draw instructions (maybe even pfvline ) would be more efficient, or if I should draw it once wallshaker.bas wallshaker.bas.bin Edited January 15, 2018 by kisrael Quote Link to comment Share on other sites More sharing options...
kisrael Posted January 15, 2018 Author Share Posted January 15, 2018 Quick answer: unrolling the loop, so to speak, and setting the pfpixels I want "by hand" seems to work better Quote Link to comment Share on other sites More sharing options...
bogax Posted January 16, 2018 Share Posted January 16, 2018 sped it up a little, but not enough wallshaker_mod_01.bas wallshaker_mod_01.bas.bin Quote Link to comment Share on other sites More sharing options...
kisrael Posted January 16, 2018 Author Share Posted January 16, 2018 Thanks for looking! Made a lot of progress yesterday, with the "unpacked to a lot of inc/dec" version. Still getting the odd blank frame, and still a bit more code to write, but we'll see Quote Link to comment Share on other sites More sharing options...
bogax Posted January 16, 2018 Share Posted January 16, 2018 If you can clear the whole screen instead of just the Golem wallshaker_mod_02.bas wallshaker_mod_02.bas.bin 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.