![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Open Source Projects The place to discuss Basic4ppc open source applications. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
AG new library is faster.
Unfortnuantely Ive realised something which has only been apparent now Im working on the reactions. My logic for the movement of pixels was slightly wrong It should be two independent steps If u can move vertically do so, if u can move horizontally do so. it was try and move verticle & horizontal amounts, if u can do it If u cant just do the horizontal amount The difference in these two logics can be demonstrated with the following glitch in the current version It takes a long time for a pile of water to level out What happens top water molecule cant move down and (left) say so will just move left. but then may next try to move down and right, not be able to do it so just move right! So it goes back to where it was without falling down! Sorry everyone, Particularly AG, can u alter that please? It also helps with the reactions - I will explain later when I release that |
|
|||
|
I'll give that some thought - sounds good. But the particle being hit cant change unless it searches thro the whole array to find what is at that x,y position Thats why I have only the hitting pixel affected. Works in practice
Hold on a bit tho before coding that lot because Im still middevelopment! Dont like the idea of black pixels just perculating away tho. Just a line to say if pcolor=cBlack then send it to the destroy routine much more efficient. Then can use that slot in the array Last edited by colin9876 : 12-14-2007 at 04:19 PM. |
|
||||
|
Quote:
Quote:
Modified logic attached - didn't see much sdifference myself however. New property DllVersion added - this one is 2.1. |
|
|||
|
Nearly there, the reason u didnt notice much difference is because the logic change also needs the line re move sideways to go to
if getcol(nx,ny) <> bcolor then nx=x(i) Then the next bit is if nx<>x(i) or ny<>y(i){ unplot (x(i),y(i)) plot(nx, ny) } Last edited by colin9876 : 12-14-2007 at 04:58 PM. |
|
||||
|
A particle could check if it is still the same colour when it's its' time to move. Unlike the former GetPixel the pointer based GetColor should be quite a cheap operation. It could then reset its probability and gravity from arrays passed alongside the colour array in initialise. The same tables could be used by AddElement and would help efficiency a bit.
EDIT :- It could also destroy itself if it was now background |
|
|||
|
ok good idea,
Back to the move horiz move vert the reason the change hasnt made any difference yet is because it still only moves down if it moves horizontally. See the other line change required above!! Because the actual make the move was still within the horizontal move if statement!) Last edited by colin9876 : 12-14-2007 at 04:56 PM. |
|
|||
|
Bumps do level out a bit faster now the logics better
The reason hills dont level out quicker is because the outer dropping particles stop the inner ones from moving - but I think thats how BS is supposed to be. Its like that in th PC version Im very happy with how its comming along. New library is better than ever. Its running amazingly well. Last edited by colin9876 : 12-14-2007 at 05:40 PM. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Tippy v.1.0 [open source] | N1c0_ds | Share Your Creations | 4 | Yesterday 10:08 PM |
| Personal Pocket PC Wiki | tsteward | Open Source Projects | 120 | 11-11-2008 09:55 AM |
| Another Pocket Wiki | digitaldon37 | Open Source Projects | 1 | 09-17-2008 11:01 AM |
| Pocket Burning Sand | neilnapier | Questions & Help Needed | 2 | 11-05-2007 08:53 PM |
| dzSpy - Spy and Task Manager App - Open Source | dzt | Share Your Creations | 3 | 07-15-2007 06:21 AM |