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

2014/1/7

Making a StartGame World

JasonZhu JasonZhu

2014/1/7

#
I understand that Greenfoot normally creates a World by tiling the image over and over. How do I make a World where it's a complete image that I created myself?
bourne bourne

2014/1/7

#
Either use an image with dimensions matching the World's dimensions. Or you could give the World a solid Color background and add an Actor to its center with your image for a "centering" affect.
JasonZhu JasonZhu

2014/1/7

#
As long as the dimensions are matching and I set the background to the image, it'll work?
bourne bourne

2014/1/7

#
Yes. Matching dimensions: imageWidth = worldWidth * worldCellSize, imageHeight = worldHeight * worldCellSize
danpost danpost

2014/1/8

#
The image is only tiled when it is smaller than the dimensions of the world. It is cropped to the size of the world when larger (top-left corner of image at top-left corner of world).
You need to login to post a reply.