Share My Creation Cells - Animation

when 2 cells collide in the middle they will unite. as bigger the cell as slower it will move.
animation end when all cells are united :p

cells.png
 

Attachments

Hey Ilan! :)

It looks really cool but I can't really understand what's going on.
Are you simulating some kind of physical process or is it just digital art?

The framerate on my PC is really low... 8 FPS at best... Is it supposed to be this way?
 
Hey Ilan! :)

It looks really cool but I can't really understand what's going on.
Are you simulating some kind of physical process or is it just digital art?

The framerate on my PC is really low... 8 FPS at best... Is it supposed to be this way?

the reason for the low FPS is i create an array of all pixels in the screen (600*400=240.000)

and go through them in a loop do draw each pixel as needed (to get that effect) since it is a too large array i had to do it in step 4
so my array is now 15.000 big) and every frame i need to go over all pixels. this is not easy. on my pc i get around 25 FPS
i could make the step to 8 and like this increase the FPS and also get a nice Pixel Art Style.

it is just a nice animation not more then that.
 
- What version is you B4J?
- What version is you JDK?
- Is you JDK 32 or 64 bit?

b4j is 4.01

JDK is :confused:
32 or 64 :confused:

where do i check it?

EDIT: jdk = jdk1.8.0_65 (i am updating now the jdk to see if i get better performance)
 
i have updated the jdk and b4j but performance has not increased much.

change the scale to 1 and you will see what i mean (scale 1 = full array (600*400 [240.000 pixels])
 
@wonder you can also play around with the colors

for ecample:

Code:
For Each p As pixel In pixels
        Dim sum As Int = 0
        For Each cl As cell In celllist      
            Dim d As Int = distance(p.x,p.y,cl.x,cl.y)
            sum = sum + (500 * (cl.r/d))
            sum = Min(sum, 255)
        Next  
        p.color = fx.Colors.To32Bit(fx.Colors.RGB(sum,128,0)) 'HSLtoRGB(sum*5,sum*10,sum*0.8) '
  '...
 
maybe opengl would be really a nice addition for b4j
Yeaaaaaah.... Just imagine, making games in B4J (LibGDX style) and uploading them to Steam. Big money!!! :D

By the way, have a look at the difference:
 
on my pc i get the same result for the jar file as when you build the project. dont know why the jar file runs so slow on your pc. on mine it runs fast
 
you know what could be archived from this source? a nice blood animation where small blood particles falls into a dungeon. and with a little physic (magic) the animation could be very nice :)
 
Back
Top