Jump to content
IGNORED

How to re-position sprites mid-screen?


Dr. Kylstein

Recommended Posts

I want to have multiple rows of enemies that the player must dodge, like the cars from Frogger, except that my player has per-pixel movement. From the look of the horizontal positioning code I've borrowed, it looks like I need (nearly?) a whole line to re-position the second sprite. Is there a trick I'm missing, or do I need to go to two-line? I'm using DPC+.

Link to comment
Share on other sites

You will need at least one scan line for repositioning. But there are some ways to utilize that scan line at least partially. E.g. you can write two (or more) repositioning codes, one for positioning on the left half and one for positioning on the right half. Then you can utilize about half the scan line for other stuff (e.g. drawing the other player).

 

I don't understand why you think you have to go two line.

Link to comment
Share on other sites

I use 11 reposition routines per player (so 22 in all) in Frantic and Space Rocks to reposition the sprites. Those links are to the specific categories in my blog, most of the posts contain the source for that date's version. Later versions of Space Rocks are heavily optimized so it would probably be easier to understand the earlier versions.

 

Both projects include an Open Office spreadsheet that shows the cycle breakdown. I've attached it as a PDF in case you don't have Open Office installed.

 

Cycle position.pdf

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...