<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>How to do a split screen ?</title>
<description> Hello,

I would like make another &quot; Kurushi Wii &quot; with two players and a split screen :-) I use GX/GRRLIB but I don&amp;#039;t find how to initialize this split screen.
Somebody knows how to initialize a split screen ? or somebody has a link ? an example ?
Thanks :-)</description><link>http://forum.wiibrew.org/read.php?11,72952,72952#msg-72952</link><lastBuildDate>Sun, 15 Mar 2026 18:49:13 +0100</lastBuildDate>
<generator>Phorum 5.2.23</generator>
<item>
<guid>http://forum.wiibrew.org/read.php?11,72952,73545#msg-73545</guid>
<title>Re: How to do a split screen ?</title><link>http://forum.wiibrew.org/read.php?11,72952,73545#msg-73545</link><description><![CDATA[ @tchagui. Yes, I am sure its visible. I tried many combinations but never got the camera to look at something else other than the direction it was originally set to look. I even changed the 3dmode a several times. I suggest u set up a similar test for yourself. If you can get it to work it will save u from drawing twice.<br /><br />Neoflash has a compo in progress as well.]]></description>
<dc:creator>owen</dc:creator>
<category>Coding</category><pubDate>Thu, 15 Aug 2013 00:58:51 +0200</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,72952,73544#msg-73544</guid>
<title>Re: How to do a split screen ?</title><link>http://forum.wiibrew.org/read.php?11,72952,73544#msg-73544</link><description><![CDATA[ Hello<br /><blockquote class="bbcode"><div><small>Quote<br /></small><strong>owen</strong><br />GRRLIB_Camera3dSettings( -2500, 50, 5, 0,1,0, 5000, 5, 5 ); //does not work</div></blockquote>
sqrt(2500*2500+50*50+5*5) is a very big value.<br />What is your &#039;near&#039; value and &#039;far&#039; value ? Are your sure that your object is visible ? The object is in the cone of view ?]]></description>
<dc:creator>tchagui</dc:creator>
<category>Coding</category><pubDate>Thu, 15 Aug 2013 00:07:02 +0200</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,72952,73541#msg-73541</guid>
<title>Re: How to do a split screen ?</title><link>http://forum.wiibrew.org/read.php?11,72952,73541#msg-73541</link><description><![CDATA[ @antibyte I tried switching the 3d mode after moving the camera. it still didn&#039;t work Hopefully @tchagui will have better luck experimenting with it.]]></description>
<dc:creator>owen</dc:creator>
<category>Coding</category><pubDate>Wed, 14 Aug 2013 17:34:39 +0200</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,72952,73540#msg-73540</guid>
<title>Re: How to do a split screen ?</title><link>http://forum.wiibrew.org/read.php?11,72952,73540#msg-73540</link><description><![CDATA[ <blockquote class="bbcode"><div><small>Quote<br /></small><strong>owen</strong><br />@antibyte I still have not figured out how that vertex array works!</div></blockquote><br />Come on, Owen. We have been through this! You&#039;re a smart guy and you have all the info, I bet you didn&#039;t really try. :)<br /><br /><blockquote class="bbcode"><div><small>Quote<br /></small><strong>owen</strong><br />I am trying to move the view two times in a single frame. Taking a screen shot each time. That&#039;s what the code above is doing but the second screenshot does not receive new camera positions. I am trying to avoid drawing the world twice.</div></blockquote><br />As you know I am not using GRRLIB. But I had a quick look and noticed that GRRLIB_Camera3dSettings() only sets global (non GX) camera vars, which are then used with guLookAt() (as well as other GX state being set) in GRRLIB_3dMode().<br /><br />Have a look, you can easily work around that. But it&#039;s still a mess. I know a lot of people use it, but GRRLIB isn&#039;t suitable for complex 3D applications at all.]]></description>
<dc:creator>antibyte</dc:creator>
<category>Coding</category><pubDate>Wed, 14 Aug 2013 10:07:05 +0200</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,72952,73534#msg-73534</guid>
<title>Re: How to do a split screen ?</title><link>http://forum.wiibrew.org/read.php?11,72952,73534#msg-73534</link><description><![CDATA[ @antibyte I still have not figured out how that vertex array works!<br /><br />I am trying to move the view two times in a single frame. Taking a screen shot each time. That&#039;s what the code above is doing but the second screenshot does not receive new camera positions. I am trying to avoid drawing the world twice.]]></description>
<dc:creator>owen</dc:creator>
<category>Coding</category><pubDate>Tue, 13 Aug 2013 14:19:05 +0200</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,72952,73532#msg-73532</guid>
<title>Re: How to do a split screen ?</title><link>http://forum.wiibrew.org/read.php?11,72952,73532#msg-73532</link><description><![CDATA[ <blockquote class="bbcode"><div><small>Quote<br /></small><strong>owen</strong><br />It is often faster to hardcode the vertex positions for things you draw often.</div></blockquote><br />If you draw things often, you should not use hardcoded vertex positions, since this cannot utilize the Wii&#039;s vertex cache. You should use vertex buffers (i.e. GX_SetArray() ) instead, they are faster.<br /><br /><blockquote class="bbcode"><div><small>Quote<br /></small><strong>owen</strong><br />I was experimenting with drawing a view then taking a screenshot, then moving the camera and taking another screen shot but unfortunately you cannot move the camera after you start drawing the frame.</div></blockquote><br />You can move the camera anytime by changing the view matrix. You have to calculate the Model * View matrix for each draw call anyways (unless your objects use the same world transformation).]]></description>
<dc:creator>antibyte</dc:creator>
<category>Coding</category><pubDate>Tue, 13 Aug 2013 09:17:50 +0200</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,72952,73531#msg-73531</guid>
<title>Re: How to do a split screen ?</title><link>http://forum.wiibrew.org/read.php?11,72952,73531#msg-73531</link><description><![CDATA[ I was experimenting with drawing a view then taking a screenshot, then moving the camera and taking another screen shot but unfortunately you cannot move the camera after you start drawing the frame. Here is some code that you can experiment with;<br /><br /><pre class="bbcode">


	guVector center={0,0,0};

	float screen_width = rmode-&gt;fbWidth; float screen_height = rmode-&gt;efbHeight;
	float screen_center_x = screen_width*0.5f; float screen_center_y = screen_height*0.5f;
	
	GRRLIB_texImg *blank_tex, *blank_tex2;  //game pattern
	blank_tex=GRRLIB_CreateEmptyTexture(640,480);
	blank_tex2=GRRLIB_CreateEmptyTexture(640,480);
	
	while(1) {
		game_updatebuttons();		
		GRRLIB_Camera3dSettings( -5, 250, 5,  0,1,0,	5, 5, 5 ); 		
	
		draw_circle2( center, colour_alpha(GRRLIB_RED, circle_size), 5 ); //fading center

		GRRLIB_Screen2Texture( 0,0, blank_tex, false);
		
		GRRLIB_Camera3dSettings( -2500, 50, 5,  0,1,0,	5000, 5, 5 ); //does not work

		draw_circle2( center, colour_alpha(GRRLIB_YELLOW, circle_size), 50 ); 
		
		GRRLIB_Screen2Texture( 0,0, blank_tex2, false);
		
		engine_2d(); //print text

		GRRLIB_DrawImg(0,0,blank_tex, 0,0.5f,0.5f, GRRLIB_WHITE);
		GRRLIB_DrawImg(screen_center_x,0,blank_tex2, 0,0.5f,0.5f, GRRLIB_WHITE);

		engine_2d(); //print text
		
		GRRLIB_Render();
	}
	

</pre>]]></description>
<dc:creator>owen</dc:creator>
<category>Coding</category><pubDate>Tue, 13 Aug 2013 07:04:32 +0200</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,72952,73528#msg-73528</guid>
<title>Re: How to do a split screen ?</title><link>http://forum.wiibrew.org/read.php?11,72952,73528#msg-73528</link><description><![CDATA[ cool.<br /><br />Tips for increasing speed;<br />store the screen centre value in a variable at the start of the program. screen_center = (rmode-&gt;fbWidth * 0.5f );<br />Do not use a loop to draw your boxes. It is often faster to hardcode the vertex positions for things you draw often.]]></description>
<dc:creator>owen</dc:creator>
<category>Coding</category><pubDate>Mon, 12 Aug 2013 23:42:41 +0200</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,72952,73527#msg-73527</guid>
<title>Re: How to do a split screen ?</title><link>http://forum.wiibrew.org/read.php?11,72952,73527#msg-73527</link><description><![CDATA[ Hello Antibyte, Owen,<br /><br />It&#039;s ok. My splitscreen runs :-) Your ideas are good !<br />Here&#039;s how it&#039;s done :<br /><br /><pre class="bbcode">
// screen n°1 : left screen
GRRLIB_Camera3dSettings(camera1[0],camera1[1],camera1[2], 0.0f,1.0f,0.0f, 0.0f, 0.0f, 0.0f );
<b>GX_SetViewport(0.0f, 0.0f, <span style="color:#FF0000">rmode-&gt;fbWidth / 2</span> , rmode-&gt;efbHeight, 0.0f, 1.0f);
GX_SetScissor (0, 0, <span style="color:#FF0000">rmode-&gt;fbWidth / 2</span> , rmode-&gt;efbHeight);</b>
GRRLIB_3dMode(0.1f,1000,45, true, false);
Draw_SkyBox();
Texture_Apply(idtexture,true);
Draw_Box();	

// screen n°2 : right screen
GRRLIB_Camera3dSettings(camera2[0],camera2[1],camera2[2],0.0f,1.0f,0.0f,0.0f,	0.0f,	0.0f	);
<b>GX_SetViewport(<span style="color:#FF0000">rmode-&gt;fbWidth / 2</span>, 0.0f, <span style="color:#FF0000">rmode-&gt;fbWidth / 2</span> , rmode-&gt;efbHeight, 0.0f, 1.0f);
GX_SetScissor (<span style="color:#FF0000">rmode-&gt;fbWidth / 2</span>, 0, <span style="color:#FF0000">rmode-&gt;fbWidth / 2</span> , rmode-&gt;efbHeight);</b>
GRRLIB_3dMode(0.1f,1000,45, true, false);
Draw_SkyBox();
Texture_Apply(idtexture,true);
Draw_Box();</pre><br />It&#039;s the result : (20fps with Dolphin - 50fps with the Wii)<br /><img src="http://tchagui.files.wordpress.com/2013/08/tchagui_test_splitscreen.png" class="bbcode" border="0" />]]></description>
<dc:creator>tchagui</dc:creator>
<category>Coding</category><pubDate>Mon, 12 Aug 2013 22:48:36 +0200</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,72952,72959#msg-72959</guid>
<title>Re: How to do a split screen ?</title><link>http://forum.wiibrew.org/read.php?11,72952,72959#msg-72959</link><description><![CDATA[ cool, right now I&#039;m kinda stuck on the code for implementing online leader boards into NewoAsteroids. But I have started a multiplayer party game (probably zombies or like super mario war) and a long overdue update of NewoShooter with extra levels.]]></description>
<dc:creator>owen</dc:creator>
<category>Coding</category><pubDate>Mon, 20 May 2013 15:21:36 +0200</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,72952,72958#msg-72958</guid>
<title>Re: How to do a split screen ?</title><link>http://forum.wiibrew.org/read.php?11,72952,72958#msg-72958</link><description><![CDATA[ Hello Owen,<br />Thank you for your answer too. I will post the result when it runs :-)<br /><br />Another games after Newo Asteroids ?]]></description>
<dc:creator>tchagui</dc:creator>
<category>Coding</category><pubDate>Mon, 20 May 2013 11:59:23 +0200</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,72952,72957#msg-72957</guid>
<title>Re: How to do a split screen ?</title><link>http://forum.wiibrew.org/read.php?11,72952,72957#msg-72957</link><description><![CDATA[ I think you will have to set the Viewport then draw some stuff. then set the viewport for the second player and draw some more stuff from the second players point of view. At least thats how I think it works.]]></description>
<dc:creator>owen</dc:creator>
<category>Coding</category><pubDate>Mon, 20 May 2013 02:07:23 +0200</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,72952,72956#msg-72956</guid>
<title>Re: How to do a split screen ?</title><link>http://forum.wiibrew.org/read.php?11,72952,72956#msg-72956</link><description><![CDATA[ Hello Antibyte,<br />Thank you for your answer. I will try your solution :-)]]></description>
<dc:creator>tchagui</dc:creator>
<category>Coding</category><pubDate>Sun, 19 May 2013 16:14:44 +0200</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,72952,72955#msg-72955</guid>
<title>Re: How to do a split screen ?</title><link>http://forum.wiibrew.org/read.php?11,72952,72955#msg-72955</link><description><![CDATA[ Sorry, I don&#039;t know how it&#039;s done using GRRLIB.<br /><br />In Wire3D you simply do a &#039;SetViewport(left, right, top, bottom)&#039; on the Camera to render to a rectangle on screen defined by the given values (ranging [0,1]).<br /><br />In GX, you have to use GX_SetViewport/GX_SetViewportJitter and GX_SetScissor to set it up.]]></description>
<dc:creator>antibyte</dc:creator>
<category>Coding</category><pubDate>Sun, 19 May 2013 12:56:10 +0200</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,72952,72952#msg-72952</guid>
<title>How to do a split screen ?</title><link>http://forum.wiibrew.org/read.php?11,72952,72952#msg-72952</link><description><![CDATA[ Hello,<br /><br />I would like make another " Kurushi Wii " with two players and a split screen :-) I use GX/GRRLIB but I don&#039;t find how to initialize this split screen.<br />Somebody knows how to initialize a split screen ? or somebody has a link ? an example ?<br />Thanks :-)]]></description>
<dc:creator>tchagui</dc:creator>
<category>Coding</category><pubDate>Sat, 18 May 2013 22:26:30 +0200</pubDate></item>
</channel>
</rss>