Results 1 to 5 of 5
  1. #1

    Default Request: 3 player horizontal split screen.

    In GameViewportClient there are several options for split screen, but both of the 3 player options have one player with either the upper or lower half of the screen. If I can I'd like to request an option for 3 player vertical split screen, with each player taking up a third of the screen (left, middle and right). Please let me know if this is reasonable, it'd be a great help to the simulation projects I do at work.
    Last edited by Angel_Mapper; 01-17-2012 at 02:53 PM. Reason: I think I meant vertical.

  2. #2
    MSgt. Shooter Person
    Join Date
    May 2011
    Posts
    32

    Default Basic Vertical 3P Split

    This is for 3P VERT SPLIT but a few changes can make it work for horizontal as well.

    1. Add new type of SplitScreenInfo to enum ESplitScreenType so it now looks like this:
    Code:
    enum ESplitScreenType
    {
    	eSST_NONE,			// No split
    	eSST_2P_HORIZONTAL,		// 2 player horizontal split
    	eSST_2P_VERTICAL,		// 2 player vertical split
    	eSST_3P_FAVOR_TOP,		// 3 Player split with 1 player on top and 2 on bottom
    	eSST_3P_FAVOR_BOTTOM,	// 3 Player split with 1 player on bottom and 2 on top
    	eSST_4P,				// 4 Player split
    	eSST_3P_VERTICAL        // 3 Player Vertical Split each get 1/3 width of screen
    };
    2. Define it in the DefaultProperties block:
    Code:
    SplitscreenInfo(eSST_3P_VERTICAL)=
    {(PlayerData=((SizeX=0.3f,SizeY=1.0f,OriginX=0.0f,OriginY=0.0f),	(SizeX=0.3f,SizeY=1.0f,OriginX=0.3f,OriginY=0.0f),(SizeX=0.3f,SizeY=1.0f,OriginX=0.6f,OriginY=0.0f)))}
    3. In GetPixelSizeOfScreen(), add this:
    Code:
    case eSST_3P_VERTICAL:  
    		out_Width = Canvas.ClipX * 3;
    		out_Height = Canvas.ClipY;
    		return;
    4. I have no clue what the SafeZones are for, but this how I set them up.
    For HasTopSafeZone(), HasBottomSafeZone() and HasLeftSafeZone() I used the same case block as 2P_VERTICAL
    For HasRightSafeZone(),
    Code:
    case eSST_3P_VERTICAL:
    		return (LocalPlayerIndex < 2) ? false : true;
    5. In UpdateActiveSplitscreenType(), I commented out the code existing for case 3 and made it
    Code:
    SplitType = eSST_3P_VERTICAL;
    On testing this using DebugCreatePlayer, it shows a 3P Vertical Split with some left-over part of the screen. I tried changing the definition to accommodate the entire screen but all this did was make the game part black even though I can see each player's HUD.

    To make the split horizontal all you have to do is change the definition. (hint: SizeY and OriginY take the values instead of SizeX and OriginX)

    Hope this helps.
    Last edited by highondota; 01-17-2012 at 07:29 AM. Reason: missed a step

  3. #3
    Veteran
    Join Date
    Sep 2006
    Location
    Unreal Nomad
    Posts
    7,682
    Gamer IDs

    Gamertag: ambershee

    Default

    highondota - GameViewportClient is a native class, editing it in that fashion is going to cause issues (likely memory related crashes): the enumerator you've defined now mismatches with the one in the native binary.
    - Please do not send me questions regarding programming or implementing things in UDK via Private Message. I do not have time to respond and they are much better answered in the forums. -

  4. #4

    Default

    Ah I must be going crazy, I think I meant vertical split. Having the players set up across the screen left, middle and right.

  5. #5

    Default

    Quote Originally Posted by highondota View Post
    On testing this using DebugCreatePlayer, it shows a 3P Vertical Split with some left-over part of the screen. I tried changing the definition to accommodate the entire screen but all this did was make the game part black even though I can see each player's HUD.
    I tried this out and I'm amazed it even compiled, but yeah the leftover part of the screen is a dealbreaker unless you know a way to set a monitor to an extremely arbitrary resolution.


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.