Ground image suddenly ends. Cannot get it to 'stretch'...

WildShroomWildShroom Member Posts: 7
edited November -1 in Working with GS (Mac)
My image is currently 1024 pixels long; not the entire length of the level. I cannot get it to stretch, replicate, or tile. What am I missing? I need it to continue to the end of the level.

Comments

  • scitunesscitunes Member, Sous Chef Posts: 4,047
    So you have an actor that is 1024 wide and you are unable to drag multiple instances of that actor into the scene? (just want to make sure I understand the problem).
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    I'm not sure exactly what's going on, but I do know that the iPhone can't display images that are over 1024, so that might be the limit you're running into. Try just putting the background up there twice, or splitting it up into smaller actors.
  • WildShroomWildShroom Member Posts: 7
    @scitunes: I didn't want to drag it multiple instances, I merely wanted it to tile so that when it ended it would draw again, tiled. So that it seemed to go on 'forever'.

    @mulcahy: The actor runs out in the middle of the game. That is fine based on the image restrictions. However, why won't it tile the actor again so that the ground seems to run the entire scene?
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    Have you thought about wrapping the x and spawning other elements in the game randomly?
  • WildShroomWildShroom Member Posts: 7
    @scitunes: When I review the X attribute of Position I do not see where I can change this to anything but a numeric value. Am I missing your suggestion?
  • rebumprebump Member Posts: 1,058
    Maybe make sure the scene width is an even multiple of the image width? Maybe it doesn't tile partials? (not on my Mac to test).

    It is usually best to roll your own parallax so you can control/instill a little overlap between tiles as sometimes GS introduces vertical gaps (from what I have seen/heard but not yet implemented myself).
  • WildShroomWildShroom Member Posts: 7
    @rebump: there is no tile at all. The image ends. Now the odd thing is, I can change the attribute/size to W 1 and H 1, this changes nothing in game, only the preview reflects a horribly squashed actor.
  • rebumprebump Member Posts: 1,058
    Which it should if you set it to 1 x 1 but it should tile if it is dropped onto an actor set to tile.

    So the actor image you want repeated is 1024 x some-Y. And your scene is what size?

    Maybe set the scene width equal to an even multiple of 1024 in width and "some-Y" in height (or a multiple of "some-Y" if you want it tiled in multiple directions.

    Then in the actor who has the image, set it to tile and its width to 1024 and height to "some-Y".

    I've done that with a 10x10 grid pattern and it worked. They key may be it being an even multiple. Maybe even scale it back to 1000 x some-Y to avoid the extremes. Just throwing out some idears.

    Maybe it is just a GS bug with images over a certain size tiling...
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    X and Y wrap are scene attributes. Click scene towards the top of the inspector and then click attributes. They are boolean so you just check or uncheck them.
  • rebumprebump Member Posts: 1,058
    If their scene is bigger than the view, will wrap settings work here?

    I haven't tried any views scenes bigger than the default view. I know you have done some big scene stuff and some faked big scene stuff, so I stand down to your input! ;-)

    I was going off of successfully tiling a 10x10 actor in the current view and extrapolating that a 1024xY could be tiled into a scene whose width is a multiple of 1024.
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    I have not done the tiled thing. My newest game is a never ending game and the background is bigger than the iphone screen (by a lot) and it slowly moves in the opposite direction of the main actor and X wrap is on so it just keeps on scrolling by. I haven't had any problems with this approach.
  • rebumprebump Member Posts: 1,058
    @sci: I'm gonna have to play with scene wrap to see what it's about. I thought that was for HUD/overlap layers but don't recall.
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    wrap just means that when something leaves the left side of the screen it will reappear at the right side. Create a test scene and turn wrapX on. Then just use change velocity or move and send an actor to the left and watch what happens.
  • rebumprebump Member Posts: 1,058
    Ahh, funny. I've been rolling my own wrap (well, I would still have to one the bottom to account for the controls, score, etc.). Sheesh! I feel silly.

    I thought I read somewhere that was used for anchoring stuff like HUD and always thought it was sort of mislabeled.

    <feelin' like an idiot>
  • rebumprebump Member Posts: 1,058
    Ahh, dude, I shouldn't reply when I'm not on my Mac (can't help but check the forums out at work on a PC though). Anyway, yeah, I was confusing the scene "scrollable" with the scene "wrap". Har!

    I just tried and I was reminded why I rolled my own wrap screen. If you move stuff off-screen to hide it, it wraps back on. Thusly, there is no off screen with scene "wrap" enabled (well, if both X and Y "wrap" are enabled). Thusly, I rolled my own on actors that needed it.

    Anyway, WildShroom, just ignore my last three entries in this thread (including this one). The first three posts of mine still pertain to the subject at hand.
Sign In or Register to comment.