I just made my world equal in size to yours (800, 400, 1). I way overdid the number of tile objects needed; as before I could easily have gotten away with less then half of what I had. Still, my tile array, now, is 55x30, which is 1650 (about half of what I had).
I think the reason I had so many before, was that I did not want the pattern to repeat so quickly.
Anyway, there is very little, if noticable, lag.
My version created 3200 16x16 tiles objects, and move all of them on each movement. It then relocates any tile that are way off the screen to the opposite side; always keeping a full background in view. No image manipulating required.
@erdelf, the score-code/scoreboard/highscores is something that comes with the newest version of Greenfoot (v. 2.2.0 and up). You should be able to import the code directly.
It would be much faster to have an Actor 'Tile' class in an unbounded world. Then the world can move all the tile actors in the appropriate direction when a key is held down. I have a sample scenario, if you want to see.
Please remove the 'Greenfoot.start()' statement from the world constructor. I was dead before I even started playing (just by the time it took to read the description). Also cannot reset, probably do to static variables in your code not being dealt with properly. Would also be nice if you would inform us as to what keys to use to control the car and shoot.
Please remove the 'Greenfoot.start()' statement from the world constructor. I was dead before I even started playing (just by the time it took to read the description). Also cannot reset, probably do to static variables in your code not being dealt with properly. Would also be nice if you would inform us as to what keys to use to control the car and shoot.
2012/6/13
PianoMemory
2012/6/12
Tile Pixel Scrolling
2012/6/12
Tile Pixel Scrolling
2012/6/12
Tile Pixel Scrolling
2012/6/10
Star_Trek
2012/6/9
Tile Pixel Scrolling
2012/6/9
Space Invaders
2012/6/9
Space Invaders
2012/6/9
Space Invaders