Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Maximum number of sprites
2006-02-06 06:45
Wisdom

Registered: Dec 2001
Posts: 90
Maximum number of sprites

Hello,

What is the maximum possible number of sprites on a PAL C64 at once?

There are a couple of numbers about this (based on 312 rasterlines);

1) 112 non-clipped sprites,
2) 112 non-clipped sprites + 8 clipped ones,
3) 144 sprites with 17 pixels height (Crossbow).

Which one would be of general acceptance as the maximum?

And, does the 3rd one really count, as it introduces another limit while trying to remove the other?

Is there any other 'legal' record around that I may not be aware of?

I would like to hear your comments. Thanks.
2006-02-06 08:06
MRT
Account closed

Registered: Sep 2005
Posts: 149
Well, if you remove the upper and lower borders, and you take into account that once a sprite is beeing drawn, you can't change the y-pos of the sprite... It's a simple calculation of available rasterlines / minimal sprite height times eight, I guess...

So with,
$120 rasterlines
$15 sprite height
8 sprites per rasterline
it should be... 110 sprites...

Hmm, is this correct???
2006-02-06 08:16
MRT
Account closed

Registered: Sep 2005
Posts: 149
3) 144 sprites with 17 pixels height (Crossbow).

How did crossbow do the new sprite height? My experience with sprites is, that once the VIC has started to draw the sprite, you can do whatever you want with the sprite's y-pos but nothing happens until the vic has finished drawing the sprite. After that you're free to move the sprite's y-pos again until the vic starts to draw it again...

So, if you want to draw more sprites, you have to be able to move the sprite's y-pos before the vic has finished drawing it.

How did he do this?
Is this done by fiddling with the vertical sprite expand ($d017)?
2006-02-06 08:37
HCL

Registered: Feb 2003
Posts: 728
Hmm, how did you get 110!??! :). Guess you mean int($120 / $15) * 8, which is 104 sprites.

To get 144, look for "sprite crunching". It has been discussed on several threads already..

By the way, that 120-sprite record is just nonsence to me. Crossbow himself says that only whole sprites should be counted, so why suddenly bother to count clipped ones!?!?
2006-02-06 09:46
Cruzer

Registered: Dec 2001
Posts: 1048
I think the 120 sprites record in "Ice Cream Castle" is pretty clever. AFAIK the sprites are not clipped, but they all move 3 pixels down each frame, so when a sprite is displayed, there is 312 + 3 rasterlines until it will be displayed again. And coincidently ((312 + 3)/21)*8 = 120.
2006-02-06 12:35
HCL

Registered: Feb 2003
Posts: 728
It's more like a mathematical trick. Moving the sprites down makes them clipped, so they should not count according to master crossbow. Iterating 21 frames will of course result in showing each sprite 312 times. The only thing you can say about the amount of sprites on the screen it that each sprite is shown 14.857 times on average each frame. Not 120 in my world.
2006-02-06 12:44
Oswald

Registered: Apr 2002
Posts: 5094
all your clipped sprite are belong to us
2006-02-06 12:48
HCL

Registered: Feb 2003
Posts: 728
Whata aapaned?

Someone setus uppa di sprite!
2006-02-06 12:49
Mason

Registered: Dec 2001
Posts: 461
About the sprites I cant remember the exact words Hungry Hero wrote, but try to find Showcase Bonanza from Miracle and read his words.

Not sure if its any help, but he explains something about numbers and so.
2006-02-06 13:27
Graham
Account closed

Registered: Dec 2002
Posts: 990
In case you also count the clipped sprites it's 128 sprites per frame and not 120. Or why do you only count the clipped sprites at the bottom and not the top?
2006-02-06 15:02
Wisdom

Registered: Dec 2001
Posts: 90
I just wrongly termed it. Actually I was referring to that part in Ice Cream Castle, as Cruzer put.

So, the real question is; does that 144 sprites thing really count? (As in that case sprites are not full but crunched.)
2006-02-06 15:33
Cruzer

Registered: Dec 2001
Posts: 1048
Of course the 120 sprites is cheating, but cool cheating if you ask me... Anyway, the max amount of full-fledged sprites is definitely 112, unless you only count the number of visible lines, in which case it's less, depending on what screen you use... Does crunched sprites count? I would say yes, since it's still independent sprites, that are just smaller.
2006-02-06 15:39
HCL

Registered: Feb 2003
Posts: 728
@Graham: Me? I never said that Crossbow ever made more than 104 *whole* sprites ;). Well, 112 *some* frames perhaps..

Counting the amount of sprites is really quite rediculous, since it can never be more than (screen size)/(sprite size). Either counting clipped ones or not.

Nevertheless, those 144 were rather entertaining :).
2006-02-06 19:10
TDJ

Registered: Dec 2001
Posts: 1879
There's only one sprite, and her name is Kitty Pryde!
2006-02-06 20:10
Oswald

Registered: Apr 2002
Posts: 5094
Quote: Of course the 120 sprites is cheating, but cool cheating if you ask me... Anyway, the max amount of full-fledged sprites is definitely 112, unless you only count the number of visible lines, in which case it's less, depending on what screen you use... Does crunched sprites count? I would say yes, since it's still independent sprites, that are just smaller.

based on that, I could say that I make a multiplexer of 1 pixel high sprites. What.. ? Cheating.. ? why, they're still independent sprites, that are just smaller.
2006-02-06 21:12
dalezy

Registered: Apr 2002
Posts: 476
Quote: There's only one sprite, and her name is Kitty Pryde!

!
2006-02-06 21:22
_V_
Account closed

Registered: Jan 2002
Posts: 124
Well, actually, 1 pixel high sprites are not a bad idea. Give them a 1x5 resolution, so that we have 32 bitcode possibilities for letters and a few symbols(00000=SPACE, 00001=a, 00010=b, etc...). Then, it is possible to create a cool and highly readable uberspritescroller consisting of (taking a base grid of 8x14 normal sprites) 294x8 = 2352 one-line-sprites. Sounds pretty sweet to me ;).
2006-02-06 23:03
Dane

Registered: May 2002
Posts: 423
Quote: There's only one sprite, and her name is Kitty Pryde!

:D :D :D
2006-02-07 07:44
HCL

Registered: Feb 2003
Posts: 728
You can not crunch a sprite down to one pixel. Oh well, you can try :). A sprite defines a graphical area which can be assigned independant x- and y-positions.
2006-02-07 08:30
Cruzer

Registered: Dec 2001
Posts: 1048
Quote: You can not crunch a sprite down to one pixel. Oh well, you can try :). A sprite defines a graphical area which can be assigned independant x- and y-positions.

But then multiplexed sprites doesn't count at all, since they can't have completely independant y-positions. Guess we're back at 8. :)
2006-02-07 08:37
TDJ

Registered: Dec 2001
Posts: 1879
Quote: But then multiplexed sprites doesn't count at all, since they can't have completely independant y-positions. Guess we're back at 8. :)

Which just happens to be *my* personal record. Go figure.
2006-03-26 20:59
kamelito
Account closed

Registered: Mar 2006
Posts: 14
Quote: But then multiplexed sprites doesn't count at all, since they can't have completely independant y-positions. Guess we're back at 8. :)

Execpt if the others sprites move to another Y position. :)
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Unlock/Padua/Albion
goerp/F4CG/HF
Felidae/Reflex
The Syndrom/TIA/Pret..
REBEL 1/HF
Guests online: 111
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 The Demo Coder  (9.6)
6 Edge of Disgrace  (9.6)
7 What Is The Matrix 2  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 X-Mas Demo 2024  (9.5)
7 Dawnfall V1.1  (9.5)
8 Rainbow Connection  (9.5)
9 Onscreen 5k  (9.5)
10 Morph  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Coders
1 Axis  (9.8)
2 Graham  (9.8)
3 Lft  (9.8)
4 Crossbow  (9.8)
5 HCL  (9.8)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.076 sec.