We're creating a game with this incredible framework but we seem to be having a slight problem with the background. We're intending to create a moving background ( 2 to be precise, parallax) but without tileset (it's a big image - 2400 px x 1800) so we aren't using the layers. It's kinda like "Jetpack Joyride" where the character only moves top and bot and only the background ( plus the collision layer) actually move.
Any suggestions?
1 decade ago
by lazer
What about drawing the background as an image behind your entities?
Fist off thats a big image and you will probably have issues on some devices.
Why are you not breaking the images into smaller chunks ?
Is tha image the complete level or will it repeat ? if you are repeating then look to split it into smaller chunks. You can load the Large chunks into the editor and set them to repeat (the tiles just need to be square 600 x 600). (or simply load the images as lazer suggests and do the repeat / scroll in code).
1 decade ago
by lazer
Actually I remember in the first game I was making in Impact I had a very large background image in one of my levels - it was too big to load in Firefox and didn't appear at all. At one stage I experimented with splitting the giant background into chunks as Stuart suggests above and loading the chunk that was closest to the player (plus one in front to be safe) as the player moved. That seemed to help (well, at least my background now loaded in FF). I ran into other performance issues with that level, so can't remember what actually ended up happening to that huge background by the time I got everything sorted out.
(Edit: I ended up doing something very similar when experimenting with procedural level generation. Ie generating parts of the map and obstacles a few rows in front of the player and deleting behind instead of dumping this giant level in from the get go)
Page 1 of 1
« first
« previous
next ›
last »