Pocket Burning Sand (Open Source)

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 !
 

neilnapier

Active Member
Licensed User
Longtime User
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.

It is weird that that stops it.
 
Last edited:

agraham

Expert
Licensed User
Longtime User
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.
 

colin9876

Active Member
Licensed User
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!
 
Last edited:

agraham

Expert
Licensed User
Longtime User
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.
 

neilnapier

Active Member
Licensed User
Longtime User
I sorted it by putting the line:
B4X:
BurningSand.FErase (0,0,BurningSand.Width, BurningSand.Height)
into the App_Start sub.

Then it stops flickering.

Also the 9 colours suggestion isn't very good. How are you supposed to mod if you can only use 9 elements max?
 

colin9876

Active Member
Licensed User
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.

P.s. Dont worry u'll have enough colors!
 
Last edited:

neilnapier

Active Member
Licensed User
Longtime User
He is the new version.

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?
 
Last edited:
ImagelibEx.dll dont work on my device.
I have PPC2003 and installed the basic4ppc 5.80 on the device.
do i need to install the .net cf 2 ?
 

neilnapier

Active Member
Licensed User
Longtime User
Never tried BS on my PPC since I added that, yes that is weird.
using the nonEx version as well it comes up with

Error loading Program
Line Number: 8

error description:
NullReferenceException.
 
Last edited:
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!
 

neilnapier

Active Member
Licensed User
Longtime User
Where is that file?

Also post your version anyway. Is it written in BASIC4PPC or that other one that you use?
 

agraham

Expert
Licensed User
Longtime User
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.
 
Here is the complied device .exe with the .config.

If you need everything else, just say, i'll send them to you.
 
Last edited:

neilnapier

Active Member
Licensed User
Longtime User
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.
 
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…