I'm new to Greenfoot and will be introducing pupils in my school to it in the next few days and I have hit a problem that I was hoping someone could help me with.
Basically if I create a world with the following constructor as far as I can figure I should get a world that consist of 100x100 cells each of which are 10x10 pixels.
So far so good. However when I create an actor subclass which calls move(1) the actor actually moves 10 cells in the world not just one! Being curious I changed the cell size to 8x8 pixels and sure enough when the actor calls move(2) it moves 16 cells. As far as I can figure out it is moving a certain number of cells when it should be moving that number of pixels.
I know I can get around this by using something like setLocation(getX()+2, getY()) and it's only going to be an issue if your cell size is not 1x1 but it doesn't seem right to me. Have I misunderstood something?
I would appreciate any help you can provide.
public GameParkWorld() { // Create a new world super(100, 100, 10); }