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: 146
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: 5094
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: 1160
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: 146
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: 5094
looks correct.

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

Registered: Mar 2004
Posts: 146
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: 1160
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: 146
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: 146
@ 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
Honesty/Covenant/Ons..
Andy/AEG
MaD ][/Starship
Alakran_64
Korodny
TBC
Guests online: 117
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.7)
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 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.044 sec.