Buildbox Game Preview Behaves Differently On My Pc And Macbook

Discussion in 'Technical Discussion' started by vietzero, Jul 7, 2016.

  1. vietzero

    vietzero Boxer

    Joined:
    Jun 12, 2016
    Messages:
    18
    Likes Received:
    1
    I've been working on my first game on my Win10 PC so everything (e.g. speed of platforms, gravity, etc.) is configured according to my game preview on my PC.

    However when I open up the same project on my Macbook Air, the game preview is a lot slower (as in, the game goes in slow motion compared to the preview on my PC).

    When I use debug mode in the game previews of each computer, my PC has the FPS at ~166.7 and my Macbook Air has it at ~60.0. My guess is this is what is causing the differing game speed.

    I want to know; when I play this game on my iPhone what speed will it be? What FPS does the iPhone generally run at? Is there a way I can have the same FPS on both computers?
     
  2. heathclose

    heathclose Miniboss Boxer

    Joined:
    Jan 28, 2016
    Messages:
    1,810
    Likes Received:
    1,026
    macbook air likely doesn't have the horsepower your pc does... the real test is to put it on a phone a see if it looks good, and then just know your air is gonna look slower than the pc, but test on a device often
     
  3. vietzero

    vietzero Boxer

    Joined:
    Jun 12, 2016
    Messages:
    18
    Likes Received:
    1
    When you do your game preview and have debug mode on, what FPS does it show on the bottom left (I'm assuming FPS is the lowermost number)?

    And how different is the game preview compared to that on a device for you?

    Cheers.
     
  4. Christoph

    Christoph Miniboss Boxer

    Joined:
    Oct 4, 2015
    Messages:
    2,807
    Likes Received:
    2,309
    I don't think that your MacBook Air doesn't have the power. It for sure has more power than your phone. So I don't agree with @heathclose (sorry buddy).

    Actually, 60 fps is the correct value. This is also shown on your device and when you record a video for example with Quicktime directly from your iPhone it records in 60fps. On the other hand, 166 fps is much too fast. So there seems to be a problem with your PC rather than the MacBook Air. Not sure why this is the case, support for sure knows more.
     
  5. heathclose

    heathclose Miniboss Boxer

    Joined:
    Jan 28, 2016
    Messages:
    1,810
    Likes Received:
    1,026
    He is absolutely correct to disagree, but, that's depending on what else is taking up the "more power" than the phone... to run the game and software and everything else in the background, there's likely more wiggle room on your pc is my guess, plus I think air shares ram to render video, but now I'm just getting too geeky, someone else would be better help here I think...

    60fps is the refresh rate of an lcd monitor... Are you using a tube monitor on the pc?
     
  6. Andy

    Andy Miniboss Boxer

    Joined:
    Sep 24, 2015
    Messages:
    2,152
    Likes Received:
    1,546
    I concur... on the surface the 166 FPS is suspect... the Air is reporting correctly. Off the top of my head, I can't fathom why the PC is reporting that high.

    Just to clarify, in no way are you talking about the Xcode simulator (on the Air), right? Just Buildbox preview is up for discussion here?
     
  7. trudnai

    trudnai Miniboss Boxer

    Joined:
    Sep 25, 2015
    Messages:
    1,235
    Likes Received:
    701
    All right so at 60 FPS you would not see and jittering at all! Most LCD screens are running at 60 FPS including laptops, TVs and mobiles. In fact movie at a theatre has 24 FPS, a normal TV frequency is 30 FPS. Only very high-end TVs use 120 FPS but as most broadcasts and other video feeds going at a lower frame rate they are actually cheating and morphing the missing frames from the two existing ones. Anyway, even on 60 FPS you see moving stuff very fluid, there must be something else going over there...

    I am not familiar with BuildBox internals and its architecture but it is based on Cocos2D-x so here we go: Presentation and physical engine are working on different clock. That means even if your objects are presented at a certain speed like 60 times a second, if physics engine works at a much lower speed you may see that object movements are updates too slow and that cause a jittering effect. So if physics engine works at 30 per second then your object position and rotation will be updated at that frequency. That also means object is displayed twice at the very same location before it actually makes a move. Clever solutions calculate object speed at the physics cycle but the actual update happens at the display phase -- hence objects are moving fluid while collision calculation and other stuff are only checked once in a while. That works quite ok in most cases. I have not checked that but I suspect BuildBox just set the physics engine to 60 FPS so things are calculated at that frequency -- if everything works out well, because maybe CPU is overloaded and then it cannot finish physics calculation before the next frame... This results dropping few frames before the next calculation can occur, while displaying frames can happen and 60 FPS can be displayed on the debug screen. This is only a speculation, do not take my word on it though.

    Anyway, test things on the iPhone, not on the Air, because overall your game will run on the device... If it is slow, or is ok but you notice very high CPU utilization (again, on the iPhone, not on the Mac), then you should start thinking how to optimize your game... If you are not using crazy number of objects, particles and light effects you should be ok.
     
    Christoph likes this.
  8. vietzero

    vietzero Boxer

    Joined:
    Jun 12, 2016
    Messages:
    18
    Likes Received:
    1
    Yes, just the preview from BuildBox.
     
  9. vietzero

    vietzero Boxer

    Joined:
    Jun 12, 2016
    Messages:
    18
    Likes Received:
    1
    Here is a screenshot of the bottom left corner of my Game Preview in debug mode on my PC. The lowermost number is 166.7, as you can see. On my Macbook Air that number is 60.0.

    [​IMG]
     
  10. Qdeveloper

    Qdeveloper Avid Boxer

    Joined:
    Apr 25, 2016
    Messages:
    210
    Likes Received:
    76
    Don't laugh,

    On my Razer laptop, When I'm not charging mode the bb game will run fine and smooth, But if it's on battery mode it will be super slow and lag.
     
  11. jimmiethekid

    jimmiethekid Boxer

    Joined:
    Feb 19, 2019
    Messages:
    27
    Likes Received:
    16
    I know this is an old topic but I am experiencing the same. I have an older PC laptop with 8gb ram and i5 dual core and no issues with preview lag, I have a Macbook Pro 15" with 16gb ram and six core i7 and it lags with nothing on it but BB running. Any thoughts?
     

Share This Page