Multi-Resolution Game Development With GameBuilder Studio Check it out!
NEW Version 0.9.7 has arrived! New Blazing Fast Particle Engine & More Game Actions. Check it out
Scrolling Sprite dont work
  • Hey guys and girls,

    i have been trying to create a scrolling background but it don't work. First of i am using a background with a power of 2. But if i run the game first of the background gets cut off top and bottom don't cover the whole canvas. Second if i set som speed on it it just creates white spaces between?!

    What am i doing wrong? It should work i have looked at several videos showing it to but it feels like a bug, is it possible to download version 0.9.6 instead of 0.9.7 that i have?

    Kind regards

  • 11 Comments sorted by
  • @Isak Hi, when younsay you image is a power of 2, what are the dimensions exactly? width and hieght
  • @BenFromOrgegon Hi Ben, on my last image i tried its 1024x1024 isn't that power of 2? 
  • @Isak hi yes that would be a power of two size. Are you using a Scrolling Renderer or Parallax renderer? Did you set the size of the renderer to 1024x1024?
  • @Lavon Hi, yes i just tried to set the render to 1024x1024 and i don't get any change it just looks the same. it feels so strange. I am using a scrolling render should i use parallax?
  • @Lavon i am using Mac OS X 10.9.4 and flash player is 10.0.0.152 shouldn't it work with these?
  • @Isak :) It looks like you are not using a power of 2 size image. Your original image size is 1136 × 640 not 1024 x 1024. You can't just set an image to a power of 2 size in GBs the original dimensions of the image have to be a power of 2 square size.
  • @Isak also the power of 2 images (ie:1024X1024) don't have to be filled up completely with your image for example: if you were trying to achieve a scrolling sky, clouds, and ground like so:
    imageeach of the 3 layers(sky, clouds, or ground) images dimensions were 1024X1024 but the graphic(colors and shapes) only filled a little to save on file size. There can be unused white space.
    Then in GBs when you place the image in your scene of 1136X640 you can scale down to the size your choose and it should work.






  • @Lavon I notied that, i have now created an image who has the dimensions 2048x2048 but the graphic only covers 1136x640 thanks for the help.

    @BenFromOregon After much hair pulling (from my own head:P) i did it the way you instructed and of course it works perfect. Now i only wait for an update to have an universal game=)

    Ha a nice weekend both of you!


  • @Isak Great! Yes I wish I had originally started with 2048X2048. I am recreating everything I had in 1024X1024 to 2048X2048 and scaling everything down and repositioning everything with rules components checking for the condition of smaller dimensions. So now if I rebuild the game for 1920X1080 and I also want it to fit scale to 1280X720 using a Rule component on a background image for example I will check for when 
    game.Screen.resolutionX < 1280 
    game.Screen.resolutionY < 721
    game.Screen.resolutionX > 960
    game.Screen.resolutionY > 640
    Trigger a ChangeProperty action
    @Renderer.scale = Type Point X .67 Y .67

    From what I've noticed, I can then launch the game in the editor and everything looks right. The when I deploy the game to a device with 1280X720 I will see right then and there if it is going to work and if I need to adjust the positioning of something.

    Reminds me of media queries in web design in away.
  • @BenFromOregon one of the ways that will help make the positioning easier in the future is the addition of pinning to Spatials. You will be able to pin the position of a Spatial to an offset relative to the screen.
  • @Lavon that does sound easier, for now I figured I'd give a go at the approach mentioned above to get this project done by mid-winter for a couple platforms with any luck :)

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Tagged