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 > Software sprites....
2006-04-24 10:16
PopMilo

Registered: Mar 2004
Posts: 145
Software sprites....

Does anybody have any expirience with software sprites?
Bobs?

In hires or char mode?

Games I susspect have something to do with software sprites:

Cybernoid for bullets...
Last ninja for masking main character (its not a software sprite, only hardware one masked, to show visibility...)
karnov
Astromarine corps
..,

What is record for these?
 
... 111 posts hidden. Click here to view all posts....
 
2006-04-27 05:14
Oswald

Registered: Apr 2002
Posts: 5031
cadaver, a 256 byte table would only work for 8 pixel wide objects.

popmillo there's no ultimate fastest way, it all depends on what you want to do.

check tower power / camelot which has IMHO the best done hires 8x8 bobs. (maybe not the fastest but hundreds of bobs without music in a sine to make a world record is boring).

anyhow the fastest way is to have predefined speedcodes for each shifted version of the object, and use hires mode, so u only have to do ORAs, multicolor is atleast twice as slow.

fastest one should look like:

lda #preshiftedshape
ora screen,y
sta screem,y

where Y holds your Y coord. Also its a good idea not to clear the entire screen, but only the bobs which were drawn.
2006-04-27 09:32
cadaver

Registered: Feb 2002
Posts: 1154
Oswald: naturally results from adjacent data bytes would have to be combined. In addition with masking, this would not be so hot either, yes :)
2006-04-27 13:04
PopMilo

Registered: Mar 2004
Posts: 145
If:
Sprite is defined in two columns (16 bytes a column) (where address of spr1= spr0+16) like this:

spr0 spr1
---------
xxxx xxxx
xxxx xxxx
xxxx xxxx
xxxx xxxx
...

And Character buffer 3x3 chars is in three columns (24 bytes each) like this

ch0 ch1 ch2
---------------
xxxx xxxx xxxx
...

which is:

char0 char3 char6
char1 char4 char7
char2 char5 char8

And there are two tables of 256 bytes. Each is representing left part (table "shl") and right part ("shr") of shifted byte

example:

for index 255, and case where desired shift is 2 bits
(shl+255) (shl+255)
00111111 11000000

(there would be 3 tables for each shift, for shift 2,4,6...) shift zero is special case, and I think it would be good to make separate routine for those cases... Its simple copy in that case.

-----------------
Would this be ok?

ldx spr0,y
lda shl,x
sta ch0,y
lda shr,x
ldx spr1,y
ora shl,x
sta ch1,y
lda shr,x
sta ch2,y

offcourse, ch0,1,2 would be address of char0,1,2 +(sprite.y and 7) before calling this routine
2006-04-27 13:45
Oswald

Registered: Apr 2002
Posts: 5031
looks correct.

is this for some game project?
2006-04-27 13:55
PopMilo

Registered: Mar 2004
Posts: 145
Well... I'm thinking how to improve graphics a bit...

I thought if I combine software and hardware sprites, I can make pretty nice graphics...

Always wanted to do some cool platform game. Imagine game like creatures but if every sprite was with additional black hires layer. Something like Rick in Rick dangerous...

p.s. And then make a game like Turrican with this graphic :)

or some shooter....
2006-04-27 14:52
cadaver

Registered: Feb 2002
Posts: 1154
Hmm, would this require bitmap mode and AGSP scrolling to be usable? I mean, Bubble Bobble gets away with the bubbles, because each level's graphics require only a couple of different chars. But for something Turrican-like you need a fairly large charset. Even taking away 64 chars can make the charset too simplistic/crap looking (I know for doing it in MW1 & 4 :))
2006-04-27 16:56
T.M.R
Account closed

Registered: Dec 2001
Posts: 749
Don't forget the CPU overhead of hammering in all those software sprites, Turrican moves a lot of stuff around!
2006-04-27 21:38
PopMilo

Registered: Mar 2004
Posts: 145
Quote: Don't forget the CPU overhead of hammering in all those software sprites, Turrican moves a lot of stuff around!

Ok :)

I'm know I can not even come close to Turrican when level size, speed and bunch of stuff its doing is considered...

If I would make a hero jump around, shoot some bulletts at some nicely drawn nasties, and if they are little harder to kill then in Turrican maybe it would be interesting enough to play for a while...

And maybe its just because nobody done this before.. (correct me if I'm wrong)

I havent tought about scrolling yet. I know it would be nice.

If I try these software sprites in char mode:
They are faster, scrolling is easyer but less colors, less background details...

If I try these software sprites in bitmap mode:
Slower, tough scrolling (I know Stormlord and Fred's back did it) but much more color, and so, so many more details...

Hope Ill have time next few days to come up with some demo...
2006-04-27 21:41
PopMilo

Registered: Mar 2004
Posts: 145
@ T.M.R.

By the way, I think I red your posts on Atari forum about scrolling and sprites ?

Maybe there is some interesting stuff in those Atari routines ?

I just found this thread:

http://www.atariage.com/forums/index.php?showtopic=66811&hl=spr..

looks interesting...
2006-04-28 01:33
T.M.R
Account closed

Registered: Dec 2001
Posts: 749
i've been involved in a few discussions on Atari Age yeah; a lot of the time it's been me saying "it's not possible to do X and Y at the same time" and everyone else saying it can be done but not producing sample code... =-)
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 - Next
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
JCH/Vibrants
iAN CooG/HVSC
Retroluzzer/Quantum
St0rmfr0nt/Quantum
Linus/MSL
skull
Guests online: 127
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.7)
5 Edge of Disgrace  (9.7)
6 No Bounds  (9.6)
7 Aliens in Wonderland  (9.6)
8 Comaland 100%  (9.6)
9 Uncensored  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 It's More Fun to Com..  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 TRSAC, Gabber & Pebe..  (9.5)
7 Rainbow Connection  (9.5)
8 Dawnfall V1.1  (9.5)
9 Daah, Those Acid Pil..  (9.5)
10 Birth of a Flower  (9.5)
Top Groups
1 Nostalgia  (9.4)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 SHAPE  (9.3)
Top NTSC-Fixers
1 Pudwerx  (10)
2 Booze  (9.7)
3 Stormbringer  (9.7)
4 Fungus  (9.6)
5 Grim Reaper  (9.3)

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