scene.org File Archive

File download

<root>­/­demos­/­compos­/­codecraft2­/­1k/betaballs.zip

File size:
8 045 bytes (7.86K)
File date:
2014-10-10 23:02:19
Download count:
all-time: 40

file_id.diz

name:    Beta-Balls
author:  casma (mark adcock) mailto:adcock@intonet.co.uk
size:    1012 Bytes 
needs:   arm6 (You can make an arm2 executable if you want), 128k-ish 
descr.:  Interactive Mouse controlled Meta-balls

 -----------------------------------------------------------------------[§]

This program gives you a few meta-balls to play with. I've called it Beta-
Balls because it's more beta than anything else...

To move the balls you can bash them with the mouse pointer. The balls will
cluster together by themselves without any intervention by the way.

*************************** !.·.ImPoRtAnT.·.! ****************************
*The executable given plots 8 balls. This is a reasonable number for an  *
*ARM3. For my ARM7 I can get up to 12 with a reasonable frame rate. For  *
*StrongARM I would reckon 24 or so. The ffb 'source' expects to find     *
*Squasher in the CSD.                                                    *
**************************************************************************

    cOdE dEtAiLs:                        
* The meta ball plotter is done using code generated at runtime (but before
the mainloop of course). This is about 50% quicker than a normal plotter!
For the center bits of the circle we only need one store per pixel, and we
speed it up even more by using a Fast Horizontal Line Plotter (pokes word-
aligned words where it can). For the transparent parts, one load and one
store are required per pixel. We can skip over the unaltered parts of the
square by a simple increasing of the write address.
* btw, the routine to attract the blobs together is (loosely) based on the
code in Springs1k, another 1k entry for cc#2.

    FiLeS iNcLuDeD:
$.ReadMe          -  this file
$.Beta-Balls      -  8-ball executable
$.more.source     -  source code

    CrEditZ/thAnKs:
  * ExtBasAsm for the div command...
  * Squashed with ... (wait for it) ... Squasher (!) by Pervect/Topix
  * Thanks to baah for the rnd generator in 8 bytes:
        {r5 = rnd number in}
      eor         r5,r5,r5,rrx 
      adc         r5,r5,r5,ror #7
        {r5 = rnd number out}  

 ---CUo--------------------------------------------------------casma-------