Jump to content
IGNORED

Maximum taller possible to 4soft sprites


Recommended Posts

O.K. This had been talked many, many times and from me probably even more than from all the others together ;) :) !...

So I hope that it is the last time and I can have an answer that helps me.

 

SCREEN:

-> Antic4

-> 25charlines where 20 are the scrolling ones and the other 5 are static for the status area

-> Status: charset0

-> Scrolling using alternating charsets like:

charline1=charset1

charline2=charset2

charline3=charset3

charline4=charset4

Then it repeats again charsets1->4 four more times the same way (that is the scrolling 20charlines)

I now wanna have 4soft sprites in [3chars + 1char_shifting] wide each.

If I wanna have the soft sprites moving 4ways (then needing vertical and horizontal one more char for the shifting) and they can overlap between them , then how much tall/chars maximum each of them I can get?

In PAL and NTSC but also these two if the scrolling part are in 32 or are in 40Bytes wide screen modes?

 

P.s.- I wanna add one PM on each but the bitmap masking is only needed to be done on the soft sprites (PM0->PM3 just pass above or under according to the pre-set Hardware PMGs Priority).

Edited by José Pereira
Link to comment
Share on other sites

Limitation would be the CPU time involved in rendering the sprite.

 

If it's a 2 char wide thing (in other words, rendered to 3 chars wide most of the time) then probably somewhere in the 12-15 chars high would be the limit assuming not much other stuff needs to go on.

 

Also, WTH would you do Charset1, 2, 3, 4, 1, 2, 3, 4 etc on a screen like that instead of 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4 etc?

Link to comment
Share on other sites

Because that is a way I found some years ago to have less needed chars for each soft sprite in each charset.

Let me explain:

If here I have those 4soft sprites in 4charsets alternate and each soft sprite it's [(3+1_shifting)chars wide + (3+1_shifting)charlines tall] then at whatever (x,y) position they are the 4 will ever use only a total of 16chars.

But in your way if you have each charset in 4 consecutive charlines then if all the 4soft sprites are in the same charset then you waste the same 16chars just for one, so the 4 would be 4x more needed and so on...

In my way, if cpu allow, for example, 8 will only use 32chars leaving 96chars free for the gfxs where in yours you had just wasted the entire A8 128chars=1charset.

 

 

P.s.- I wanna really know how much maximum chars taller to 4soft sprites but need to be in [3+1_shifting]chars wide.

Thanks.

Link to comment
Share on other sites

The limitations using 4 charsets will be the same regardless of how you interleave the character sets on the display.

 

The limitation of how much softsprite area you can render is similar also regardless of how many objects.

Having 1 big softsprite would allow more area than 2 or 3 smaller ones as the overhead is slightly less, but it wouldn't be by a lot.

 

Regardless of how many softsprites, there is extra processing when you have multiple charsets like you specify. Both in DLI to change them, and in rendering since the routine has to work out the target for each row of data.

 

Biggest overhead though in softsprites is the overall merge with background operation. Possibly some savings can be had on very large softsprite if it has solid areas that will always occupy the whole character and not need showing any background data - if there's enough of those types then it can be worth testing for, then the rendering can be straight up without needing to merge with the background.

Link to comment
Share on other sites

Short answer as for the moment, going to bed soon.

Maximum should be 4 char lines. After that they kinda overlap the chars.

 

Rybags, you do save chars with this method.

Heli has 6 8x16 sprites and uses only 18 chars instead of 54!

 

At the cost of 3k more memory for the additional sets and some cycles for DLI.

However you need the DLIs for multiplexing PMG overlays anyhow.

The rendering is slightly faster as you do not have to advance the pointers. The setup is a bit more complex. But having more then 48 tiles for gfx is all worth it. Look at the gfx from Heli :-)

  • Like 3
Link to comment
Share on other sites

  • 4 weeks later...

The limitations using 4 charsets will be the same regardless of how you interleave the character sets on the display.

Jose really surprised me with that idea when he wrote about that for the first time :)

As Creature XL mentioned - it does save characters per charset.

As long as sprites are not higher than 4 chars, you only need couple of chars per sprite (depending on width of sprite).

 

For something like 8 sprites per line with 3 chars width, you would need only 8x4=32. Instead of 8x4x4=128 in 'standard' method.

And with rest of charsets containing same graphics, you can still use them for fast, "character sprites" (bullets and such).

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