Let me try to explain.RE librarys/dlls. SO Express c# can do libraries, but ppc apps cant use libraries??
Already got colour, need an additional array for spread - easy.Firstly a ELEMENTS() array defining the color, spread attributes of particles 0 to MAXELMENTS
I don't think you realise the implications of this. At present each particle is treated individually. The only way they can "meet" at the moment is when they ovelap due to spreading. There is no provision for static "objects" for particles and the library fiddles with the array and moves particles around to keep the array compacted. I could go on ... but I'll be interested to see your C# "psuedo code" in case you've got some ideas that I haven't thought of.A rules table rules(MAXELEMENTS,MAXELEMENTS)
which has arguments saying what happens when two colored particles meet
ChangetoElement, dx, dy is all it will need
Sorry Colin but I don't get this. Arrays don't HAVE arguments. What do you really mean?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
I did NOT say it couldn't be done. I saidI find it quite amusing that some members of this forum said that this program couldn't be done.
which is exactly what is now happening! - with my help I may add.So I am afraid that the bottom line is that to get a viable BS to run under B4PPC you would have to write it in a library
Exactly right. A two-dimensional array of structures is required, which compiles down to arrays of array (i.e a three-dimensional array). B4PPC can manage this but I will have to ask Erel if it can successfully pass it to a library as I can think of a possible typing problem here.maybe structure is the right word
It's best not to update existing posts - notifications don't seem to get sent so no-one may see it. I only just saw this re-reading your bit about rules.Update- what does that FromArgb( col) change do? Does C# store colours as doubles? Does .Net have a RGB function?
Its C# not C and it's the right code, I just downloaded and checked.Brilliant! Can u post the updated C code, the one in the zip didnt seem to have all the code?
You are right, that is wrong. The exit value of the loop iterator i will be n on exit but the highest value the inside of the for loop sees is n-1. Amended stuff attached.in the loop i<n does that mean the final value will be n or n-1? the reason I ask is in the destroy pixel bit shouldnt it be
spread(i)=spread(n-1)
it currently says=spread(n)
as px(i) etc are passed over as the n-1 argument?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?