<?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: Designing Browsergames: a flexible stats system</title>
	<atom:link href="http://buildingbrowsergames.com/2008/05/05/designing-browsergames-a-flexible-stats-system/feed/" rel="self" type="application/rss+xml" />
	<link>http://buildingbrowsergames.com/2008/05/05/designing-browsergames-a-flexible-stats-system/</link>
	<description>Ever wanted to build a browsergame?</description>
	<lastBuildDate>Wed, 10 Mar 2010 20:26:23 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: ABDUKRAHMAN</title>
		<link>http://buildingbrowsergames.com/2008/05/05/designing-browsergames-a-flexible-stats-system/comment-page-1/#comment-512</link>
		<dc:creator>ABDUKRAHMAN</dc:creator>
		<pubDate>Wed, 14 Oct 2009 08:05:10 +0000</pubDate>
		<guid isPermaLink="false">http://buildingbrowsergames.com/?p=24#comment-512</guid>
		<description>I already diged this my firend.&lt;br&gt;&lt;br&gt;regards&lt;br&gt;gibs&lt;br&gt;______________________________________________&lt;br&gt;&lt;a href=&quot;http://www.carportkingdom.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;hunting blind&lt;/a&gt; &#124; &lt;a href=&quot;http://www.knockouthockey.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;best hockey fights&lt;/a&gt; &#124; &lt;a href=&quot;http://www.snorefreenow.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;anti snoring mouthpiece&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>I already diged this my firend.</p>
<p>regards<br />gibs<br />______________________________________________<br /><a href="http://www.carportkingdom.com" target="_blank" rel="nofollow">hunting blind</a> | <a href="http://www.knockouthockey.com" target="_blank" rel="nofollow">best hockey fights</a> | <a href="http://www.snorefreenow.com" target="_blank" rel="nofollow">anti snoring mouthpiece</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Smitty927</title>
		<link>http://buildingbrowsergames.com/2008/05/05/designing-browsergames-a-flexible-stats-system/comment-page-1/#comment-466</link>
		<dc:creator>Smitty927</dc:creator>
		<pubDate>Sat, 19 Sep 2009 05:51:19 +0000</pubDate>
		<guid isPermaLink="false">http://buildingbrowsergames.com/?p=24#comment-466</guid>
		<description>When dealing with a larger player base, having a separate table structure for stats only is the way to go!  The reason for this?  Simple really.  If it is in the user table, and you are running queries on the stats data on every page load, it would be more demanding on the database.&lt;br&gt;&lt;br&gt;To eliminate the need for querying 3 tables as Anubis has pointed out, simply create a new view of the 3 tables and then query that view.</description>
		<content:encoded><![CDATA[<p>When dealing with a larger player base, having a separate table structure for stats only is the way to go!  The reason for this?  Simple really.  If it is in the user table, and you are running queries on the stats data on every page load, it would be more demanding on the database.</p>
<p>To eliminate the need for querying 3 tables as Anubis has pointed out, simply create a new view of the 3 tables and then query that view.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anubis</title>
		<link>http://buildingbrowsergames.com/2008/05/05/designing-browsergames-a-flexible-stats-system/comment-page-1/#comment-401</link>
		<dc:creator>Anubis</dc:creator>
		<pubDate>Sun, 26 Apr 2009 01:26:19 +0000</pubDate>
		<guid isPermaLink="false">http://buildingbrowsergames.com/?p=24#comment-401</guid>
		<description>It would actually be just as fast to do it this way as in 1 table... for example:&lt;br&gt;&lt;br&gt;3 tables, users, stats, user_stats (to use the example tables)&lt;br&gt;&lt;br&gt;I want to grab the stat &quot;Attack&quot; for the user with ID 1. &lt;br&gt;&lt;br&gt;Attack&#039;s ID = 1, User ID = 1. SO&lt;br&gt;&lt;br&gt;SELECT `user_stats`.`value` FROM `user_stats`,`stats`,`users` WHERE `user_stats`.`userid` = `users`.`id` AND `user_stats`.`statid` = `stats`.`id` WHERE `users`.`id`=1 AND `stats`.`id`=1 LIMIT 1;&lt;br&gt;&lt;br&gt;And there you have it.</description>
		<content:encoded><![CDATA[<p>It would actually be just as fast to do it this way as in 1 table&#8230; for example:</p>
<p>3 tables, users, stats, user_stats (to use the example tables)</p>
<p>I want to grab the stat &#8220;Attack&#8221; for the user with ID 1. </p>
<p>Attack&#39;s ID = 1, User ID = 1. SO</p>
<p>SELECT `user_stats`.`value` FROM `user_stats`,`stats`,`users` WHERE `user_stats`.`userid` = `users`.`id` AND `user_stats`.`statid` = `stats`.`id` WHERE `users`.`id`=1 AND `stats`.`id`=1 LIMIT 1;</p>
<p>And there you have it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luke</title>
		<link>http://buildingbrowsergames.com/2008/05/05/designing-browsergames-a-flexible-stats-system/comment-page-1/#comment-374</link>
		<dc:creator>Luke</dc:creator>
		<pubDate>Sun, 15 Mar 2009 16:12:11 +0000</pubDate>
		<guid isPermaLink="false">http://buildingbrowsergames.com/?p=24#comment-374</guid>
		<description>Chances are when it comes to performance that selecting your stats directly&lt;br&gt;from your user table will be faster - however, if you ever want to add(or&lt;br&gt;remove) a stat you will need to make changes directly to your user table.</description>
		<content:encoded><![CDATA[<p>Chances are when it comes to performance that selecting your stats directly<br />from your user table will be faster &#8211; however, if you ever want to add(or<br />remove) a stat you will need to make changes directly to your user table.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://buildingbrowsergames.com/2008/05/05/designing-browsergames-a-flexible-stats-system/comment-page-1/#comment-373</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Sun, 15 Mar 2009 12:41:50 +0000</pubDate>
		<guid isPermaLink="false">http://buildingbrowsergames.com/?p=24#comment-373</guid>
		<description>What method would be faster? Having the stats in your user table is one query less right?&lt;br&gt;&lt;br&gt;I tend to select all data from the user in my header using a mysql_fetch_array so I can use  things like $user[&#039;credits&#039;] or $user[&#039;id&#039;] wherever I want. Is this a bad habit? I figured you were gonna use the user data on almost every page anyway.</description>
		<content:encoded><![CDATA[<p>What method would be faster? Having the stats in your user table is one query less right?</p>
<p>I tend to select all data from the user in my header using a mysql_fetch_array so I can use  things like $user[&#39;credits&#39;] or $user[&#39;id&#39;] wherever I want. Is this a bad habit? I figured you were gonna use the user data on almost every page anyway.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Angela Bradford</title>
		<link>http://buildingbrowsergames.com/2008/05/05/designing-browsergames-a-flexible-stats-system/comment-page-1/#comment-316</link>
		<dc:creator>Angela Bradford</dc:creator>
		<pubDate>Tue, 17 Feb 2009 04:51:14 +0000</pubDate>
		<guid isPermaLink="false">http://buildingbrowsergames.com/?p=24#comment-316</guid>
		<description>658087</description>
		<content:encoded><![CDATA[<p>658087</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Angela Poole</title>
		<link>http://buildingbrowsergames.com/2008/05/05/designing-browsergames-a-flexible-stats-system/comment-page-1/#comment-315</link>
		<dc:creator>Angela Poole</dc:creator>
		<pubDate>Tue, 17 Feb 2009 01:55:16 +0000</pubDate>
		<guid isPermaLink="false">http://buildingbrowsergames.com/?p=24#comment-315</guid>
		<description>556429</description>
		<content:encoded><![CDATA[<p>556429</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cara B Levi</title>
		<link>http://buildingbrowsergames.com/2008/05/05/designing-browsergames-a-flexible-stats-system/comment-page-1/#comment-287</link>
		<dc:creator>Cara B Levi</dc:creator>
		<pubDate>Tue, 10 Feb 2009 00:40:36 +0000</pubDate>
		<guid isPermaLink="false">http://buildingbrowsergames.com/?p=24#comment-287</guid>
		<description>great article!, grats for u site :)</description>
		<content:encoded><![CDATA[<p>great article!, grats for u site <img src='http://buildingbrowsergames.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luke</title>
		<link>http://buildingbrowsergames.com/2008/05/05/designing-browsergames-a-flexible-stats-system/comment-page-1/#comment-136</link>
		<dc:creator>Luke</dc:creator>
		<pubDate>Fri, 10 Oct 2008 16:02:40 +0000</pubDate>
		<guid isPermaLink="false">http://buildingbrowsergames.com/?p=24#comment-136</guid>
		<description>Hi Scion,

I am not quite sure I understand what the benefit of using the two different types of columns would be - especially in a loosely typed language like Perl or PHP. Whether the user retrieves a number or a word, that value will still be loosely-typed after it&#039;s been retrieved - which means the issue can bite the user either way. How would changing the number of columns in the tables fix that?</description>
		<content:encoded><![CDATA[<p>Hi Scion,</p>
<p>I am not quite sure I understand what the benefit of using the two different types of columns would be &#8211; especially in a loosely typed language like Perl or PHP. Whether the user retrieves a number or a word, that value will still be loosely-typed after it&#8217;s been retrieved &#8211; which means the issue can bite the user either way. How would changing the number of columns in the tables fix that?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scion</title>
		<link>http://buildingbrowsergames.com/2008/05/05/designing-browsergames-a-flexible-stats-system/comment-page-1/#comment-135</link>
		<dc:creator>Scion</dc:creator>
		<pubDate>Fri, 10 Oct 2008 15:28:10 +0000</pubDate>
		<guid isPermaLink="false">http://buildingbrowsergames.com/?p=24#comment-135</guid>
		<description>I would caution against mixing types in the same field, If you do sooner or later it WILL come back to bite you.

If you want to have some stats that are numeric and some that are text based there are several possible approaches.

One would be to replace the value field with two fields one numeric that other text...and have a third Enum typed field to indicate which of those contains the value.

Another aproach would be too have two seperate tables one for text based stats and the other for numeric stats.


although im not convinced for the need for text based stats...theyre not really stats...theyre..ummm...something else? :)</description>
		<content:encoded><![CDATA[<p>I would caution against mixing types in the same field, If you do sooner or later it WILL come back to bite you.</p>
<p>If you want to have some stats that are numeric and some that are text based there are several possible approaches.</p>
<p>One would be to replace the value field with two fields one numeric that other text&#8230;and have a third Enum typed field to indicate which of those contains the value.</p>
<p>Another aproach would be too have two seperate tables one for text based stats and the other for numeric stats.</p>
<p>although im not convinced for the need for text based stats&#8230;theyre not really stats&#8230;theyre..ummm&#8230;something else? <img src='http://buildingbrowsergames.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
