Weird discrepancy between scene size & background image size
Sinequanon
Member Posts: 35
Hi,
I'm working on an iPad title with GS. I have an image that is 3072 x 768 (3 screens wide by 1 screen tall in landscape). The background image moves after every stage by 1024 pixels. Currently, I have the background spawning as an actor when the level 01 actor (which is running enemy spawning and such) calls for it at the beginning of the level.
However, if I set the image actor to spawn at 0 (relative to scene), it actually spawns 1536 pixels into the image (1024 + another 512), roughly. If I set it to spawn at -1536, it doesn't spawn at all. For some reason, if I set it to spawn at 1523 pixels, it will stay on the screen, but at 1524, it disappears. I can work around this, I suppose, but moving it approximately 1020 pixels each time, but ideally, I'd like the game to work with my actual image. What could be causing the discrepancy?
I'm working on an iPad title with GS. I have an image that is 3072 x 768 (3 screens wide by 1 screen tall in landscape). The background image moves after every stage by 1024 pixels. Currently, I have the background spawning as an actor when the level 01 actor (which is running enemy spawning and such) calls for it at the beginning of the level.
However, if I set the image actor to spawn at 0 (relative to scene), it actually spawns 1536 pixels into the image (1024 + another 512), roughly. If I set it to spawn at -1536, it doesn't spawn at all. For some reason, if I set it to spawn at 1523 pixels, it will stay on the screen, but at 1524, it disappears. I can work around this, I suppose, but moving it approximately 1020 pixels each time, but ideally, I'd like the game to work with my actual image. What could be causing the discrepancy?
Comments
Although you may be having some issues with you art work too since the largest image file you can have in GS is 1024x1024 its possible you are experiencing some issues with the resizing GS would do to a 3072 wide image.
I would check the relative to selection you have cause it sounds like you have it set to actor though. Sorry if that doesn't help or if i'm not seeing your actual problem. MAybe some screen shots or video of your problem would help better understand
In any case, through a lot of tinkering, I've gotten it to work (though the values are more hacked at than finessed). How, though, would someone make a side-scrolling game with a panoramic background in GS, given the 1024x1024 limitation?