Pocket Burning Sand (Open Source)

neilnapier

Active Member
Licensed User
Longtime User
Also now that we have water and fire now a reaction can be made (ie to steam)

We don't need to make any more elements right now. Once reactions are done moddability will make it easier to add the elements and will reduce the amount of coding needed (compared to having all the elements coded in)

Can anyone think of a way to sort the jumpiness of the pens for solids (ie the circles are parted)

EDIT: When you make a solid then make fire then fire becomes solid the next time you use it.

EDIT2: why is resolution and draw things gone at the bottom.
 
Last edited:

colin9876

Active Member
Licensed User
Fixed that bug in v2.09 posted above.
Just hoping AG will add those 2 gravity lnes.
Neil have u got email adress?
 

colin9876

Active Member
Licensed User
AG - brill work as always, made the changes u suggested in v2.10

Neil, need to consolodate things. Theres some bug fixes in v2.10 above that I dont want to loose so can u load the icons into that then send it back to me with
{
The source
The images it needs
The bithandler library
}

Then I will carry on from there

Sorry to ask but its tricky doing everything without a pc
 

neilnapier

Active Member
Licensed User
Longtime User
Liquids are still glitchy when it comes to reversing the gravity.
Due to the fact that the lines will be added again the fill thing is not necissary.

Have you got the icons for fire and snow from the zip yet?

This program has expaned hugely in the last few days. Once some of the more minor bugs are worked out I will officially re release it (Ie updating fist post and posting it on the other forum)

EDIT: Are the elements still working using colours?
 
Last edited:

colin9876

Active Member
Licensed User
Array size

Neil also when ur making those changes into v2.10 can u alter all the
32000 in the DIM statements to 8000 thanks.
 
Last edited:

agraham

Expert
Licensed User
Longtime User
With the increase in drawing capability in the library the device cannot generate enough particles in B4PPC code so I have provided a particle generator routine in the library and took the opportunity to tidy up the parameter lists to move static stuff to the constructor as things have grown a bit unwieldy.

Pass the arrays in once rather than every time to save overhead
new1(Bitmap, backcol, top, left, bottom, right, px(), py(), pcol,(), pspread(), pgravity())

Generate new particles
int AddElement( n, pnum, pen, x, y, col, spread, gravity)
pnum = number of particle to generate, pen = size of pen, rest obvious hopefully! You need to save the return in n
n = bh1.AddElement( n, ... )

Sparse timer call
n = bh1.timer(n)
 

colin9876

Active Member
Licensed User
ok, will use that but can u explain 3 things in the prev lib?
1) what does byte* pixel= bptr +y*stride+ x*3 ... do?
2) what does col <<8 +*pixel-- do??
3) Lockbits,Lockmode, scan0?

Can't get my head round this C#
 
Last edited:

agraham

Expert
Licensed User
Longtime User
what does byte* pixel= bptr +y*stride+ x*3 ... do?
variable pixel (a pointer to a byte) is being set to the base address of the locked bitmap + y times the length in bytes of each bitmap row + x times the number of bytes for each pixel(red, green & blue)

what does col <<8 +*pixel-- do?
shift the contents of variable col 8 places (1 byte) left and add to it the byte pointed to by the address - building a 32 bit colour value from three separate bytes. 100% opacity (Alpha) is the oxFF value of the fourth byte

Lockbits,Lockmode, scan0?
To do with locking down a bitmap so the Garbage Collector doesn't move it while we play with it then copying any change back to the original bitmap


Can't get my head round this C#
Remember - Google is your friend!
 

neilnapier

Active Member
Licensed User
Longtime User
I thought you said that it couldn't get any faster ;)

Have you thought of a way to get interactions working yet?
 

colin9876

Active Member
Licensed User
great

new library in v2.12

Neil can u compile v2.12 please & post the exe here
 
Last edited:

colin9876

Active Member
Licensed User
Thanks Neil.
Fantastic how its going, AGs latest improvement is another Bonus. It runs amazingly well on my PDA with 1000's of moving pixels!!

Im doing collisions now, its still under adjustment while Im considering various methods for the rules
 
Last edited:

neilnapier

Active Member
Licensed User
Longtime User
All elements in the PC version is written in mod format under a file called config.cfg. when the program opens it reads every line of the config and adds a new element group and interaction to the program. Each element can be put in a group or group None (non selectable).

At the end of the element line in modding you type the line:

File bla.bmp
OR
Text bla
OR
HEX Bla bla bla

Right now only file will be necessary.

So that it comes up as an element at the right hand side. The left side is purely for groups.

When it comes to modding be sure that it will be my time to shine. (and I suppose Joe's if he is willing to help)
 

colin9876

Active Member
Licensed User
Wow

Ive got PBSv2.12 running on my PDA now and its blowing me away - its fantastic. AGs library is fab, really fast. I have to admit at the start of this I didnt think it could be done!

Ive got quite a fast PDA, WM6 520MHZ, so its going very nicely. What PDA r u using?
 
Last edited:

neilnapier

Active Member
Licensed User
Longtime User
I'm using a HP IPAQ 1940 with windows 2003 running on it with a 266 MHz processor so not quite as fast as yours.

EDIT: 64MB RAM

EDIT2: I have noticed that clear doesn't work very well on liquids. (clear is the icon that is titled erase)

EDIT3: When using the largest pensize it goes out the borders of the sandbox.
 
Last edited:
Top