Can I use an image array to create a background map for my game?
I want to create a long background for my game. I created a very long image: 3000 X 512 pixels. When I use it, I get an error because maximum supported dimensions are 2304 X 2304.
So I cannot enter one single big image and drag the x-coordinate on it so that it looks like it's moving. Can I create many images of, say, 2000 X 512 pixels and put them in an array and show them one after another? Drag it so that it loo开发者_StackOverflowks like there is a very long background?
Yes, you can. It is called "tiled background".
reference for tile based games
- Data structures
- Displaying tiles
- Algorithms
精彩评论