BB 1024px Preview Window Query?

Discussion in 'Technical Discussion' started by Phill Mason, Mar 3, 2016.

  1. Phill Mason

    Phill Mason Serious Boxer

    Joined:
    Sep 25, 2015
    Messages:
    880
    Likes Received:
    721
    I always design my games using the iPhone 5 res as BB has that screen area layout in the scene editor and consequently, I do most of my preview testing using the 1136 x 640 window. I also like to check that this layout looks good on the iPad too, so I can export for both iPhone and iPad, but I've just noticed that I can see much less of my graphics that are close to the left edge of the screen on the 1024 x 768 screen compared to the smaller 960 x 640 preview screen.

    Q: How come the smaller preview window of 960W pixels is displaying more of the scene graphics width than the larger 1024W pixel width? Is it just BB preview that's off, or does this translate to Xcode also?
    It's the same in both BB1 and BB2. >> See Image below.
    iPad-Res-Issue.png
     
  2. Andy

    Andy Miniboss Boxer

    Joined:
    Sep 24, 2015
    Messages:
    2,152
    Likes Received:
    1,546
    Project Settings -> General -> Screen Adjustment. Choose something other than Default. Default is the original mode that BB1 first operated in which is a hybrid. If I remember correctly, it only works well with landscape games. Fit to height/width is much more predictable and typical.
     
  3. Phill Mason

    Phill Mason Serious Boxer

    Joined:
    Sep 25, 2015
    Messages:
    880
    Likes Received:
    721
    That's great @Andy, thanks, my game is in landscape and it's sorted the preview pane perfectly, nice one.
    Q: I see it's placed black bars top and bottom in the 1024 x 768 pane, will that export to Xcode too, or just for BB preview?
     
  4. AndyG

    AndyG Miniboss Boxer

    Joined:
    Sep 25, 2015
    Messages:
    1,100
    Likes Received:
    915
    Wow. It's the simple things sometimes. Who knew! Thanks for the tip @Andy and thanks for raising the issue @Phill Mason :)
     
    Phill Mason likes this.
  5. Andy

    Andy Miniboss Boxer

    Joined:
    Sep 24, 2015
    Messages:
    2,152
    Likes Received:
    1,546
    What you see in preview is what you get on the device 99.9% of the time. Those black bars are likely because you need to use a larger graphic (or otherwise have a method to account for the space) because the iPad is a wider aspect ratio.
     
  6. trudnai

    trudnai Miniboss Boxer

    Joined:
    Sep 25, 2015
    Messages:
    1,235
    Likes Received:
    701
    Thanks @Andy - In the other day I have also noticed this behavior which was fixed by this settings, but it is always good to know that this is actually the correct way
     
  7. Phill Mason

    Phill Mason Serious Boxer

    Joined:
    Sep 25, 2015
    Messages:
    880
    Likes Received:
    721
    Sure am @tweettopix, I always use the 1136 x 768 res for backgrounds to cater for both iPhone and iPad, so I'm not sure why I'm still seeing the black bars. I'm going to experiment with larger than 768 pixel height to see if BB downsizes to still show black bars regardless of size. I'll report back here.
     
  8. Andy

    Andy Miniboss Boxer

    Joined:
    Sep 24, 2015
    Messages:
    2,152
    Likes Received:
    1,546
    @Phill Mason for sure if you can't figure it out please open a ticket with support.... It's always possible there could be an issue. I just don't recall any issues with black bars in the recent or even distant past.
     
    Last edited: Mar 4, 2016
  9. Phill Mason

    Phill Mason Serious Boxer

    Joined:
    Sep 25, 2015
    Messages:
    880
    Likes Received:
    721
    Will do @Andy, thanks. I had a play around with the following background sizes and this is what I found.
    Using the standard iPhone 5 BG size of 1136 x 768 is the norm and works great for covering the entire background for both iPhone & iPad if BB > Settings > Screen Adjustment is set to 'default'. As shown above in my screenshots, it cuts off the sides of your screen, so as @Andy mentioned, go to BB > Settings > Screen Adjustment and set to 'Fit to Width' for landscape games. This brings the left and right sides in perfectly, but does place black bars at the top.

    I tested some other background sizes to see if I could fill this black space and as you can see from the image below, 1136 x 850 seems to fill the BG area nicely. I tried a pixel height of 800, 828, 838 and even 848 still showed a black pixel or two at the top and bottom, so 850 pixels high looks to do the job nicely. I have tested this yet on a device, but Andy seems to think it should be the same, so go with 1136 x 850.

    Fit-to-Width-BG-Size-for-Buildbox.png
     
  10. trudnai

    trudnai Miniboss Boxer

    Joined:
    Sep 25, 2015
    Messages:
    1,235
    Likes Received:
    701
    @Phill Mason i usually set fixed height for landscape and the other way around for portrait for scrolling games. As because of the nature of the scrolling scenes the width of each scenes are not critical, but with the fixed dimension of the perpendicular axle is -- margins and all seems just right.

    If this is another type of game where oversized background seems to serve the best then there might be issues with the platform and other object alignments as well, or is that ok in your case?
     
  11. heathclose

    heathclose Miniboss Boxer

    Joined:
    Jan 28, 2016
    Messages:
    1,810
    Likes Received:
    1,026
    Yah I find its always backwards for me to
     
  12. Phill Mason

    Phill Mason Serious Boxer

    Joined:
    Sep 25, 2015
    Messages:
    880
    Likes Received:
    721
    It all depends on what type of object/scenery layout you have really, so whatever works best for you, but for me in this landscape game, over-sizing the background height and setting screen to width makes every device size look pretty much the same.
     
    heathclose likes this.
  13. Christoph

    Christoph Miniboss Boxer

    Joined:
    Oct 4, 2015
    Messages:
    2,807
    Likes Received:
    2,309
    If I'm not mistaken, if you set the height fixed for landscape and/or width for portrait it means that your content gets zoomed in. For example a portrait game with a fixed width, needs to cut off graphics at the top and at the bottom when used in a tablet. It does that because it has a more square ratio in resolution (at least iPads have). And by doing that it automatically gets bigger (zoomed in) to fill the screen completely. This can led to a huge lost of resolution, even more if your tablet has a retina screen. The advantage is that you see the same obstacles, enemies, etc in the direction where your game is headed on every device which makes the game play and difficulty somehow similar. If you do it like @Phill Mason then you always have the same resolution and zoom-in distance but to compensate it will show more space on both sides. The disadvantage is that on a tablet you can see now much more of the world you are moving in, which can make it much easier to play and react to the obstacles, enemies etc. In either ways, you will have to design your game accordingly.

    I did some tests last year in version 1.3.5 and the default settings use the zoom-in option (it may vary for different gameplay presets, don't know). But there is one big difference how BB handles the frame settings (the ones that define if your character can pass, is blocked or defeated). When using the screen adjustments in default setting, the frames stay in its place like intended on iphone 5 (1136 x 768). That means on a iphone 4 or ipad you can move around within the iphone 5 frame settings even though your character does not appear anymore on the screen.

    And when using the height fixed for landscape or width for portrait the frames get also moved towards the edges of your device which means you can't move further than the edge itself. If you have a frame that kills you, this means your actual action space is now very reduced on a tablet. Just a small detail to keep in mind when planning your game because it means you actually can only use a small part in the center even if you are playing on a iphone 5. This, or your game won't work on a tablet.
     
  14. Christoph

    Christoph Miniboss Boxer

    Joined:
    Oct 4, 2015
    Messages:
    2,807
    Likes Received:
    2,309
    What I would like to know is if you can change this in Xcode easily to adjust for different devices. I would love to have iPhone 5 and iPhone 4 use the same width (with the iphone 4 a little bit zoomed in) and the tablet use the same height (with more world view). Can this be done?

    This would also be very cool for the ATV. A portrait game can convert to a landscape game basically. The only thing which would be nice to have too is the option to adjust the back threshold. @Andy?
     
  15. Andy

    Andy Miniboss Boxer

    Joined:
    Sep 24, 2015
    Messages:
    2,152
    Likes Received:
    1,546
    Unfortunately the gameplay has no way of knowing about or acting upon the hardware it is running on, orientation, resolution, etc. You can fiddle with the orientation in the Xcode project but not sure how you would use that. Probably someone inventive enough could take advantage of that.
     

Share This Page