Jump to content
IGNORED

running out of time or what?


kisrael

Recommended Posts

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 :-D

 

 

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 by kisrael
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...