This site requires JavaScript, please enable it in your browser!
Greenfoot back
Duta
Duta wrote ...

2012/3/10

Here's a challenge for someone! :)

1
2
Duta Duta

2012/3/12

#
Ah ok, it wasn't lagging at all on my computer so I had no idea
kiarocks kiarocks

2012/3/13

#
I think you should not paint to the background, which is a bit laggy
matt.milan matt.milan

2012/3/13

#
probaby a good idea, since it has to read every single pixel. probably better to start black and create a bunch of particles that start bright, and then fade out
matt.milan matt.milan

2012/3/13

#
so instead of painting background, now the particles that are shot from the mouse have their own image and size. a setTransparency()-- loop fades them out, and an if getTransparency() <= 0 method removes the objects from the world this prevents slowdown from too many objects on the screen right now, my code does fillOval method, increasing it's size by 1 and reducing it's transparency by 1 each tic, getting larger and fading out until it's gone. i think the next step is to add gravity to the particles, so that they come back to the mouse pointer, creating the loops that we saw in the example webpage. I'm also thinking about doubling the particles, 1 smaller one over 1 larger one, the smaller one would start at a brighter color than the larger, darker one.
Duta Duta

2012/3/14

#
Oh that transparency increasing is a good point >.< I was doing it by turning them to black but thinking about it now that's wrong :L
You need to login to post a reply.
1
2