<?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"
	>
<channel>
	<title>Comments on: Looking at Delphi game development with Asphyre</title>
	<atom:link href="http://blog.excastle.com/2008/02/09/looking-at-delphi-game-development-with-asphyre/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.excastle.com/2008/02/09/looking-at-delphi-game-development-with-asphyre/</link>
	<description>Life, .NET, and Cats</description>
	<pubDate>Mon, 08 Sep 2008 14:55:34 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>By: Lifepower</title>
		<link>http://blog.excastle.com/2008/02/09/looking-at-delphi-game-development-with-asphyre/#comment-5969</link>
		<dc:creator>Lifepower</dc:creator>
		<pubDate>Sun, 17 Feb 2008 16:32:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.excastle.com/2008/02/09/looking-at-delphi-game-development-with-asphyre/#comment-5969</guid>
		<description>Ok, let me go in detail.

&lt;i&gt;"They don’t throw exceptions. They don’t even return numeric error codes"&lt;/i&gt;

Throwing exceptions in full-screen Direct3D app will ruin your app and your IDE (when debugger is enabled) and you won't be able to save your work. Exceptions inside the framework increase &lt;a href="http://en.wikipedia.org/wiki/Coupling_(computer_science)" rel="nofollow"&gt;Coupling&lt;/a&gt;, so you will need to know more about internal working of Asphyre in order to handle its errors properly. Thus, exceptions were not used. 

Many Direct3D calls silently fail and the error code is usually given later on. In most cases, Asphyre intercepts and handles known failures. Also, it is usually easy to determine the cause of error depending on what method failed. Finally, Direct3D debug runtimes give all the necessary debug information for each method and each failure, in detail. End users don't need to know this as their technical level is probably much less than yours. Thus, numerical values are not used. Check our game &lt;a href="http://www.wicked-defense.com" rel="nofollow"&gt;Wicked Defense&lt;/a&gt; to see how errors are handled.

&lt;i&gt;"They don’t seem to have heard of try..finally. As a rule, they don’t do any resource protection."&lt;/i&gt;
You haven't explained what you meant by "resource protection". As for "try..finally" - read above about exceptions.

&lt;i&gt;"Then why was I just able to whip up a proof-of-concept that put two (un)DelphiX TDXDraw instances on the same form? Not to mention the possibility of multiple forms (MDI and/or SDI)."&lt;/i&gt;
Your argument is still very weak. Direct3D needs window handle to present the final rendering on some surface, however, this handle can be changed at any time and thus is independent of a particular instance of TForm, not to mention that technically, it needs to know nothing about Delphi's TForm class. (un)DelphiX does things differently and is heavily dependant on VCL, whereas Asphyre is not. Suffice to say that Asphyre can be used in FPC/Lazarus, while (un)DelphiX cannot.

&lt;i&gt;"Form size (DisplaySize). Classes used to draw on the form (GameDevice, GameCanvas). Variables that are populated by the form, only used by the form, with the same lifetime as the form."&lt;/i&gt;
DisplaySize is the rendering surface size and is independent of form size. Try resizing the form and you will see your rendering rescaled to fit new size.

The form creates these variables as in Factory Pattern. The variables are not necessarily used by the form itself (in Asphyre examples they do for simplicity of code). 

Ideally, Asphyre components must be placed in a separate class called TGraphicsCore. This is an ideal architecture. 

&lt;i&gt;"I do still dislike the globals..."&lt;/i&gt;
Apparently, your whole review is based solely on pure personal taste. You could as well write about how you dislike eating apples or oranges.

Just because you like or dislike something does not mean that a certain feature is badly used. In fact, it makes your review biased and less objective.

I tried my best to clarify few things to you politely even though you have shown a certain arrogance and disrespect to Asphyre developers.</description>
		<content:encoded><![CDATA[<p>Ok, let me go in detail.</p>
<p><i>&#8220;They don’t throw exceptions. They don’t even return numeric error codes&#8221;</i></p>
<p>Throwing exceptions in full-screen Direct3D app will ruin your app and your IDE (when debugger is enabled) and you won&#8217;t be able to save your work. Exceptions inside the framework increase <a href="http://en.wikipedia.org/wiki/Coupling_(computer_science)" rel="nofollow">Coupling</a>, so you will need to know more about internal working of Asphyre in order to handle its errors properly. Thus, exceptions were not used. </p>
<p>Many Direct3D calls silently fail and the error code is usually given later on. In most cases, Asphyre intercepts and handles known failures. Also, it is usually easy to determine the cause of error depending on what method failed. Finally, Direct3D debug runtimes give all the necessary debug information for each method and each failure, in detail. End users don&#8217;t need to know this as their technical level is probably much less than yours. Thus, numerical values are not used. Check our game <a href="http://www.wicked-defense.com" rel="nofollow">Wicked Defense</a> to see how errors are handled.</p>
<p><i>&#8220;They don’t seem to have heard of try..finally. As a rule, they don’t do any resource protection.&#8221;</i><br />
You haven&#8217;t explained what you meant by &#8220;resource protection&#8221;. As for &#8220;try..finally&#8221; - read above about exceptions.</p>
<p><i>&#8220;Then why was I just able to whip up a proof-of-concept that put two (un)DelphiX TDXDraw instances on the same form? Not to mention the possibility of multiple forms (MDI and/or SDI).&#8221;</i><br />
Your argument is still very weak. Direct3D needs window handle to present the final rendering on some surface, however, this handle can be changed at any time and thus is independent of a particular instance of TForm, not to mention that technically, it needs to know nothing about Delphi&#8217;s TForm class. (un)DelphiX does things differently and is heavily dependant on VCL, whereas Asphyre is not. Suffice to say that Asphyre can be used in FPC/Lazarus, while (un)DelphiX cannot.</p>
<p><i>&#8220;Form size (DisplaySize). Classes used to draw on the form (GameDevice, GameCanvas). Variables that are populated by the form, only used by the form, with the same lifetime as the form.&#8221;</i><br />
DisplaySize is the rendering surface size and is independent of form size. Try resizing the form and you will see your rendering rescaled to fit new size.</p>
<p>The form creates these variables as in Factory Pattern. The variables are not necessarily used by the form itself (in Asphyre examples they do for simplicity of code). </p>
<p>Ideally, Asphyre components must be placed in a separate class called TGraphicsCore. This is an ideal architecture. </p>
<p><i>&#8220;I do still dislike the globals&#8230;&#8221;</i><br />
Apparently, your whole review is based solely on pure personal taste. You could as well write about how you dislike eating apples or oranges.</p>
<p>Just because you like or dislike something does not mean that a certain feature is badly used. In fact, it makes your review biased and less objective.</p>
<p>I tried my best to clarify few things to you politely even though you have shown a certain arrogance and disrespect to Asphyre developers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe</title>
		<link>http://blog.excastle.com/2008/02/09/looking-at-delphi-game-development-with-asphyre/#comment-5866</link>
		<dc:creator>Joe</dc:creator>
		<pubDate>Thu, 14 Feb 2008 05:12:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.excastle.com/2008/02/09/looking-at-delphi-game-development-with-asphyre/#comment-5866</guid>
		<description>Lifepower,

&lt;blockquote&gt;This has been discussed to death on PGD. Read thread named “Error handling considerations”.&lt;/blockquote&gt;

Cool. I'd love to read more about this. But it would help if you could give me some idea of where to look. :-)

I took a guess that your reference to "PGD" might have meant "pascalgamedevelopment.com", but there aren't any threads in their Asphyre forum with "error" in the title. I couldn't find anything in the afterwarp.net forums, either. And a Google search for &lt;code&gt;error handling considerations site:pascalgamedevelopment.com&lt;/code&gt; turned up nada, as did &lt;code&gt;error handling considerations asphyre&lt;/code&gt;.

Could you post a URL or something?

&lt;blockquote&gt;if you want to “seriously work with Direct3D” my friend, you’d be using debug runtimes.&lt;/blockquote&gt;

Could be. I know very little about the DirectX debug runtimes at this point. Although I don't quite see how they would make Asphyre return anything more interesting than False.

And they wouldn't do any good when someone &lt;i&gt;else&lt;/i&gt; tries to run my program. With no opportunity to get anything more meaningful than Boolean result codes, I expect any problems would be a bitch to troubleshoot.

&lt;blockquote&gt;Nonsense. Direct3D device *is* global, and it has nothing to do with VCL.&lt;/blockquote&gt;

Hmm. Then why was I just able to whip up a proof-of-concept that put two (un)DelphiX TDXDraw instances on the same form? Not to mention the possibility of multiple forms (MDI and/or SDI).

In fullscreen mode, yes, it might as well be global. But in windowed mode, not so much.

&lt;blockquote&gt;Where did you see “form state”?&lt;/blockquote&gt;

Form size (DisplaySize). Classes used to draw on the form (GameDevice, GameCanvas). Variables that are populated by the form, only used by the form, with the same lifetime as the form.

&lt;blockquote&gt;They are all variables related to Asphyre, which is unrelated to FORM and/or VCL in any way.&lt;/blockquote&gt;

I will grant you that Asphyre is GUI-library agnostic. I hadn't thought about that angle, and I can see using globals to make the code more easily cross-compilable to other libraries. (Although if that was the goal, wouldn't all the drawing code live outside the form, too?)

I do still dislike the globals, but if the reason is easier cross-library compatibility, then that becomes more of a personal preference. There are other ways to do it, but globals do have simplicity going for them.

&lt;blockquote&gt;It’s not cluttered, it’s just happens you don’t like it.&lt;/blockquote&gt;

I suppose that's fair. But it's not a coding style that Delphi developers would find familiar.</description>
		<content:encoded><![CDATA[<p>Lifepower,</p>
<blockquote><p>This has been discussed to death on PGD. Read thread named “Error handling considerations”.</p></blockquote>
<p>Cool. I&#8217;d love to read more about this. But it would help if you could give me some idea of where to look. <img src='http://blog.excastle.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>I took a guess that your reference to &#8220;PGD&#8221; might have meant &#8220;pascalgamedevelopment.com&#8221;, but there aren&#8217;t any threads in their Asphyre forum with &#8220;error&#8221; in the title. I couldn&#8217;t find anything in the afterwarp.net forums, either. And a Google search for <code>error handling considerations site:pascalgamedevelopment.com</code> turned up nada, as did <code>error handling considerations asphyre</code>.</p>
<p>Could you post a URL or something?</p>
<blockquote><p>if you want to “seriously work with Direct3D” my friend, you’d be using debug runtimes.</p></blockquote>
<p>Could be. I know very little about the DirectX debug runtimes at this point. Although I don&#8217;t quite see how they would make Asphyre return anything more interesting than False.</p>
<p>And they wouldn&#8217;t do any good when someone <i>else</i> tries to run my program. With no opportunity to get anything more meaningful than Boolean result codes, I expect any problems would be a bitch to troubleshoot.</p>
<blockquote><p>Nonsense. Direct3D device *is* global, and it has nothing to do with VCL.</p></blockquote>
<p>Hmm. Then why was I just able to whip up a proof-of-concept that put two (un)DelphiX TDXDraw instances on the same form? Not to mention the possibility of multiple forms (MDI and/or SDI).</p>
<p>In fullscreen mode, yes, it might as well be global. But in windowed mode, not so much.</p>
<blockquote><p>Where did you see “form state”?</p></blockquote>
<p>Form size (DisplaySize). Classes used to draw on the form (GameDevice, GameCanvas). Variables that are populated by the form, only used by the form, with the same lifetime as the form.</p>
<blockquote><p>They are all variables related to Asphyre, which is unrelated to FORM and/or VCL in any way.</p></blockquote>
<p>I will grant you that Asphyre is GUI-library agnostic. I hadn&#8217;t thought about that angle, and I can see using globals to make the code more easily cross-compilable to other libraries. (Although if that was the goal, wouldn&#8217;t all the drawing code live outside the form, too?)</p>
<p>I do still dislike the globals, but if the reason is easier cross-library compatibility, then that becomes more of a personal preference. There are other ways to do it, but globals do have simplicity going for them.</p>
<blockquote><p>It’s not cluttered, it’s just happens you don’t like it.</p></blockquote>
<p>I suppose that&#8217;s fair. But it&#8217;s not a coding style that Delphi developers would find familiar.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lifepower</title>
		<link>http://blog.excastle.com/2008/02/09/looking-at-delphi-game-development-with-asphyre/#comment-5857</link>
		<dc:creator>Lifepower</dc:creator>
		<pubDate>Wed, 13 Feb 2008 18:52:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.excastle.com/2008/02/09/looking-at-delphi-game-development-with-asphyre/#comment-5857</guid>
		<description>1) "They don’t throw exceptions."

This has been discussed to death on PGD. Read thread named "Error handling considerations".

2) "They don’t even return numeric error codes."

This is how older versions of Asphyre did it. However, if you want to "seriously work with Direct3D" my friend, you'd be using debug runtimes. ;)

3) "They seem to like using global variables to hold non-global state."

Nonsense. Direct3D device *is* global, and it has nothing to do with VCL. Same applies to other Asphyre components, which are stored as global variables.

4) "To take one specific example, the “Basic” sample project, in the Asphyre Casual package, stores form state in a unit full of global variables. Shouldn’t form state be on the form?"

Where did you see "form state"? They are all variables related to Asphyre, which is unrelated to FORM and/or VCL in any way.

P.S. The coding style is propietary. It's not cluttered, it's just happens you don't like it.

When you are talking about the "experience of Asphyre developers", please search on Google the following article:

"Unskilled and Unaware of It: How Difficulties in Recognizing One's Own
Incompetence Lead to Inflated Self-Assessments"

It will help you improve the quality of your reviews.</description>
		<content:encoded><![CDATA[<p>1) &#8220;They don’t throw exceptions.&#8221;</p>
<p>This has been discussed to death on PGD. Read thread named &#8220;Error handling considerations&#8221;.</p>
<p>2) &#8220;They don’t even return numeric error codes.&#8221;</p>
<p>This is how older versions of Asphyre did it. However, if you want to &#8220;seriously work with Direct3D&#8221; my friend, you&#8217;d be using debug runtimes. <img src='http://blog.excastle.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>3) &#8220;They seem to like using global variables to hold non-global state.&#8221;</p>
<p>Nonsense. Direct3D device *is* global, and it has nothing to do with VCL. Same applies to other Asphyre components, which are stored as global variables.</p>
<p>4) &#8220;To take one specific example, the “Basic” sample project, in the Asphyre Casual package, stores form state in a unit full of global variables. Shouldn’t form state be on the form?&#8221;</p>
<p>Where did you see &#8220;form state&#8221;? They are all variables related to Asphyre, which is unrelated to FORM and/or VCL in any way.</p>
<p>P.S. The coding style is propietary. It&#8217;s not cluttered, it&#8217;s just happens you don&#8217;t like it.</p>
<p>When you are talking about the &#8220;experience of Asphyre developers&#8221;, please search on Google the following article:</p>
<p>&#8220;Unskilled and Unaware of It: How Difficulties in Recognizing One&#8217;s Own<br />
Incompetence Lead to Inflated Self-Assessments&#8221;</p>
<p>It will help you improve the quality of your reviews.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jarrod Davis</title>
		<link>http://blog.excastle.com/2008/02/09/looking-at-delphi-game-development-with-asphyre/#comment-5847</link>
		<dc:creator>Jarrod Davis</dc:creator>
		<pubDate>Wed, 13 Feb 2008 04:48:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.excastle.com/2008/02/09/looking-at-delphi-game-development-with-asphyre/#comment-5847</guid>
		<description>Downloads are now available. We are still in beta at the moment, but things are pretty solid. Lots of great features we hope to get in the 2.0 release.</description>
		<content:encoded><![CDATA[<p>Downloads are now available. We are still in beta at the moment, but things are pretty solid. Lots of great features we hope to get in the 2.0 release.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fitz</title>
		<link>http://blog.excastle.com/2008/02/09/looking-at-delphi-game-development-with-asphyre/#comment-5836</link>
		<dc:creator>fitz</dc:creator>
		<pubDate>Tue, 12 Feb 2008 13:52:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.excastle.com/2008/02/09/looking-at-delphi-game-development-with-asphyre/#comment-5836</guid>
		<description>It's not easy to learn, but is a great library once you do.</description>
		<content:encoded><![CDATA[<p>It&#8217;s not easy to learn, but is a great library once you do.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
