There are 16 boards at the moment. Maybe I should ad a mechanism that allows you to start at a later level once you've solved it before... As it is, maybe nobody has ever seen Board 14 (my favourite)...
No new ideas for killing off people, but I was wondering whether it would be made more interesting if you turned it around: people die quite easily, and you have to make them survive. That's because it's easy to kill people, but not easy to create them.
You could have population decreasing factors come automatically (few children when there is overpopulation, occasional diseases breaking out, food shortages when there is over-population, food shortages because of natural disasters, etc.)
The you can intervene by dropping vaccines in, or improving transport (people can move further to find mates more easily), or improving food generation, etc. All this could cost money, so you cannot do that arbitrarily often (your money could increase slowly relative to population -- tax -- and be used for your interventions).
Very impressive indeed!
I was curious, so I had a look at the source code. One small tip: You can avoid creating a new GreenfootImage in every act cycle, by just reusing and painting over the previous one. That is, instead of
GreenfootImage im = new GreenfootImage(width, height);
do this:
GreenfootImage im = getImage();
im.clear();
You can then also remove the 'setImage(im);' a bit further down, since you are painting directly on the object's image. This speeds up execution by almost 20% on my machine.
Theoretically, you should also move the declaration of your maze array (int[] arr) out of the act method, and make it an instance field. This way, it does not get recreated every time. (In actual fact, this makes little difference because the Java VM optimises this very well and does the same by itself internally. But it's still the right thing to do.) And you can get rid of the setLocation(150, 150); in the act method if you just place it there once initially in the setup.
Great stuff!
2008/11/17
Marbles
2008/11/13
Jetpac
2008/11/11
CrazyBoxes
2008/11/11
Humanity
2008/11/11
Balls
2008/11/10
Humanity
2008/11/9
Castle Storm 3D
2008/11/8
greepWars
2008/11/7
CrazyBoxes