Commodore 64 (C64) Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
sprite multiplexer question...
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Commodore 64 (C64) Forum Index -> Help & Support
View previous topic :: View next topic  
Author Message
WVL_KsZeN
Groupie
Groupie


Joined: 17 Jun 2004
Posts: 184

PostPosted: Tue Nov 09, 2004 10:51 am    Post subject: Reply with quote

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 Smile
Back to top
View user's profile Send private message Visit poster's website
cbmeeks
Master of C64
Master of C64


Joined: 22 Oct 2004
Age: 39
Posts: 1070
Location: Hixson, TN USA

PostPosted: Tue Nov 09, 2004 1:54 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Zub
Über Groupie
Über Groupie


Joined: 29 Jan 2003
Posts: 307
Location: Pamplona (Spain)

PostPosted: Wed Nov 10, 2004 8:24 am    Post subject: Reply with quote

Double Dragon 3 is a fair example. Have a look to its IRQ code, it's quite easy to understand.
Back to top
View user's profile Send private message Send e-mail
WVL_KsZeN
Groupie
Groupie


Joined: 17 Jun 2004
Posts: 184

PostPosted: Wed Nov 10, 2004 9:46 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
cbmeeks
Master of C64
Master of C64


Joined: 22 Oct 2004
Age: 39
Posts: 1070
Location: Hixson, TN USA

PostPosted: Wed Nov 10, 2004 5:32 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
puterman
Groupie
Groupie


Joined: 26 May 2002
Posts: 224

PostPosted: Thu Nov 11, 2004 10:51 am    Post subject: Reply with 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.
Back to top
View user's profile Send private message
Lasse
C64 Games Programmer
C64 Games Programmer


Joined: 07 Jan 2002
Posts: 2181
Location: Finland

PostPosted: Thu Nov 11, 2004 11:05 am    Post subject: Reply with quote

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.. Very Happy
Back to top
View user's profile Send private message Visit poster's website
hintenanstellen
Groupie in Training
Groupie in Training


Joined: 28 Aug 2003
Age: 39
Posts: 141
Location: Baden Württemberg

PostPosted: Thu Nov 11, 2004 11:05 am    Post subject: Reply with quote

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
View user's profile Send private message
Fröhn
Grandmaster of C64
Grandmaster of C64


Joined: 13 Jan 2003
Posts: 1950

PostPosted: Thu Nov 11, 2004 11:06 am    Post subject: Reply with quote

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
View user's profile Send private message
TNT
Administrator
Administrator


Joined: 09 Feb 2003
Posts: 4186
Location: HML, Finland Favorite games: H.E.R.O., Paradroid, Thrust

PostPosted: Thu Nov 11, 2004 11:49 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
cbmeeks
Master of C64
Master of C64


Joined: 22 Oct 2004
Age: 39
Posts: 1070
Location: Hixson, TN USA

PostPosted: Thu Nov 11, 2004 3:11 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
WVL_KsZeN
Groupie
Groupie


Joined: 17 Jun 2004
Posts: 184

PostPosted: Thu Nov 11, 2004 4:02 pm    Post subject: Reply with quote

@cbmeeks :

with sprite1 and sprite2, i do mean the same physical sprite, just different sprite images...
Back to top
View user's profile Send private message Visit poster's website
cbmeeks
Master of C64
Master of C64


Joined: 22 Oct 2004
Age: 39
Posts: 1070
Location: Hixson, TN USA

PostPosted: Thu Nov 11, 2004 8:17 pm    Post subject: Reply with quote

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

cb
Back to top
View user's profile Send private message Visit poster's website
Lasse
C64 Games Programmer
C64 Games Programmer


Joined: 07 Jan 2002
Posts: 2181
Location: Finland

PostPosted: Thu Nov 11, 2004 8:29 pm    Post subject: Reply with quote

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 Very Happy
Back to top
View user's profile Send private message Visit poster's website
puterman
Groupie
Groupie


Joined: 26 May 2002
Posts: 224

PostPosted: Fri Nov 12, 2004 11:31 am    Post subject: Reply with quote

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! Smile
Back to top
View user's profile Send private message
cbmeeks
Master of C64
Master of C64


Joined: 22 Oct 2004
Age: 39
Posts: 1070
Location: Hixson, TN USA

PostPosted: Fri Nov 12, 2004 2:21 pm    Post subject: Reply with quote

puterman: Well, it sounded pretty harsh to me...anyway, no harm no foul...
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Commodore 64 (C64) Forum Index -> Help & Support All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Tip: Get C64 Forever for super-comfy C64 emulation with pre-installed games, demos and other goodies!


Powered by phpBB © 2001, 2005 phpBB Group