Portrait Mode

bryanrtboybryanrtboy Posts: 3Member
I am using a small HD screen and I want to make a game in portrait mode. I want to use the full size of the screen, not just a portion of the screen as it does now in the default landscape mode.

I tried altering the AndroidManifest and changing it from landscape to portrait and that didn't work. How do I do this? I'm using Unity and have the player settings to portrait also.

Comments

  • KonajuGamesKonajuGames Posts: 560Member
    You will be limiting your market to about two people if you use portrait mode as OUYA is intended to be used in a big TV style environment.  How many Xbox and Playstation games do you see in portrait mode?

    It would not surprise me if OUYA have set the hardware to only support landscape mode, which is why the manifest settings will have no effect.

    To achieve portrait mode, you may have to rotate your own rendering 90deg.
  • bryanrtboybryanrtboy Posts: 3Member
    I sure hope that is not the case. Yes, this piece is part of a sculpture and would only be for the person who buys the piece or uses it in the gallery setting.  Why would they limit the orientation? My understanding is this is basically an android/mobile device and it should support both orientations.

    I thought about rotating the game, but then I would have to do some work to orient the controls to compensate. I suppose I'll have to rotate the terrain, gravity and everything. What a pain!
  • HicsyHicsy Posts: 177Member
    hmm might be a question for somewhere like XDA developers, once they all start getting their consoles they could tell you. It might just be easier though to rotate everything... might actually be a lot less work than you think
    Can't find aapt.exe? Temp fix: Copy another one from 'android_sdk/build-tools/17.0.0' back to your 'platform-tools'
           -=Hicsy=-
    PM me        Facebook

  • AyrikAyrik Posts: 429Member
    You should just be able to rotate your camera along the Z by 90 degrees. After that just reverse the x and y on your inputs and you should be good, right? I guess it could be more complex than that, but that's where I would start.
    Saga Heroes - Adventure RPG
    image image
  • Killa_MaakiKilla_Maaki Posts: 504Member
    The reason the OUYA doesn't support this, nor do games, is because I have never, EVER seen a single television that wasn't in landscape mode. Not one. That's because they don't produce televisions in landscape mode, nor would people buy televisions in landscape mode. This thing is made for people to play games on, and people play games on widescreen TVs. Widescreen TVs operate in landscape mode. I'm gonna take a wild guess here and say the OUYA team likely felt that adding portrait mode was entirely unnecessary as people would only ever play in landscape.

    This isn't something OUYA should really be concerned with. You'll have to find a way to make your game run in portrait mode, which could just be as simple as rotating the camera.
    You didn't remember the plot of the Doctor Who movie because there was none; Just a bunch of plot holes strung together.
  • tgraupmanntgraupmann Posts: 2,869Administrator, Team OUYA
    That said, if you want to do this take a look at the SetResolution example. You set the orientation in the player settings. And then you can use Java to explicitly set the unity player and view size.
    ~Tim Graupmann
    OUYA Inc | Android Developer
    Skype: tgraupmann_prey

    http://github.com/ouya/docs
    http://github.com/ouya/ouya-sdk-examples

    Check out the latest docs for your game engine: [setup] [adobe air] [android] [clickteam fusion] [construct 2] [corona] [libGDX] [game maker] [html5] [marmalade] [monogame] [unity] [unreal]

    Use caution when setting [persistent wireless mode].
  • bryanrtboybryanrtboy Posts: 3Member
    edited May 2013
    @Ayrik Banking the camera on the Z axis will work, thanks for the tip. However, the GUI does not rotate, so I suppose I could use NGUI to deal with that.

    @tgraupmann - I looked at the SetResolution example. I can change the resolution from 1920X1080 to 1080X1920 but it does not change it to Portrait. The resolution just crops or shrinks based on how the Player Settings are set.

    If I set the Player settings to Portrait, the game is displayed as a vertical strip in the center. If the Player settings are set to Landscape, the game is full screen, but changing the resolution to 1080X1920 shrinks the view to the upper left.

    I exported an Eclipse file and am looking for where I would set/change the screen orientation. I feel like that would be the best solution.

    I know this is a fringe case, but my guess is many more fringe cases will surface as the OUYA is promoted as 'hackable'. It seems there is no programming reason to limit screen orientation, even if it may not make sense from a game/marketing point of view.
    Post edited by bryanrtboy on
  • tgraupmanntgraupmann Posts: 2,869Administrator, Team OUYA
    Well I think the orientation is actually controlled by the view, so still you could change the orientation in Java.
    ~Tim Graupmann
    OUYA Inc | Android Developer
    Skype: tgraupmann_prey

    http://github.com/ouya/docs
    http://github.com/ouya/ouya-sdk-examples

    Check out the latest docs for your game engine: [setup] [adobe air] [android] [clickteam fusion] [construct 2] [corona] [libGDX] [game maker] [html5] [marmalade] [monogame] [unity] [unreal]

    Use caution when setting [persistent wireless mode].
  • AyrikAyrik Posts: 429Member
    The OUYA will automatically letterbox your vertically oriented screen. The only option is to rotate it yourself. Maybe you could render to a texture and rotate that texture before you display it on the screen.
    Saga Heroes - Adventure RPG
    image image
  • tgraupmanntgraupmann Posts: 2,869Administrator, Team OUYA
    You aren't trying to do portrait on the OUYA, right?

    You are just trying to control the portrait mode for other devices?

    There is the player setting for auto rotation...
    ~Tim Graupmann
    OUYA Inc | Android Developer
    Skype: tgraupmann_prey

    http://github.com/ouya/docs
    http://github.com/ouya/ouya-sdk-examples

    Check out the latest docs for your game engine: [setup] [adobe air] [android] [clickteam fusion] [construct 2] [corona] [libGDX] [game maker] [html5] [marmalade] [monogame] [unity] [unreal]

    Use caution when setting [persistent wireless mode].
  • KonajuGamesKonajuGames Posts: 560Member
    Why would they limit the orientation? My understanding is this is basically an android/mobile device and it should support both orientations.
    Why would they limit the orientation?  So that games and apps always show in the correct orientation for a HDTV in a lounge room, no matter if they have been developed for landscape or portrait.  That is what the OUYA was designed for.  OUYA is not a mobile device that you hold in your hands and can easily rotate.

    If you want to use the OUYA on a portrait-oriented display, your only option is to rotate the rendering yourself.
  • bryanrtboybryanrtboy Posts: 3Member
    I am asking about the OUYA and I think rotating the camera is probably the best option. I understand the logic, but again, I'm making a non-traditional game and want to see what I can do with this. Typically, my installations and artwork require a computer to run - a mac-mini or whatever. 

    The attraction of the OUYA for me is to replace the computer with a tiny device that can be hidden within the artwork. So far, it's working great. Only issue is I've designed my art in Portrait mode and thus my dilemma.
  • DreamwriterDreamwriter Posts: 768Member
    edited May 2013
    I know this is a fringe case, but my guess is many more fringe cases will surface as the OUYA is promoted as 'hackable'. It seems there is no programming reason to limit screen orientation, even if it may not make sense from a game/marketing point of view.

    You're right, there's no programming reason, the reason is one of time and resources.  The OUYA, hackable as it is, was designed first and foremost as a video game console designed to run on normal widescreen TV's at 1920x1080, and it's obvious the people at OUYA who are developing its SDK and interface are swamped and crunched for time as it is, so wouldn't have time to implement fringe cases (since they are having a hard time just getting the basics done and bug-free on time).  Android itself does to some basic automation of orientation, but that's on cell phones with fixed screen resolutions; the OUYA had to change how some of that works because it has a couple different resolutions it can run at (1080p, 720p), and because it is being output to a TV, which I would guess uses some of the screen mirroring functions in Android and thus don't support orientation changes except to make a tall thin box in the middle of the wide screen.

    And this is the exact kind of fringe case that isn't really useful to most game developers - there will be the rare case like yours or maybe an independent developer might want to make a vertical shooter use the true vertical orientation by turning their TV onto its side, but definitely not as many people who would want more important features like a reliable in-app-purchase system or the ability to easily upgrade games in a minimum of steps without losing any of their data.  If enough developers ask for the feature I could see the OUYA folks adding support for changing the orientation, but that would be a fairly low priority feature.

    For now I agree that rotating the camera is the best option, unless you could use an external tool to rotate all of your art first and then write the OUYA app to work as if your game was sideways.

    Post edited by Dreamwriter on
  • jayderyujayderyu Posts: 110Member
    I was starting a game a number of months ago. Since I was playign around with CocoonJS as the distribution wrapper for the game; I didn't notice the option to rotate the view :D. Since the game played in portrait view, but displayed in landscape. i displayed the game in landscape, but put all the assets, physics.... in portrait direction. It work 100%. It's doable and not that hard really. Just rotate all the assets. When it all comes down to the solution, it's just math. 
    Question the paradigm you believe in
Sign In or Register to comment.