<?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>f = ma &#187; Links</title>
	<atom:link href="http://www.fysx.org/category/things-to-know/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.fysx.org</link>
	<description>gamedev, math, physics</description>
	<lastBuildDate>Tue, 31 Jan 2012 21:12:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>disable library versioning with qmake</title>
		<link>http://www.fysx.org/2010/10/20/disable-library-versioning-with-qmake/</link>
		<comments>http://www.fysx.org/2010/10/20/disable-library-versioning-with-qmake/#comments</comments>
		<pubDate>Wed, 20 Oct 2010 11:55:59 +0000</pubDate>
		<dc:creator>Martin Felis</dc:creator>
				<category><![CDATA[Links]]></category>
		<category><![CDATA[hint]]></category>
		<category><![CDATA[qmake]]></category>

		<guid isPermaLink="false">http://www.fysx.org/?p=208</guid>
		<description><![CDATA[<a href="http://www.fysx.org/2010/10/20/disable-library-versioning-with-qmake/" title="disable library versioning with qmake"></a>For another project I am working on we use Qt as a portability layer and hence also qmake for our build tool. We are also utilizing some other open-source libraries such as lua and bullet for which we also use &#8230;<p class="read-more"><a href="http://www.fysx.org/2010/10/20/disable-library-versioning-with-qmake/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://www.fysx.org/2010/10/20/disable-library-versioning-with-qmake/" title="disable library versioning with qmake"></a><p>For another project I am working on we use <a href="http://qt.nokia.com/">Qt</a> as a portability layer and hence also <a href="http://doc.qt.nokia.com/4.6/qmake-manual.html">qmake</a> for our build tool. We are also utilizing some other open-source libraries such as <a href="http://www.lua.org/">lua</a> and <a href="http://www.bulletphysics.com/">bullet</a> for which we also use qmake. For lua our qmake project file looks (similar) like this:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">TEMPLATE = lib
CONFIG += dll
TARGET = lua
DESTDIR = ../../../bin/
&nbsp;
INCLUDEPATH += ./
&nbsp;
SOURCES = print.c \
    lzio.c \
    lvm.c \
    lundump.c \
...</pre></div></div>

<p>and the funny thing is that it creates in the destination folder three symbolic links with names liblua.so, liblua.so.1, and liblua.so.1.0 that all point to the file liblua.so.1.0.0. This is the case for every library, eg. libname would result in the links libname.so, libname.so.1, and libname.so.1.0 and the actual library would be libname.so.1.0.0.</p>
<p>This all is due to the versioning that qmake does automatically for the libraries (e.g. projects with CONFIG += dll).</p>
<p>Now to disable it, you have to add the keyword <strong>plugin</strong> to the CONFIG specification in your qmake project file:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">TEMPLATE = lib
CONFIG += dll plugin
...</pre></div></div>

<p>After doing so, all the links disappear and you end up with a single liblua.so (or libname.so) as one might want to have it in the first place.</p>
<p>Now that is done &#8230; back to work!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fysx.org/2010/10/20/disable-library-versioning-with-qmake/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>About the View in a Model-View-Controller</title>
		<link>http://www.fysx.org/2010/02/25/about-the-view-in-a-model-view-controller/</link>
		<comments>http://www.fysx.org/2010/02/25/about-the-view-in-a-model-view-controller/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 11:37:30 +0000</pubDate>
		<dc:creator>Martin Felis</dc:creator>
				<category><![CDATA[Links]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[patterns]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[view]]></category>

		<guid isPermaLink="false">http://www.fysx.org/?p=39</guid>
		<description><![CDATA[<a href="http://www.fysx.org/2010/02/25/about-the-view-in-a-model-view-controller/" title="About the View in a Model-View-Controller"></a>I recently bought the third edition of the book &#8220;Game Coding Complete&#8221; from Mike McShaffry (a.k.a. MrMike) et al. which has been very delightful to read so far. I have been reading a few chapters which gave me a new &#8230;<p class="read-more"><a href="http://www.fysx.org/2010/02/25/about-the-view-in-a-model-view-controller/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://www.fysx.org/2010/02/25/about-the-view-in-a-model-view-controller/" title="About the View in a Model-View-Controller"></a><p>I recently bought the third edition of the book &#8220;<a href="http://www.amazon.com/Game-Coding-Complete-Third-McShaffry/dp/1584506806" target="_blank">Game Coding Complete</a>&#8221; from <a href="http://www.mcshaffry.com/mrmike/" target="_blank">Mike McShaffry (a.k.a. MrMike)</a> et al. which has been very delightful to read so far. I have been reading a few chapters which gave me a new way of looking at game architecture and other things that I was convinced that I already understood them quite well.</p>
<p>One of them is the famously known <a href="http://en.wikipedia.org/wiki/Design_pattern_%28computer_science%29" target="_blank">Design Pattern</a>: the <a href="http://en.wikipedia.org/wiki/Model-View-Controller" target="_blank">Model-View-Controller</a>. To me, the Model always was the data that is being modified, the Controller takes care of the input (mouse, keyboard, maybe network, &#8230;) sent to the application and the View simply displays the data. If you want to improve graphics &#8211; you work on the View. You want to update keybindings in your input system &#8211; you&#8217;ll modify the Controller. Also the Controller keeps track of the player id that tells us which entity is being controlled by the player. Need a new type of vehicle / weapon? &#8211; Go to your Model (and of course, add code to the Controller and View to reflect them).</p>
<p>So far so good.</p>
<p>However in this book Mike gives an overview of a game architecture consisting of three basic parts: the Application Layer, the Game Logic and <em>multiple</em> Game Views. The Application layer hides the platform specific from the game and the Game Logic resembles what is going on in the game. The Game Views represent the game from different perspectives e.g. for a human player or a AI agent.</p>
<div id="attachment_50" class="wp-caption aligncenter" style="width: 410px"><a href="http://www.fysx.org/files/2010/02/architecture.png"><img class="size-full wp-image-50" title="architecture" src="http://www.fysx.org/files/2010/02/architecture.png" alt="" width="400" height="165" /></a><p class="wp-caption-text">Game Architecture after Mike McShaffry</p></div>
<p style="text-align: center;">
<p>At first my head tried to map them onto a Model-View-Controller which failed as they resemble completely different things. Especially the description of the Game View gave me a different way of looking at the View in a Model-View-Controller. The Game View does not only<em> display</em> what is going on in the game, instead it also takes care of the <em>input handling</em>. More specific: the Game Views receive all the input events (key presses, etc.) and communicate with the Game Logic over events.</p>
<p>At first this seems a bit awkward concerning to what I wrote further up concerning the View, but giving the view the ability to receive input and send events has some nice properties. For example it might be &#8220;easier&#8221; to add a split-screen mechanic as each player has its own Game View (remember: we have <em>multiple</em> Game Views!) and also its own keybindings. Also one could imagine having a GameEditView which has completely different abilities than e.g. a HumanGameView. This gives the View more power as it also contains not only the way <em>how you look</em> at things but also <em>how you interact</em>.</p>
<p>Maybe I got it all mixed up, however I think it one shouldn&#8217;t be too strict on saying input is clearly handled in the Controller or that the job of a View is drawing only.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fysx.org/2010/02/25/about-the-view-in-a-model-view-controller/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

