 fluff
Kirk Bender, SCEA
4/25/03

Entry in SCEA 2003 Developers Conference VU coding competition

A simple VCL program to draw lots of bouncy points

I wrote this very very hastily on PS2 Linux just to increase the 
number of entries in the competition and to make a VCL sample.

Highlights:  
--Gave up on the built in VU random number generator and used 
Stewart's instead.   
--Used VU clipping instructions to bounce off the walls.
--Vector for each point stored in memory as position x, position 
y, delta x, delta y:  16 bytes/ vector, so in the vu's 16K we 
store 1000 points, leaving a little extra to play with.
--Point primitives: fortunately point primitives are fast 
enough, but if they were triangles we'd have to do double 
buffering of the primitives, otherwise a packet might be 
overwritten while waiting for the GS to finish the previous 
packet.  So we just do single buffering, kick, and forget about 
it.
--Uses constants loaded in the VCL program as well as a separate 
assembler file for the data.

I didn't have time, but I wanted to make a wall in the center of 
the screen with a gap in it, then put all the points on one 
side, give them a high velocity ("pressure") and watch them spew 
out through the gap.  I'll leave that as an exercise for the 
reader.




