Search site Dead Hackers Society
Other BBSes »
 
 

Outline 2017
 

Sommarhack 2017
Demoscene   º   Coding   º   CT60   º   Buy/sell   º   Misc/crap   º   Alive magazine   º   SNDH/Tracking

Atari coding BBS
 
Compiled sprites madness!
Posted by: ggn Jun,10.2016-18:05 

So I was talking to a couple of distinguished gentlemen the other day (who shall rename nameless) and we came upon the topic of fast sprite routines. I suppose I'll spare you the details but I will outline a few simple steps to show you the evolution of some of the ideas tossed around.

1. First iteration was to preshift the sprite 16 times, then convert each frame to a soup of move.w x(a0),(a1)+ / and.w #y,x(a0) / or.w #z,x(a0) for saving background, masking and blitting the sprite.
2. An Obvious optimisation there would be to skip blank words and not mask at all when the word is full, i.e. replace the and/or above with a plain move.w.
3. Another obvious one is to extend to move.l.
4. Yet another one is to use movem.w/l for cases where it makes sense.
5. Then things started spiralling out of control when someone (all right, it was me) suggested that maybe it would be a huge win to keep the most frequently used masks in registers so they can be applied a bit faster. This implies to make a pass of the frame, keep statistics and then deciding which ones to keep.
6. Further down the rabbit hole, why not catering for .l as well as .w masks?

At the moment that's where we're at. I was just curious if anyone had any other ideas they could share. Or even a completely different approach. I suppose we could even set up a couple of test images so we could measure different algorithms if there's any interest.


So, any takers?




[All messages in this thread]

Topic Posted by  Date 
Compiled sprites madness! ggn Jun,10.2016-18:05
  Re: Compiled sprites madness! Leonard Jun,13.2016-21:44
    Re: Compiled sprites madness! ggn Jun,13.2016-22:30
    Re: Compiled sprites madness! deez Jun,15.2016-10:15
      Re: Compiled sprites madness! PeP Jun,15.2016-20:36
      Re: Compiled sprites madness! Alien / ST-CNX Jun,16.2016-02:54
        Re: Compiled sprites madness! specter Jun,16.2016-08:32


Reply to this message
Name:
Topic:
Human verification (enter the text of the ASCII-art below):

       _       _ _             _   
 _____|_|___ _| | |_ ___ _____| |_ 
|     | |   | . | . | . |     | . |
|_|_|_|_|_|_|___|___|___|_|_|_|___|
Message:




© 1994-2016 Dead Hackers Society Contact: Anders Eriksson