<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
	
	>
<channel>
	<title>Comments on: Watch out, you&#8217;re being observed!</title>
	<atom:link href="http://gamesarchitecture.com/watch-out-youre-being-observed/feed/" rel="self" type="application/rss+xml" />
	<link>http://gamesarchitecture.com/watch-out-youre-being-observed/</link>
	<description>For indie developers who already know that making games is not easy</description>
	<lastBuildDate>Tue, 12 Jun 2018 17:01:12 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.9.8</generator>
	<item>
		<title>By: JediPanda</title>
		<link>http://gamesarchitecture.com/watch-out-youre-being-observed/#comment-18</link>
		<dc:creator><![CDATA[JediPanda]]></dc:creator>
		<pubDate>Wed, 19 Jul 2017 07:00:51 +0000</pubDate>
		<guid isPermaLink="false">http://gamesarchitecture.com/?p=172#comment-18</guid>
		<description><![CDATA[Thank you for clearing out this for me.]]></description>
		<content:encoded><![CDATA[<p>Thank you for clearing out this for me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bartosz</title>
		<link>http://gamesarchitecture.com/watch-out-youre-being-observed/#comment-17</link>
		<dc:creator><![CDATA[Bartosz]]></dc:creator>
		<pubDate>Tue, 18 Jul 2017 21:46:05 +0000</pubDate>
		<guid isPermaLink="false">http://gamesarchitecture.com/?p=172#comment-17</guid>
		<description><![CDATA[It does affect performance, but the difference is negligently small. The benefits are totally worth it. The performance overhead would be much higher if events were dynamically created objects. In above example, they are not. There is some level of indirection, though. If you&#039;re familiar with C++, you can think of it as a container of pointers to functions.

The Observer actually pattern reduces the complexity. It causes that in lower-level classes you don&#039;t have to bother about higher-level ones. It means that the lower-level classes are simpler because they are using less amount of other classes. They do less. And the higher-level classes? They do a higher amount of the same work. They are already using the lower-level classes anyway. Adding another class that uses existed events doesn&#039;t increase the complexity of the lower-level classes. It would be the case if you were call methods directly.

You can use as many events as you like, wherever it makes sense. Usually, you&#039;re using events when you want to lower-level  (i.e. Obstacle) class to communicate something to a higher-level class (i.e. Level Controller). When classes are on the same level (of abstraction), for example, Player and Enemy, you can do simple method call. Or make them call events and make some kind of Fight Controller to take care of calling methods on them directly. I usually end up with a majority of classes that call events and, in my opinion, that&#039;s totally okay.]]></description>
		<content:encoded><![CDATA[<p>It does affect performance, but the difference is negligently small. The benefits are totally worth it. The performance overhead would be much higher if events were dynamically created objects. In above example, they are not. There is some level of indirection, though. If you&#8217;re familiar with C++, you can think of it as a container of pointers to functions.</p>
<p>The Observer actually pattern reduces the complexity. It causes that in lower-level classes you don&#8217;t have to bother about higher-level ones. It means that the lower-level classes are simpler because they are using less amount of other classes. They do less. And the higher-level classes? They do a higher amount of the same work. They are already using the lower-level classes anyway. Adding another class that uses existed events doesn&#8217;t increase the complexity of the lower-level classes. It would be the case if you were call methods directly.</p>
<p>You can use as many events as you like, wherever it makes sense. Usually, you&#8217;re using events when you want to lower-level  (i.e. Obstacle) class to communicate something to a higher-level class (i.e. Level Controller). When classes are on the same level (of abstraction), for example, Player and Enemy, you can do simple method call. Or make them call events and make some kind of Fight Controller to take care of calling methods on them directly. I usually end up with a majority of classes that call events and, in my opinion, that&#8217;s totally okay.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JediPanda</title>
		<link>http://gamesarchitecture.com/watch-out-youre-being-observed/#comment-16</link>
		<dc:creator><![CDATA[JediPanda]]></dc:creator>
		<pubDate>Tue, 18 Jul 2017 11:31:41 +0000</pubDate>
		<guid isPermaLink="false">http://gamesarchitecture.com/?p=172#comment-16</guid>
		<description><![CDATA[Glad to say that I&#039;ve read this fully and even understand the concept, probably because I&#039;m not that unfamiliar with it, however, I never had used it until now, probably because I haven&#039;t really understood it, but after reading this, I would definitely use it. 

I do have a question, (probably you mention it above in the article &quot;You can find more technical one (memory and performance) here and I’ll add one more, from the programmer point of view&quot;).
How many observers are ok in a game so that it won&#039;t affect the performance or the complexity of the game?

I mean I can see myself using it in a lot of cases, for scoring, levels, enemies, maybe for tracking different events in the game and so on, is it to much If I choose to use it for all the game events, would it be wrong? Would it be hard to manage the complexity? Would this affect the performance of the game in a bad way?]]></description>
		<content:encoded><![CDATA[<p>Glad to say that I&#8217;ve read this fully and even understand the concept, probably because I&#8217;m not that unfamiliar with it, however, I never had used it until now, probably because I haven&#8217;t really understood it, but after reading this, I would definitely use it. </p>
<p>I do have a question, (probably you mention it above in the article &#8220;You can find more technical one (memory and performance) here and I’ll add one more, from the programmer point of view&#8221;).<br />
How many observers are ok in a game so that it won&#8217;t affect the performance or the complexity of the game?</p>
<p>I mean I can see myself using it in a lot of cases, for scoring, levels, enemies, maybe for tracking different events in the game and so on, is it to much If I choose to use it for all the game events, would it be wrong? Would it be hard to manage the complexity? Would this affect the performance of the game in a bad way?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
