View Single Post
  #107 (permalink)  
Old 12-10-2007, 07:45 PM
colin9876 colin9876 is offline
Basic4ppc Veteran
 
Join Date: Nov 2007
Posts: 316
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Yep have a brill way of making it all work simply

the elements array maps the RGB colours to a simple int 0 to MAX

u know what color u are(say 5), then u look at the colour pixel ur going to on the screen(say 6) and look up rule(5,6) say
then add dx to px, dy to py, and change element type if a different element is specified.

Ive got it running in basic, it can react to all fixed objects and all other moving pixels without slowing it down
I actually could get rid of the spread parameter by combining it in a rule - but Neil wanted it

all the boundry checking can be done by adding a rule in the array too to say e.g. yellow pixels change to black space if they hit a white border

codes not long - just not sure about arrays in C#- whats the best way to pass a 2 dimentional array that has 3 arguments
rule(m,m)=int,int,int etc

Last edited by colin9876 : 12-10-2007 at 08:23 PM.
Reply With Quote