<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>unreal engine sessions Archives - Couch Learn</title>
	<atom:link href="https://couchlearn.com/tag/unreal-engine-sessions/feed/" rel="self" type="application/rss+xml" />
	<link>https://couchlearn.com/tag/unreal-engine-sessions/</link>
	<description>Detailed Game Programming Tutorials</description>
	<lastBuildDate>Sun, 10 Jan 2021 23:54:33 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.5</generator>

<image>
	<url>https://couchlearn.com/wp-content/uploads/2020/05/cropped-logolarge-32x32.png</url>
	<title>unreal engine sessions Archives - Couch Learn</title>
	<link>https://couchlearn.com/tag/unreal-engine-sessions/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to use Multiplayer Sessions in your Unreal Engine 4 game</title>
		<link>https://couchlearn.com/multiplayer-sessions-in-your-unreal-engine-4-game/</link>
					<comments>https://couchlearn.com/multiplayer-sessions-in-your-unreal-engine-4-game/#comments</comments>
		
		<dc:creator><![CDATA[Matt]]></dc:creator>
		<pubDate>Wed, 31 Jul 2019 17:25:05 +0000</pubDate>
				<category><![CDATA[Medium Difficulty]]></category>
		<category><![CDATA[Multiplayer]]></category>
		<category><![CDATA[Unreal Engine]]></category>
		<category><![CDATA[multiplayer]]></category>
		<category><![CDATA[multiplayer session]]></category>
		<category><![CDATA[sessions]]></category>
		<category><![CDATA[ue4]]></category>
		<category><![CDATA[ue4 multiplayer]]></category>
		<category><![CDATA[unreal engine]]></category>
		<category><![CDATA[unreal engine multiplayer]]></category>
		<category><![CDATA[unreal engine sessions]]></category>
		<guid isPermaLink="false">https://couchlearn.com/?p=382</guid>

					<description><![CDATA[<p>The Session System in Unreal Engine 4 gives you access to many powerful online features such as the server browser, setting a maximum player limits, <a class="mh-excerpt-more" href="https://couchlearn.com/multiplayer-sessions-in-your-unreal-engine-4-game/" title="How to use Multiplayer Sessions in your Unreal Engine 4 game">[...]</a></p>
<p>The post <a href="https://couchlearn.com/multiplayer-sessions-in-your-unreal-engine-4-game/">How to use Multiplayer Sessions in your Unreal Engine 4 game</a> appeared first on <a href="https://couchlearn.com">Couch Learn</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>The Session System in Unreal Engine 4 gives you access to many powerful online features such as the server browser, setting a maximum player limits, setting private and public slots and much more. </p>



<p>Using this system is very straightforward and only takes a few blueprint nodes to get working. </p>



<p>In this guide I will show you how to setup multiplayer in Unreal Engine 4 using the session system. We will setup a simple session and connect to it through another player.</p>



<h3 class="wp-block-heading">Online and LAN Support</h3>



<p>Unreal Engine&#8217;s default online subsystem can not find sessions outside of the local network the player is in.<br><br>To find and connect to sessions outside of your local network without a direct IP address connection you will need to use a different subsystem such as Steam.<br><br><a href="https://docs.unrealengine.com/en-US/Programming/Online/Steam/index.html"><em>Click here to read the documentation for the Steam subsystem</em></a></p>



<h2 class="wp-block-heading">Starting a Multiplayer Session</h2>



<h3 class="wp-block-heading">Creating the Session</h3>



<p>To start I created a simple widget with two buttons. One is host and one is play.</p>



<p>On the host button event use the create session blueprint node.</p>



<figure class="wp-block-image"><img fetchpriority="high" decoding="async" width="545" height="167" src="https://couchlearn.com/wp-content/uploads/2019/07/image-81.png" alt="Creating the session" class="wp-image-643" srcset="https://couchlearn.com/wp-content/uploads/2019/07/image-81.png 545w, https://couchlearn.com/wp-content/uploads/2019/07/image-81-300x92.png 300w" sizes="(max-width: 545px) 100vw, 545px" /></figure>



<p>On the player controller pin, connect a &#8220;Get Player Controller&#8221; node and for the public connections pin set it to the maximum amount of players you want for this game. </p>



<p><strong>Public connections is the maximum amount of players that can be connected to your server at once.</strong></p>



<figure class="wp-block-image"><img decoding="async" width="543" height="169" src="https://couchlearn.com/wp-content/uploads/2019/07/image-82.png" alt="Adding the nodes to the Create Session node" class="wp-image-644" srcset="https://couchlearn.com/wp-content/uploads/2019/07/image-82.png 543w, https://couchlearn.com/wp-content/uploads/2019/07/image-82-300x93.png 300w" sizes="(max-width: 543px) 100vw, 543px" /></figure>



<p>If &#8220;Use Lan&#8221; is checked the session you create will be only available on your local internet. </p>



<h3 class="wp-block-heading">Opening Levels to Multiplayer</h3>



<p>To create a multiplayer game using your level, add a new &#8220;Open Level&#8221; node and set the &#8220;Level Name&#8221; pin to the level you wish to play on. In my case this is FirstPersonExampleMap.</p>



<figure class="wp-block-image"><img decoding="async" width="247" height="145" src="https://couchlearn.com/wp-content/uploads/2019/07/image-84.png" alt="Opening the level" class="wp-image-646"/></figure>



<p>The important step is to click the triangle at the bottom of this node to expose the extra settings.</p>



<figure class="wp-block-image"><img decoding="async" width="243" height="135" src="https://couchlearn.com/wp-content/uploads/2019/07/image-86.png" alt="Additional settings when opening the level" class="wp-image-649"/></figure>



<p>The &#8220;Absolute&#8221; checkbox and the &#8220;Options&#8221; text box pins are now visible. In the Options pin type exactly:</p>



<pre class="wp-block-code"><code>?listen</code></pre>



<p>This code sets the level up to listen for multiplayer connections as a Listen Server.</p>



<figure class="wp-block-image"><img decoding="async" width="249" height="205" src="https://couchlearn.com/wp-content/uploads/2019/07/image-85.png" alt="Adding ?listen to the additional settings." class="wp-image-648"/></figure>



<p>With these steps complete, the code should look like this.</p>



<figure class="wp-block-image"><img decoding="async" width="799" height="244" src="https://couchlearn.com/wp-content/uploads/2019/07/image-83.png" alt="Complete host code" class="wp-image-645" srcset="https://couchlearn.com/wp-content/uploads/2019/07/image-83.png 799w, https://couchlearn.com/wp-content/uploads/2019/07/image-83-300x92.png 300w, https://couchlearn.com/wp-content/uploads/2019/07/image-83-768x235.png 768w" sizes="(max-width: 799px) 100vw, 799px" /></figure>



<h2 class="wp-block-heading">Connecting to your Multiplayer Session</h2>



<h3 class="wp-block-heading">Finding Sessions</h3>



<p>Finding sessions using blueprints is simple. The Find Sessions node handles all this for us. It outputs different execution pins based on if it succeeded or failed and the results that it found as an array.</p>



<p>If you aren&#8217;t familiar with arrays <a href="https://couchlearn.com/how-to-use-loops-and-arrays-unreal-engine-4/">click here to learn about arrays in Unreal Engine 4.</a></p>



<p>To start I created the Find Sessions node attached to the Play button in my widget.</p>



<figure class="wp-block-image"><img decoding="async" width="509" height="165" src="https://couchlearn.com/wp-content/uploads/2019/07/image-87.png" alt="Find sessions node" class="wp-image-650" srcset="https://couchlearn.com/wp-content/uploads/2019/07/image-87.png 509w, https://couchlearn.com/wp-content/uploads/2019/07/image-87-300x97.png 300w" sizes="(max-width: 509px) 100vw, 509px" /></figure>



<p>On the player controller pin connect a &#8220;Get Player Controller&#8221; node and the Max Results pin is set to 100.</p>



<figure class="wp-block-image"><img decoding="async" width="517" height="180" src="https://couchlearn.com/wp-content/uploads/2019/07/image-88.png" alt="Adding nodes to the Find Sessions node" class="wp-image-652" srcset="https://couchlearn.com/wp-content/uploads/2019/07/image-88.png 517w, https://couchlearn.com/wp-content/uploads/2019/07/image-88-300x104.png 300w" sizes="(max-width: 517px) 100vw, 517px" /></figure>



<p>The Use Lan checkbox, if checked, will only search for sessions in your local area.</p>



<h3 class="wp-block-heading">Joining the Session</h3>



<p>To join a session in Unreal Engine 4, create a Join Session node.</p>



<p>This node requires the player&#8217;s controller and a session from the Find Sessions array in the previous step.</p>



<figure class="wp-block-image"><img decoding="async" width="248" height="135" src="https://couchlearn.com/wp-content/uploads/2019/07/image-89.png" alt="Join session node" class="wp-image-653"/></figure>



<p>Firstly I will create a Get Player Controller node and attach it to the Join Session node.</p>



<figure class="wp-block-image"><img decoding="async" width="276" height="211" src="https://couchlearn.com/wp-content/uploads/2019/07/image-90.png" alt="Adding the player controller to the Join Session node" class="wp-image-654"/></figure>



<p>From the Results output pin of the Find Sessions node in the previous step I created a Get node. This will find the first session in the list.</p>



<figure class="wp-block-image"><img decoding="async" width="548" height="319" src="https://couchlearn.com/wp-content/uploads/2019/07/image-91.png" alt="Getting session results from the Find Session node" class="wp-image-655" srcset="https://couchlearn.com/wp-content/uploads/2019/07/image-91.png 548w, https://couchlearn.com/wp-content/uploads/2019/07/image-91-300x175.png 300w" sizes="(max-width: 548px) 100vw, 548px" /></figure>



<p>This is then attached to the Search Results input pin of the Join Session node.</p>



<figure class="wp-block-image"><img decoding="async" width="551" height="320" src="https://couchlearn.com/wp-content/uploads/2019/07/image-94.png" alt="Attaching the found session to the join session node." class="wp-image-658" srcset="https://couchlearn.com/wp-content/uploads/2019/07/image-94.png 551w, https://couchlearn.com/wp-content/uploads/2019/07/image-94-300x174.png 300w" sizes="(max-width: 551px) 100vw, 551px" /></figure>



<p>Finally, the Join Session node is attached to the On Success execution pin of the Find Sessions node.</p>



<figure class="wp-block-image"><img decoding="async" width="552" height="316" src="https://couchlearn.com/wp-content/uploads/2019/07/image-93.png" alt="Attaching the join session node to the on success pin of the find sessions node" class="wp-image-657" srcset="https://couchlearn.com/wp-content/uploads/2019/07/image-93.png 552w, https://couchlearn.com/wp-content/uploads/2019/07/image-93-300x172.png 300w" sizes="(max-width: 552px) 100vw, 552px" /></figure>



<h3 class="wp-block-heading">Opening the Game Clients</h3>



<p>In Unreal Engine 4, there is a drop down menu next to the play button which gives you access to multiplayer options.</p>



<p>On this menu make sure &#8220;New Editor Window (PIE)&#8221; is selected and the &#8220;Number of Players&#8221; slider is set to anything above 1.</p>



<p>Next, click the Advanced Settings button at the bottom of the menu.</p>



<figure class="wp-block-image"><img decoding="async" width="425" height="465" src="https://couchlearn.com/wp-content/uploads/2019/07/image-95.png" alt="Play settings in Unreal Engine 4" class="wp-image-659" srcset="https://couchlearn.com/wp-content/uploads/2019/07/image-95.png 425w, https://couchlearn.com/wp-content/uploads/2019/07/image-95-274x300.png 274w" sizes="(max-width: 425px) 100vw, 425px" /></figure>



<p>Near the bottom of the Advanced Settings menu, find the a section called Multiplayer Options.</p>



<p><strong>Un-tick</strong> the checkbox &#8220;Auto Connect to Server&#8221;. This prevents the server auto connecting without the session system.</p>



<figure class="wp-block-image"><img decoding="async" width="669" height="217" src="https://couchlearn.com/wp-content/uploads/2019/07/image-96.png" alt="Advanced play settings" class="wp-image-660" srcset="https://couchlearn.com/wp-content/uploads/2019/07/image-96.png 669w, https://couchlearn.com/wp-content/uploads/2019/07/image-96-300x97.png 300w" sizes="(max-width: 669px) 100vw, 669px" /></figure>



<p>Finally, when you press the play button in your editor two clients will open.</p>



<figure class="wp-block-image"><img decoding="async" width="1024" height="550" src="https://couchlearn.com/wp-content/uploads/2019/07/image-97-1024x550.png" alt="Playing with two clients" class="wp-image-661" srcset="https://couchlearn.com/wp-content/uploads/2019/07/image-97-1024x550.png 1024w, https://couchlearn.com/wp-content/uploads/2019/07/image-97-300x161.png 300w, https://couchlearn.com/wp-content/uploads/2019/07/image-97-768x413.png 768w, https://couchlearn.com/wp-content/uploads/2019/07/image-97.png 1837w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>The custom widget discussed earlier,  displays the Host button and Play buttons.</p>



<p>On the first client I pressed the Host button. This reloaded the level.</p>



<figure class="wp-block-image"><img decoding="async" width="1024" height="576" src="https://couchlearn.com/wp-content/uploads/2019/07/image-98-1024x576.png" alt="Hosting the game" class="wp-image-662" srcset="https://couchlearn.com/wp-content/uploads/2019/07/image-98-1024x576.png 1024w, https://couchlearn.com/wp-content/uploads/2019/07/image-98-300x169.png 300w, https://couchlearn.com/wp-content/uploads/2019/07/image-98-768x432.png 768w, https://couchlearn.com/wp-content/uploads/2019/07/image-98.png 1280w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>On the second client I pressed the Play button and waited until the Find Sessions node had finished searching for multiplayer sessions.</p>



<p>Once this finished it auto connected me into the first clients game.</p>



<figure class="wp-block-image"><img decoding="async" width="1024" height="486" src="https://couchlearn.com/wp-content/uploads/2019/07/image-100-1024x486.png" alt="Joining the game and showing two players connected to the same game" class="wp-image-664" srcset="https://couchlearn.com/wp-content/uploads/2019/07/image-100-1024x486.png 1024w, https://couchlearn.com/wp-content/uploads/2019/07/image-100-300x142.png 300w, https://couchlearn.com/wp-content/uploads/2019/07/image-100-768x364.png 768w, https://couchlearn.com/wp-content/uploads/2019/07/image-100.png 1891w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<h3 class="wp-block-heading">Connecting to Sessions Outside your Local Internet Network</h3>



<p>The session created in this guide will can be used in your local network and through the internet.</p>



<p>If you connecting to a session in your local internet, you do not have to do anything else.</p>



<p>If you wish to host your session to global internet users, make sure to <strong>port forward</strong> UDP/TCP 7777. Setting up port forwarding is different per router so check your specific router instructions.</p>



<p><a href="https://en.wikipedia.org/wiki/Port_forwarding">If you don&#8217;t know what port forwarding is click here. </a></p>



<h2 class="wp-block-heading">Download the Project Files</h2>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<script src="https://gumroad.com/js/gumroad-embed.js"></script>
<div class="gumroad-product-embed" data-gumroad-product-id="EvfoJ"><a href="https://gumroad.com/l/EvfoJ">Loading&#8230;</a></div>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<script src="https://gumroad.com/js/gumroad-embed.js"></script>
<div class="gumroad-product-embed" data-gumroad-product-id="rump"><a href="https://gumroad.com/l/rump">Loading&#8230;</a></div>
</div>
</div>



<h2 class="wp-block-heading">Conclusion</h2>



<p>Your multiplayer session is created and players can join!</p>



<p>This guide only brushed over the multiplayer system to start with sessions in Unreal Engine 4. </p>



<p>To learn more about replication and the session system, the Unreal Engine documentation as it is a good place to start. </p>



<p><a href="https://wiki.unrealengine.com/Replication">Click here to read more about Replication. </a></p>



<p><a href="https://docs.unrealengine.com/en-US/Engine/Blueprints/UserGuide/OnlineNodes/index.html">Clic</a><a href="https://docs.unrealengine.com/en-US/Engine/Blueprints/UserGuide/OnlineNodes/index.html"></a><a href="https://docs.unrealengine.com/en-US/Engine/Blueprints/UserGuide/OnlineNodes/index.html">k here to read more about the session system nodes.</a></p>



<h3 class="wp-block-heading">Expanding the System</h3>



<p>To challenge yourself, try create a widget that fills itself with the results of the Find Session nodes. </p>



<p>This, if done correctly, will create a server browser similar to the ones found in games such as Team Fortress 2, Counter Strike and many more.</p>



<figure class="wp-block-image"><img decoding="async" src="http://i.imgur.com/ii81Q.png" alt="Image result for server browser tf2"/></figure>
<p>The post <a href="https://couchlearn.com/multiplayer-sessions-in-your-unreal-engine-4-game/">How to use Multiplayer Sessions in your Unreal Engine 4 game</a> appeared first on <a href="https://couchlearn.com">Couch Learn</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://couchlearn.com/multiplayer-sessions-in-your-unreal-engine-4-game/feed/</wfw:commentRss>
			<slash:comments>26</slash:comments>
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/

Page Caching using Disk: Enhanced 
Minified using Disk

Served from: couchlearn.com @ 2026-04-15 12:58:57 by W3 Total Cache
-->