<?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>Leif Node</title>
	<atom:link href="https://leifnode.com/tag/xna-4-0/feed/" rel="self" type="application/rss+xml" />
	<link>https://leifnode.com</link>
	<description>Leif Erkenbrach&#039;s programming blog</description>
	<lastBuildDate>Wed, 22 Jul 2015 23:00:42 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=3.9.40</generator>
	<item>
		<title>Networked Spacewar Clone</title>
		<link>https://leifnode.com/2014/03/networked-spacewar-clone/</link>
		<comments>https://leifnode.com/2014/03/networked-spacewar-clone/#comments</comments>
		<pubDate>Sat, 15 Mar 2014 10:36:03 +0000</pubDate>
		<dc:creator><![CDATA[Leif Erkenbrach]]></dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[XNA]]></category>
		<category><![CDATA[XNA 4.0]]></category>

		<guid isPermaLink="false">http://leifnode.com/?p=146</guid>
		<description><![CDATA[For my game networking class last semester I made a networked version of the 1962 game Spacewar. I made this using XNA 4.0 and set the game up on a client-server model where the host is the designated authoritative server that has the final say in health calculations. In the last segment of the video the game has a planet …<p> <a class="continue-reading-link" href="https://leifnode.com/2014/03/networked-spacewar-clone/">Continue reading<i class="icon-right-dir"></i></a></p>]]></description>
				<content:encoded><![CDATA[<p>For my game networking class last semester I made a networked version of the 1962 game <a href="http://en.wikipedia.org/wiki/Spacewar_%28video_game%29">Spacewar</a>. I made this using XNA 4.0 and set the game up on a client-server model where the host is the designated authoritative server that has the final say in health calculations. In the last segment of the video the game has a planet in the center of the screen which attracts all players and will kill them on contact.</p>
<p>In order to reduce the number of packets that I needed to send each packet was split into sections of data that contained a header field and a data field. The header contained a byte to signify the packet type and an unsigned integer to describe the size of the section.</p>
<p><iframe src="//www.youtube.com/embed/PJTnwuhWHN0?rel=0" height="315" width="560" allowfullscreen="" frameborder="0"></iframe></p>
<p>Over the course of the few weeks after I made this I built upon it by adding prediction and smoothing of the player and projectile positions so that the movement of players appeared smooth and accurate to every player when there was a large amount of latency between them and the server.</p>
]]></content:encoded>
			<wfw:commentRss>https://leifnode.com/2014/03/networked-spacewar-clone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
