Pocket Burning Sand (Open Source)

colin9876

Active Member
Licensed User
condense fn

Ive swapped over my orignonal condense function to try out Hashing methods and Im comming to the conclusion that my condense method was faster, and better.

Condense(R,G,B)=int (R /(64)) *16 + int (G /64) *4 + int(B/64)
gives 64 possible indexs in rapid time and no need for a colors table either!

Unless Im missing something theres no available Hash function that maps large RGBs uniquely to small integers that has a 1to1 reverse look up??? so might as well use this condense method with the proviso that PSB doesnt use two v similar colors
 
Last edited:

neilnapier

Active Member
Licensed User
Longtime User
I will add your update tothe front page in one second. Perhaps that source is more the sort of thing for the tap.

Yes reactions would be very good!

EDIT: You did the pensizes the same way I was doing by blue borders on the elements.
 

neilnapier

Active Member
Licensed User
Longtime User
I will post this new one as the next update. Also don't you think that water slips too much?
 

colin9876

Active Member
Licensed User
Nice

All looks great Neil! Good stuff

Re water slipping too much what do u mean? If you have the spread value less it takes longer to level out, especially on PPC. And it is water, not a highly viscous liquid??
 

neilnapier

Active Member
Licensed User
Longtime User
Bit if souces when to be from the top to the bottom the water is spreading to much out and would cover the whole screen (if you look at BS water will go almost compleletly straight down with just a little bit spreading out)
 

neilnapier

Active Member
Licensed User
Longtime User
The system that you use for cloud is different from that to BS. For this reason I am not asking for a change in that. When the tap source is implemented then water would be needed to fall down from top to bottom along with 3 other elements.



EDIT: Clear isn't working.
 
Last edited:

colin9876

Active Member
Licensed User
no problem,

ok add the tap icon at the top with this code

style =8


Then in the timer
if n<8000 and style =8 then
n=bh1.AddElement(n,pensize,pensize,50,50,rgb(80,80,230),2,1) 'first stream from (50,50)
n=bh1.AddElement(n,pensize,pensize,80,50,rgb(230,50,50),2,1) 'second stream from (80,50)
etc
End if
 
Last edited:

neilnapier

Active Member
Licensed User
Longtime User
Done, works great. I will post it once I have got an answer to this question:

How to you turn it into a toggle (ie turing it off on the next click)

EDIT: Also when it is turned on you can't create a solid object.
 
Last edited:

colin9876

Active Member
Licensed User
ok if u want to do that we will need an extra variable

Global
Source=true

in timer
change the line if style=8 to if source=true

in tapbutton
if source<>True then source=True else source=false

when uve done that bit can u post it here as v2.9 & ill take a look
 

neilnapier

Active Member
Licensed User
Longtime User
That works sometimes but often does not... whenever you choose it it first works but then truning it off then on againstops it working.
 

neilnapier

Active Member
Licensed User
Longtime User
I have sorted it but circlular pens do not work when toggle is on. Hold on I will go upload it.
 

neilnapier

Active Member
Licensed User
Longtime User
It woks niw... weird, might be a bit glitchy... All that remains apart from reactions and mossability is borders and vert and horis back in... then it will be almost complete
 

neilnapier

Active Member
Licensed User
Longtime User
Done. Also looking at the updates expected in BASIC4PPC V6 this will be incredibally fast.

It says 200% to 800%... So thats a minimum of 5 times faster and a max of 20 times faster... it will become too fast perhaps and slow/ fast toggles might need to be made.
 

colin9876

Active Member
Licensed User
brill. when u add the horiz & vert - as outlined in post 165 dont forget to rename it to v2.9 or something - the last couple of ur updates were each called 2.86 & my ppc is getting confused!
 

neilnapier

Active Member
Licensed User
Longtime User
On my PPc it comes up with an error saying

"An error occured on Sub timer_tick.

An error message cannot be displayed because optional resource assembly cannot be found Continue?"
 

colin9876

Active Member
Licensed User
Im baffled that it works on PC not on PPC. I had that happen to me too. Ive got WM6.

AGraham.
Can u download Neils Zip above and look at why it doesnt run on the PPC. Is it something to do with connecting the library/object? Ive never understood if u actually have to add the object bh1 manually or if it does that when u load the dll?
 
Last edited:

agraham

Expert
Licensed User
Longtime User
It says 200% to 800%... So thats a minimum of 5 times faster and a max of 20 times faster.
Don't know how you get that Neil but it is twice to 8 times as fast as I understand it! Also my library, where most of the time is taken up, won't speed up at all so don't get your hopes up toohigh!
 
Last edited:

neilnapier

Active Member
Licensed User
Longtime User
100% faster is double the speed. So that would be two times the speed.

Because if it is 0% faster it is 1x the original speed, which equals the same as the original. If it has 100% speed added to the original it is times two.

EDIT: That 5 should be a four... I made a typo...

EDIT2: Redoing my calculation I think it should be a min of 4x and a max of 16x...
 
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…