Wow guys this is going very well. I've just tried your latest version, and wow this is drawing fast. Amazing job you made all of you. I started this with neil but didnt have much time to work on it, and didnt really had a way of moving pixel fast like you did. This will be the BEST falling sand game for the pocket pc.
Continue your awesome work guys !
When adding the interface into it everything flickers every ms. Why does it do it with the interface and not without (is it due to the memory it takes up?)
EDIT: When I press cthe clear button it stops flickering but(due to me not resetting it, I know how to do that) doesn't clear anything.
Colin - the bad news from Erel is that only one dimensional arrays can be passed to a library. You will need to pass in several "parallel" arrays of rule data indexed by a unique index for a particular interaction as I assume that rule[5,6] may not be the same as rule[6,5] or is it? Maybe limit it to 9 colours plus background and make the index rule[x*10+y] leaving unused gaps in the array if fewer colours are used.
Also I see from the Bugs forum that you have found the colour rounding problem - I was going to mention that but you got there first. In itself it is not a problem. I was going to suggest that the colours are passed as an array, Background at 0, then the library can build a Color object array of exact colurs by setting and getting test pixels of each colour. The real problem would be reversing from a Color object to an array index. I'm thinking about an efficient way to do that.
Neil, the flickering problem ur have with the interface version is due to an error in the filling=false code. If filling =false it constantly draws a invisible clear circle on the foreground.
Im changing all that right now so just hold on!
Im recontemplating the rules array too. It would have been my prefered method but now we already have so much of the info going with each pixel (e.g.pcolor,pspread) might be easier to have one more pchangeto() array that says which color it reacts with and what it changes to then we r done!
I think that needs two more arrays - one for the reacting colour and one for the result. That would only allow one interaction per particle however.
Don't worry about how many arrays are passed, there is no limit, as far as I know, to the number of parameter that can be passed to a library. Generic rules are possible if we can find an efficient back conversion from a Color to an index.
Neil, ur obviously off there on ur interface - which is great, there are a few inefficiencies, which I can just change for u & will give a faster version.
Can u post ur latest version, with all the libs, images, and the bits uve added and I'll make the changes and zip it back to u.
Here are the glitches
The pens go over icons,
You have to pick water before wall will work
Goes down too far
Clear button doesn't clear water
I don't like the way I have created the groups.
The pen sizes don't effect Water.
Also I have noticed that I added \1.bmp as the save screen thing. This sould be changed to \Start.bmp. Just so that you don't have to make it post it then post it again.
Also, how possible do you think it would be to load a saved picture?
Yeah, seem i had it too, so must have to do with imagelibex.dll the error its giving me is:
"Error loading program. \carte de stockage\PocketBS\ImageLibEx.dll"
Ohhh, i got it now.
Add this file "Pocket Burning Sand.exe.config" were you put the .exe on you PDA.
This should work, if not im gonna send you my version!
Colin - I think that I have cracked the efficient reverse colour lookup by using a hashtable so no need for "Condense" functions. I can accept an array of colours and a count and you can reference colours by their index in the array in the rules and I can take care of the actual colours on the device (I think!). I can also provide a method that returns the actual device RGB value if you need it for anything.
It works except when Itry to open the file on the PPC it says that there is not enough memeory to finish opening it. I have plently space left and only that file viewer open.
EDIT: It doesn't work on WinCE Paint either so I think there is something wrong with the file on PPC.