Actors don't behave properly if too far off-screen?
Hi all,
I'm working on a runner game (like Canabalt) and I'm seeing some odd behavior with my actors. Here's the basic set up: I have 10 platforms, each with an "active" boolean state. When they are not active I hide them off-screen left. When my controller decides they are active they change their position to off-screen right, move left until they get off-screen (this is when they're visible and the player interacts with the platform), then de-activate themselves until they're called again.
The problem is that when I move my platform too far off-screen right (we're talking maybe 500 pixels past the screen size in an iPhone game), they never show up. My best guess is that the movement behavior stops working? Or they never get moved off-screen right when they're activated? Is there some sort of a maximum "canvas" size that games have? I would like to be able to create platforms that are in the range of 1,000 pixels wide, but I just can't get this to work.
Any help would be much appreciated.
Thank you!
-Jenna
I'm working on a runner game (like Canabalt) and I'm seeing some odd behavior with my actors. Here's the basic set up: I have 10 platforms, each with an "active" boolean state. When they are not active I hide them off-screen left. When my controller decides they are active they change their position to off-screen right, move left until they get off-screen (this is when they're visible and the player interacts with the platform), then de-activate themselves until they're called again.
The problem is that when I move my platform too far off-screen right (we're talking maybe 500 pixels past the screen size in an iPhone game), they never show up. My best guess is that the movement behavior stops working? Or they never get moved off-screen right when they're activated? Is there some sort of a maximum "canvas" size that games have? I would like to be able to create platforms that are in the range of 1,000 pixels wide, but I just can't get this to work.
Any help would be much appreciated.
Thank you!
-Jenna
Comments
@ColorplayGames
Hi Jenna, as far as i know there isn't a maximum canvas area but there is a maximum area in all directions from the centre of the screen... any actor placed past this is immediately destroyed when the game is run...
Thank you again!
I can't remember! I originally thought it was 800 pixels from the edge of each side of screen, then I was told it was 1000 from each edge, then 1000 from the middle of the screen... not much help there...it wouldn't take long to do a quick test, perhaps I'll do that later... unless another member can give a definitive answer to the actual figures...
To your other question: this feature can't be turned off I'm afraid to say; one workaround to your game, if I understand what you're trying to achieve, is stack the images just off-screen in the same place, within the boundary...