Little help with Apple TV

Discussion in 'How Can I...?' started by mario_lellis, Apr 16, 2016.

  1. mario_lellis

    mario_lellis Boxer

    Joined:
    Mar 29, 2016
    Messages:
    6
    Likes Received:
    0
    Hey guys,

    Any documentation on how to work around Apple TV games?

    Cheers
     
  2. mario_lellis

    mario_lellis Boxer

    Joined:
    Mar 29, 2016
    Messages:
    6
    Likes Received:
    0
    So the basic doubt is how do we work with button and character controls?

    1) On the menus, do we still leave buttons as they are?

    2) Ho to make a character jump? Do we use accelerometer, or do we leave a jump button?

    I've tried almost anything here but since I don't have an Apple TV 4, at least on the xCode simulator, I can't really make the game playable...
     
  3. oriv

    oriv Boxer

    Joined:
    Sep 25, 2015
    Messages:
    19
    Likes Received:
    1
    This is a possible solution that I used on my Apple TV game
    If you want to hit the swipe/tap area to jump up you can add the following code to the above code (replacing UIPressTypeSelect) instead of using tapping code

    if([press type] == UIPressTypeSelect){

    pDirector->getKeypadDispatcher()->dispatchKeypadMSG( 40, true);

    PTPInputController::shared()->keyPressed(PTPInputControllerKeySelectEnter);
    // below will allow to jump when you press tap area
    pDirector->getKeypadDispatcher()->dispatchKeypadMSG(23, true);

    PTPInputController::shared()->keyPressed(PTPInputControllerKeySelectEnter);

    }


    The simulator suck for development - you do need an Apple TV device
     
  4. mario_lellis

    mario_lellis Boxer

    Joined:
    Mar 29, 2016
    Messages:
    6
    Likes Received:
    0
    Thanks a lot Oriv, what about the menus?

    I already ordered an Apple TV 4 and it's on the way...
     
  5. oriv

    oriv Boxer

    Joined:
    Sep 25, 2015
    Messages:
    19
    Likes Received:
    1
    App sales are low but i hoping it will grow - It is a petty cool device. Happy game making
     

Share This Page