| View previous topic :: View next topic |
| Author |
Message |
Groupie


Joined: 17 Jun 2004 Posts: 184
|
Posted: Tue Nov 09, 2004 10:51 am Post subject: |
|
|
I've used the 'weird' sprite multiplex technique in the past for some demoparts. That way multiplexing really became a breeze.
notice btw that it doesn't cost _that_ many extra spriteimages if your objects are only 2 sprites high (in that case you need 3 sprite images).
You'll start to get problems if your objects are a lot higher, as in that case memory usage almost doubles (for 10 sprites high, you need 19 images f.e.)
I'd say : hail to easy coding and go for this  |
|
| Back to top |
|
 |
Master of C64


Joined: 22 Oct 2004 Age: 39 Posts: 1070 Location: Hixson, TN USA
|
Posted: Tue Nov 09, 2004 1:54 pm Post subject: |
|
|
does anyone know where I can get an example of a multiplexor that doesn't have a "gap" between two of the same sprites stacked? |
|
| Back to top |
|
 |
Über Groupie


Joined: 29 Jan 2003 Posts: 307 Location: Pamplona (Spain)
|
Posted: Wed Nov 10, 2004 8:24 am Post subject: |
|
|
Double Dragon 3 is a fair example. Have a look to its IRQ code, it's quite easy to understand. |
|
| Back to top |
|
 |
Groupie


Joined: 17 Jun 2004 Posts: 184
|
Posted: Wed Nov 10, 2004 9:46 am Post subject: |
|
|
an example.
situation : you have 2 sprites on top of eachother, say sprite 1 is at y-position 0 and sprite 2 is at position 21.
this is what you do.
-before position 0, you write the position of sprite 1 to the sprite register and the correct sprite image.
-between position 11 and 20, you write the position of sprite 2 to the sprite register, and swap the sprite-image to the extra inbetween sprite image.
-between position 21 and 31 you swap the sprite image to the complete bottom sprite image.
that's it.
now, if your 2 sprites look like
sprite 1 :
AB
CD
sprite 2 :
EF
GH
your inbetween sprite has to look like :
EF
CD
good luck |
|
| Back to top |
|
 |
Master of C64


Joined: 22 Oct 2004 Age: 39 Posts: 1070 Location: Hixson, TN USA
|
Posted: Wed Nov 10, 2004 5:32 pm Post subject: |
|
|
I see what you mean but I was hoping to do it with just one sprite.
A = sprite 1
B = sprite 2
A
B
A
B
I can do that all day long and create very tall sprites. What I want to do is:
A
A
A
A
with no gaps. I don't think it is even possible. |
|
| Back to top |
|
 |
Groupie

Joined: 26 May 2002 Posts: 224
|
Posted: Thu Nov 11, 2004 10:51 am Post subject: |
|
|
cbmeeks: Learn some coding before you start drawing conclusions about what's possible or not. There's absolutely no reason why this wouldn't be possible, except that you're not good enough at coding to be able to implement it. |
|
| Back to top |
|
 |
C64 Games Programmer


Joined: 07 Jan 2002 Posts: 2181 Location: Finland
|
Posted: Thu Nov 11, 2004 11:05 am Post subject: |
|
|
For the Metroid game you'd probably need nothing more than ABCDEFGHABCDEFGH reusage (ie. go round and round).
You can do gapless sprites without tricks, by timing the writes precisely. But stupid gamecoders like to avoid situations where precise timing is necessary, 'cos the situations are dynamically created and always changing..  |
|
| Back to top |
|
 |
Groupie in Training


Joined: 28 Aug 2003 Age: 39 Posts: 141 Location: Baden Württemberg
|
Posted: Thu Nov 11, 2004 11:05 am Post subject: |
|
|
| puterman wrote: | | cbmeeks: Learn some coding before you start drawing conclusions about what's possible or not. There's absolutely no reason why this wouldn't be possible, except that you're not good enough at coding to be able to implement it. |
He said, he "thinks", it's not possible... _________________
|
|
| Back to top |
|
 |
Grandmaster of C64


Joined: 13 Jan 2003 Posts: 1950
|
Posted: Thu Nov 11, 2004 11:06 am Post subject: |
|
|
i second that, puterman. theres a lot of examples that you can multiplex the same sprite vertically over and over again without gaps. best example might be old ESCOS demos, which cover the entire screen with sprites and multiplex EVERY sprite this way. |
|
| Back to top |
|
 |
Administrator

Joined: 09 Feb 2003 Posts: 4187 Location: HML, Finland Favorite games: H.E.R.O., Paradroid, Thrust
|
Posted: Thu Nov 11, 2004 11:49 am Post subject: |
|
|
| Fröhn wrote: | | i second that, puterman. theres a lot of examples that you can multiplex the same sprite vertically over and over again without gaps. best example might be old ESCOS demos, which cover the entire screen with sprites and multiplex EVERY sprite this way. |
See what Lasse had to write:
| Lasse wrote: | | But stupid gamecoders like to avoid situations where precise timing is necessary, 'cos the situations are dynamically created and always changing. |
ESCOS isn't too dynamic...
I wouldn't attempt reusing the same sprite in game environment if I had another choice. Demos are strictly controlled, and often have tweaks to avoid worst cases altogether.
Yep, multiplexing same sprite over and over again with no gaps is possible, but making it work in every possible situation (y-scroll, variable number of sprites moving vertically etc.) is nearly impossible. |
|
| Back to top |
|
 |
Master of C64


Joined: 22 Oct 2004 Age: 39 Posts: 1070 Location: Hixson, TN USA
|
Posted: Thu Nov 11, 2004 3:11 pm Post subject: |
|
|
| Quote: | | cbmeeks: Learn some coding before you start drawing conclusions about what's possible or not. There's absolutely no reason why this wouldn't be possible, except that you're not good enough at coding to be able to implement it. |
I've got 21 years of coding behind me dude. It's been years since I programmed a C64 so just because I am a little flaky on sprite multiplexers doesn't mean I don't know how to code. I've had programs publised in Amiga magazines years ago, I made a c64 display more than 30 different colors at age 11, and I have hundreds of people all over the country using software I developed with SQL, C++ and other languages.
I KNOW how to code and I am quite good at it. I love the C64 but it alone doesn't measure a man's ability....grow up ok?
-cb |
|
| Back to top |
|
 |
Groupie


Joined: 17 Jun 2004 Posts: 184
|
Posted: Thu Nov 11, 2004 4:02 pm Post subject: |
|
|
@cbmeeks :
with sprite1 and sprite2, i do mean the same physical sprite, just different sprite images... |
|
| Back to top |
|
 |
Master of C64


Joined: 22 Oct 2004 Age: 39 Posts: 1070 Location: Hixson, TN USA
|
Posted: Thu Nov 11, 2004 8:17 pm Post subject: |
|
|
| Quote: | | For the Metroid game you'd probably need nothing more than ABCDEFGHABCDEFGH reusage (ie. go round and round). |
yeah, but it would still be pretty difficult...you would have to have a good system in place because just about any sprite in Metroid can be all over the screen at any time. That is why the sprites used to flicker a lot in Metroid.
Well, MY verison of Metroid Classic (on the PC) will not suffer that problem.
cb |
|
| Back to top |
|
 |
C64 Games Programmer


Joined: 07 Jan 2002 Posts: 2181 Location: Finland
|
Posted: Thu Nov 11, 2004 8:29 pm Post subject: |
|
|
Well, it might be beneficial to make some bullets etc. with chars instead of sprites.
"just about any sprite in Metroid can be all over the screen at any time" to me, that's precisely the reason to use a general round & round plex. Zone split (reuse of one sprite) -style solutions are better for more narrowly defined cases, like the fighting games discussed.
For a lot of sprites with a general plex, see for example Ikari Warriors, or even (god forbid) Commando.. that's a lot of activity without (much) flickering.
And if you find it difficult .. look at my rants & example code  |
|
| Back to top |
|
 |
Groupie

Joined: 26 May 2002 Posts: 224
|
Posted: Fri Nov 12, 2004 11:31 am Post subject: |
|
|
cbmeeks: The discussion was about sprite multiplexing, not general programming, right? So you should interpret my statement as "learn a bit about coding sprite multiplexers before you start drawing conclusions about what's possible or not with sprite multiplexers".
As for me growing up, hehe, no way!  |
|
| Back to top |
|
 |
Master of C64


Joined: 22 Oct 2004 Age: 39 Posts: 1070 Location: Hixson, TN USA
|
Posted: Fri Nov 12, 2004 2:21 pm Post subject: |
|
|
puterman: Well, it sounded pretty harsh to me...anyway, no harm no foul... |
|
| Back to top |
|
 |
|