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

Report as inappropriate.

BlackholeGF presents ...


Pyro Sand New

This is my new Pyro-Sand simulation I made after the catastophic failiure of my last one.

A re-install of greenfoot seemed to fix my export problem, so that's OK now.


Down arrow - Activate the water spawner.
Up arrow - De-activate the water spawner.
Left arrow - Spawn some plant below the 'Funnel'.
Right arrow - Spawn some fire in the same place as the plant spawn.
Enter - SPawn some wall at the mouse location.

To do:

Make the wall spawning smoother (So it makes a continuous line even when you drag the mouse fast).
Reduce lag.
Add ice, petrol etc.

6331 views / 691 in the last 7 days

1 vote | 0 in the last 7 days

Tags: simulation demo with-source sand new pyro-sand pyro

open in greenfoot
Your browser does not support the canvas tag.
A new version of this scenario was uploaded on Sun Nov 08 11:15:27 UTC 2009


That's really cool! But it would be nice if I could spawn plant/fire at the location of the mouse, and not just below the funnel, too.


Yeah, I will work on that, but I believe that it was the method I used before to allow that which broke it.


BlackholeGF, taking a look at your code you seem to do if(Die != 1 & Greenfoot.getRandomNumber(3) == 1) (do you mean to be doing a bitwise operation here, or did you want two && to make an AND? Otherwise I like it, maybe think about ways to create lines of walls/pre-set designs?


According to the java web site: 'For &, the result value is true if both operand values are true; otherwise, the result is false.' If I have understood this wrong please correct me. What I want to do there is if Die != 1 and Greenfoot.getRandomNumber(3) == 1, the stuff inside the '{, }' brackets goes, and not if only one or neither of them equal these values. I may be doing something wrong here, please tell me if I am.


hm I never knew if(Die != 1 & Greenfoot.getRandomNumber(3) == 1) would compile, does it?..Anyways, for java, I'm pretty sure AND is denoted as &&. See if that works :)

Want to leave a comment? You must first log in.

Who likes this?