<?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>Building Browsergames &#187; doab</title>
	<atom:link href="http://buildingbrowsergames.com/tag/doab/feed/" rel="self" type="application/rss+xml" />
	<link>http://buildingbrowsergames.com</link>
	<description>Ever wanted to build a browsergame?</description>
	<lastBuildDate>Mon, 29 Mar 2010 14:00:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Post-Mortem: Rawrmy</title>
		<link>http://buildingbrowsergames.com/2008/12/11/post-mortem-rawrmy/</link>
		<comments>http://buildingbrowsergames.com/2008/12/11/post-mortem-rawrmy/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 14:00:38 +0000</pubDate>
		<dc:creator>Luke</dc:creator>
				<category><![CDATA[diaryofabrowsergame]]></category>
		<category><![CDATA[contest]]></category>
		<category><![CDATA[doab]]></category>
		<category><![CDATA[post-mortem]]></category>
		<category><![CDATA[rawrmy]]></category>

		<guid isPermaLink="false">http://buildingbrowsergames.com/?p=610</guid>
		<description><![CDATA[Browser-Based Game Zone&#8217;s PBBG Contest comes to a close today, and the month of judging will begin &#8211; unfortunately, without Rawrmy. Due to unforeseen circumstances, I was unable to complete Rawrmy in the time allotted &#8211; but that doesn&#8217;t mean that I didn&#8217;t give it a fair shot.
What Went Right
A few decisions that I made [...]]]></description>
			<content:encoded><![CDATA[<p><a href='http://www.bbgamezone.com/contest.php'>Browser-Based Game Zone&#8217;s PBBG Contest</a> comes to a close today, and the month of judging will begin &#8211; unfortunately, without Rawrmy. Due to unforeseen circumstances, I was unable to complete Rawrmy in the time allotted &#8211; but that doesn&#8217;t mean that I didn&#8217;t give it a fair shot.</p>
<h2>What Went Right</h2>
<p>A few decisions that I made early on helped to get Rawrmy &#8220;on it&#8217;s feet&#8221;, for all that there were some setbacks during development. One of those decisions was to use <a href='http://djangoproject.com'>Django</a>, a popular Python web framework, to develop all of Rawrmy&#8217;s functionality. Django is geared towards rapid development in the same way that Rails is; both frameworks lend themselves very well to getting something out the door as quickly as possible &#8211; which was one of the goals for this contest due to the compressed time frame. Straight out of the box, Django gives you a pre-wired authentication system and admin backend &#8211; both of which were immensely valuable during initial development.</p>
<p>Another decision that helped ease the development process was a bit of a harder one to enforce: <strong>every feature implemented was droppable</strong>. What that means is, for any feature I was developing, I&#8217;d set a timer. If it took me longer than an hour or two, the feature got dropped &#8211; although I marked it as &#8220;come back to later&#8221;. Doing this allowed me to trim the fat out of Rawrmy, and focus only on the pieces that would get it to being a finished game the fastest.</p>
<h2>What Went Wrong</h2>
<p>Time was a massive factor that prevented me from completing Rawrmy. In hindsight, I probably should have taken some time off from my day job, or diverted time from some of my other projects &#8211; Rawrmy is unfinished because I was unable to devote as much time as I would have liked to to developing it.</p>
<p>Some things took too long. While I mentioned earlier that every feature was droppable, it was only <strong>after</strong> I had sunk a few precious hours into a specific(and still broken) feature that I realized I would need to enact this rule. If I had realized how much time I was sinking into non-valuable features at the time as opposed to afterwards, I probably would have had a lot more time to spend on getting the game working(and less time spent chasing down random bugs).</p>
<p>Lack of direction was a problem with Rawrmy. I have to admit that when I first decided I should enter the contest, I didn&#8217;t have any idea what I would build a game based on &#8211; and I believe this was one of my biggest problems. <a href='http://www.johnmunsch.com'>John Munsch</a> had clearly been planning out his idea for &#8216;Big Villain&#8217; for quite some time, and was therefore only waiting to do the development on his game. Multiple other entrants were also in the same position; the fact that they had already planned out most of their game gave them a massive advantage, because they could get started developing while I was still attempting to come up with a concept for Rawrmy.</p>
<p>When I initially entered the contest, I also had a team member who would be creating all of the written content for the game. However, after a week or so, my partner disappeared &#8211; and I still have yet to hear from him. This was another setback; the initial idea for Rawrmy was heavily text-based, and while I&#8217;m sure that I could have written the content myself, it would have distracted me from getting the game running and polished.</p>
<h2>What I Learned</h2>
<p>When you&#8217;re entering a contest with a short timeframe, you need to have a firm idea of what you&#8217;re going to build &#8211; it doesn&#8217;t neccessarily have to be large, but you need to have that idea and stick to it. Changing gears in the middle of a project will kill it &#8211; Rawrmy lost a good week or so&#8217;s worth of development time when my partner disappeared.</p>
<p>When you enter a contest like this, you need to be prepared to make the commitment. You need to be willing to commit development, monetary, and any other resources neccessary to get your game done &#8211; and while I was able to half-commit on most of those things, it&#8217;s not enough. The next time I enter a browsergame contest, I&#8217;ll make sure that I&#8217;ve got my other projects cleared out of the way for the duration, and can therefore focus <strong>only</strong> on the contest &#8211; instead of getting distracted by other things.</p>
<p>All told, I had a positive experience entering the contest &#8211; even if I had to drop out at the end. I learned a lot about my own development practices, and what I can do to improve in the future &#8211; which is enough of a win for me.</p>
<p>If you&#8217;re interested in seeing what Rawrmy was like, you can check it out at <a href='http://rawrmy.com'>rawrmy.com</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://buildingbrowsergames.com/2008/12/11/post-mortem-rawrmy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rawrmy Drops Out</title>
		<link>http://buildingbrowsergames.com/2008/12/08/rawrmy-drops-out/</link>
		<comments>http://buildingbrowsergames.com/2008/12/08/rawrmy-drops-out/#comments</comments>
		<pubDate>Mon, 08 Dec 2008 14:00:25 +0000</pubDate>
		<dc:creator>Luke</dc:creator>
				<category><![CDATA[diaryofabrowsergame]]></category>
		<category><![CDATA[contest]]></category>
		<category><![CDATA[doab]]></category>
		<category><![CDATA[rawrmy]]></category>

		<guid isPermaLink="false">http://buildingbrowsergames.com/?p=607</guid>
		<description><![CDATA[Browser-Based Game Zone&#8217;s PBBG Contest will be coming to a close this week, on December 11th. While Rawrmy was entered in the contest, I am afraid that Rawrmy will have to drop out of the running.
While the time allotted for the contest was more than adequate, too many distractions came up that prevented me from [...]]]></description>
			<content:encoded><![CDATA[<p><a href='http://bbgamezone.com/'>Browser-Based Game Zone</a>&#8217;s <a href='http://bbgamezone.com/contest.php'>PBBG Contest</a> will be coming to a close this week, on December 11th. While Rawrmy was entered in the contest, I am afraid that Rawrmy will have to drop out of the running.</p>
<p>While the time allotted for the contest was more than adequate, too many distractions came up that prevented me from spending enough time on Rawrmy to make it a serious contender for the contest at all. While I am still hoping to polish and deploy Rawrmy for the 11th, it will no longer be as a serious contender in the contest; merely as a prototype.</p>
<p>In addition to deploying Rawrmy on thursday, I will also be posting a post-mortem of the development process &#8211; detailing what worked, what didn&#8217;t, and what I would have changed.</p>
]]></content:encoded>
			<wfw:commentRss>http://buildingbrowsergames.com/2008/12/08/rawrmy-drops-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fleshing out Rawrmy</title>
		<link>http://buildingbrowsergames.com/2008/12/01/fleshing-out-rawrmy/</link>
		<comments>http://buildingbrowsergames.com/2008/12/01/fleshing-out-rawrmy/#comments</comments>
		<pubDate>Mon, 01 Dec 2008 14:00:10 +0000</pubDate>
		<dc:creator>Luke</dc:creator>
				<category><![CDATA[diaryofabrowsergame]]></category>
		<category><![CDATA[content]]></category>
		<category><![CDATA[contest]]></category>
		<category><![CDATA[doab]]></category>
		<category><![CDATA[rawrmy]]></category>

		<guid isPermaLink="false">http://buildingbrowsergames.com/?p=598</guid>
		<description><![CDATA[This week was spent trying to flesh out more of Rawrmy. While most of the systems in the game are built and in place, the game is currently extremely short &#8211; in order for it to be a serious contender at all, it will need to have a lot more content.
With that in mind, I [...]]]></description>
			<content:encoded><![CDATA[<p>This week was spent trying to flesh out more of Rawrmy. While most of the systems in the game are built and in place, the game is currently <strong>extremely</strong> short &#8211; in order for it to be a serious contender at all, it will need to have a lot more content.</p>
<p>With that in mind, I have been working to build something like a quests system into Rawrmy &#8211; essentially, there is a large over-arching storyline with the player is part of(sort of like <a href='http://kingdomofloathing.com'>Kingdom of Loathing</a>, although nowhere near as developered). Unfortunately, it turns out that designing a flexible quests system is a lot of work &#8211; and as a result, while there are quests in place, I have had to build them in a much more rigid form than I would have liked to. Essentially, I have created an enum of the different steps in the story, and I am storing which step of the story the player is on in my User Profile model:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">class</span> STORY:
	STARTING,FRIDGE,TOASTER,OVEN,BATHROOM = <span style="color: #008000;">range</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">5</span><span style="color: black;">&#41;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">	story_step       = models.<span style="color: black;">IntegerField</span><span style="color: black;">&#40;</span>max_length=<span style="color: #ff4500;">25</span>,default=STORY.<span style="color: black;">STARTING</span><span style="color: black;">&#41;</span></pre></div></div>

<p>Checking which step of the story the player is on is then done by our view:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #dc143c;">profile</span>.<span style="color: black;">story_step</span> == STORY.<span style="color: black;">STARTING</span>:
	<span style="color: #dc143c;">profile</span>.<span style="color: black;">story_step</span> += <span style="color: #ff4500;">1</span>
	<span style="color: #dc143c;">profile</span>.<span style="color: black;">save</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
	<span style="color: #ff7700;font-weight:bold;">return</span> area_template<span style="color: black;">&#40;</span>request,<span style="color: #483d8b;">'couch'</span>,<span style="color: #483d8b;">'starting.html'</span><span style="color: black;">&#41;</span></pre></div></div>

<p>While this works, it&#8217;s not quite what I like &#8211; but the deadline for the contest is looming, and I will not have time to rewrite how the quests system works.</p>
<p>At any rate, progress is slowly being made &#8211; while I have had to strip out a lot of the features I would have liked to have, I should at least have the beginnings of the game playable by the deadline.</p>
]]></content:encoded>
			<wfw:commentRss>http://buildingbrowsergames.com/2008/12/01/fleshing-out-rawrmy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rawrmy&#8217;s Combat System Refresh</title>
		<link>http://buildingbrowsergames.com/2008/11/24/rawrmys-combat-system-refresh/</link>
		<comments>http://buildingbrowsergames.com/2008/11/24/rawrmys-combat-system-refresh/#comments</comments>
		<pubDate>Mon, 24 Nov 2008 14:00:31 +0000</pubDate>
		<dc:creator>Luke</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[combat]]></category>
		<category><![CDATA[contest]]></category>
		<category><![CDATA[diaryofabrowsergame]]></category>
		<category><![CDATA[doab]]></category>
		<category><![CDATA[progress]]></category>
		<category><![CDATA[rawrmy]]></category>
		<category><![CDATA[refresh]]></category>

		<guid isPermaLink="false">http://buildingbrowsergames.com/?p=577</guid>
		<description><![CDATA[This week was spent fleshing out Rawrmy&#8217;s combat system, and building in some of the more &#8216;traditional&#8217; elements &#8211; like experience, levels, and hit points.
I&#8217;ve been struggling for the last few weeks to try and find a way to make combat &#8216;fun&#8217; &#8211; while it&#8217;s a big part of a lot of browsergames, it&#8217;s a [...]]]></description>
			<content:encoded><![CDATA[<p>This week was spent fleshing out Rawrmy&#8217;s combat system, and building in some of the more &#8216;traditional&#8217; elements &#8211; like experience, levels, and hit points.</p>
<p>I&#8217;ve been struggling for the last few weeks to try and find a way to make combat &#8216;fun&#8217; &#8211; while it&#8217;s a big part of a lot of browsergames, it&#8217;s a part that (I think) could use a little bit more polish in most of them. Fighting monster after monster after monster isn&#8217;t fun &#8211; it&#8217;s only a means to an end. I think that even the boring parts of the game should still be fun. With that in mind, I set out to build a combat system that would achieve two things:</p>
<ol>
<li>Be a combat system.</li>
<li>Be fun.</li>
</ol>
<p>After thinking and pondering, I believe that I&#8217;ve finally come up with a system that works(and you&#8217;ll probably be able to figure out how it works in the screenshot below).</p>
<div id="attachment_579" class="wp-caption alignnone" style="width: 310px"><a href="http://buildingbrowsergames.com/blog/wp-content/uploads/2008/11/picture-7.png"><img src="http://buildingbrowsergames.com/blog/wp-content/uploads/2008/11/picture-7-300x182.png" alt="Rawrmy\&#039;s refreshed combat system" title="Rawrmy Combat" width="300" height="182" class="size-medium wp-image-579" /></a><p class="wp-caption-text">Rawrmy's refreshed combat system</p></div>
<p>A little bit more time was also spent fleshing out the different areas of the game &#8211; and they&#8217;re what I will be working on now. I am afraid that my schedule has been getting busier and busier, lately &#8211; which means I can&#8217;t devote as much time to Rawrmy as I would like to. While I am still hoping to have something releasable by the contest due date, I don&#8217;t think it will be quite as strong an entry as I would have liked.</p>
<h2>Completed this week:</h2>
<ul>
<li>Combat system refresh &#8211; the combat system is now a little more fun to use, in addition to more challenging for players who have gotten to the higher experience levels.</li>
</ul>
<h2>Still to do:</h2>
<ul>
<li>Content needs fleshing out &#8211; while this combat switch has made Rawrmy &#8216;feature complete&#8217;, it hasn&#8217;t made it <strong>solid</strong> yet. There needs to be a lot of polishing done in regards to content, areas, and the way that in-game items work.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://buildingbrowsergames.com/2008/11/24/rawrmys-combat-system-refresh/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Rawrmy&#8217;s Crafting System</title>
		<link>http://buildingbrowsergames.com/2008/11/10/rawrmys-crafting-system/</link>
		<comments>http://buildingbrowsergames.com/2008/11/10/rawrmys-crafting-system/#comments</comments>
		<pubDate>Mon, 10 Nov 2008 14:00:12 +0000</pubDate>
		<dc:creator>Luke</dc:creator>
				<category><![CDATA[diaryofabrowsergame]]></category>
		<category><![CDATA[crafting]]></category>
		<category><![CDATA[doab]]></category>
		<category><![CDATA[frustrations]]></category>

		<guid isPermaLink="false">http://buildingbrowsergames.com/?p=557</guid>
		<description><![CDATA[This week was spent working on Rawrmy&#8217;s escort and crafting system.
One of the things that I struggled with this week was the limitations of Django&#8217;s queryset API &#8211; while it&#8217;s both powerful and flexible, there are a few things that it cannot do. This problem reared it&#8217;s head when I was working on the crafting [...]]]></description>
			<content:encoded><![CDATA[<p>This week was spent working on Rawrmy&#8217;s escort and crafting system.</p>
<p>One of the things that I struggled with this week was the limitations of Django&#8217;s queryset API &#8211; while it&#8217;s both powerful <strong>and</strong> flexible, there are a few things that it cannot do. This problem reared it&#8217;s head when I was working on the crafting system.</p>
<p>When a player goes to craft an item, they are presented with a multi-select that will display all of the craftable items in their inventory. They then select which items they would like to craft with, and we retrieve anything that they can make out of them.</p>
<p>The problem, here, is that &#8216;ingredients&#8217; on our craftables is a ManyToManyField &#8211; and I wanted to retrieve an exact match. For example, if a player had tried to craft with &#8216;flour&#8217; and &#8216;yeast&#8217;, any craftable with &#8216;flour&#8217; or &#8216;yeast&#8217; <strong>and not &#8217;sugar&#8217;</strong> would be returned. Retrieving the &#8216;flour&#8217; and &#8216;yeast&#8217; craftables was easy, using an __in query:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">	craftables = Craftables.<span style="color: black;">objects</span>.<span style="color: #008000;">filter</span><span style="color: black;">&#40;</span>ingredients__in=form.<span style="color: black;">cleaned_data</span><span style="color: black;">&#91;</span><span style="color: #483d8b;">'ingredients])</span></pre></div></div>

<p>However, making sure that the &#8217;sugar&#8217; craftables were not retrieved was slightly more difficult(and took me a while to figure out). Essentially, the process involves first creating a list of ingredients that are <strong>not</strong> in the group of selected ingredients, and then excluding any craftable with ingredients in that list(after we filtered). The new code looked something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">	bad_ids = <span style="color: black;">&#91;</span>ingredient.<span style="color: #008000;">id</span> <span style="color: #ff7700;font-weight:bold;">for</span> ingredient <span style="color: #ff7700;font-weight:bold;">in</span> form.<span style="color: black;">cleaned_data</span><span style="color: black;">&#91;</span><span style="color: #483d8b;">'ingredients'</span><span style="color: black;">&#93;</span><span style="color: black;">&#93;</span>
	craftable = Craftable.<span style="color: black;">objects</span>.<span style="color: #008000;">filter</span><span style="color: black;">&#40;</span>ingredients__in=form.<span style="color: black;">cleaned_data</span><span style="color: black;">&#91;</span><span style="color: #483d8b;">'ingredients'</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>.<span style="color: black;">exclude</span><span style="color: black;">&#40;</span>ingredients__in=Item.<span style="color: black;">objects</span>.<span style="color: black;">exclude</span><span style="color: black;">&#40;</span>id__in=bad_ids<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></pre></div></div>

<p>Unfortunately, that only seemed to work in <strong>some</strong> cases &#8211; and as a result, I&#8217;ve been debugging and rebugging the same piece of code for most of the week.</p>
<p>This slowdown is unfortunate &#8211; but I think that, moving forward, the crafting system is going to get replaced with a simpler two dropdown system and learnable recipes.</p>
<h2>Completed this week:</h2>
<ul>
<li>Laid the groundwork for crafting and the escort system.</li>
</ul>
<h2>Still to do:</h2>
<ul>
<li>Fix the bugs in crafting item retrieval &#8211; they&#8217;re a gamebreaker right now.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://buildingbrowsergames.com/2008/11/10/rawrmys-crafting-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rawrmy&#8217;s Inventory</title>
		<link>http://buildingbrowsergames.com/2008/11/03/rawrmys-inventory/</link>
		<comments>http://buildingbrowsergames.com/2008/11/03/rawrmys-inventory/#comments</comments>
		<pubDate>Mon, 03 Nov 2008 14:00:29 +0000</pubDate>
		<dc:creator>Luke</dc:creator>
				<category><![CDATA[diaryofabrowsergame]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[doab]]></category>
		<category><![CDATA[progress]]></category>
		<category><![CDATA[rawrmy]]></category>

		<guid isPermaLink="false">http://buildingbrowsergames.com/?p=538</guid>
		<description><![CDATA[This week, I focused on developing Rawrmy&#8217;s inventory system.
The typical inventory system is fairly simple: you have the player who owns the item, the item itself, and (perhaps) the quantity of the item.
One of the nicer features of Django that building the inventory system has introduced me to is reverse relations; they make it very [...]]]></description>
			<content:encoded><![CDATA[<p>This week, I focused on developing Rawrmy&#8217;s inventory system.</p>
<p>The typical inventory system is fairly simple: you have the player who owns the item, the item itself, and (perhaps) the quantity of the item.</p>
<p>One of the nicer features of Django that building the inventory system has introduced me to is reverse relations; they make it very easy for me to add new items to the user&#8217;s inventory. I am storing their inventory in my UserProfile model, and using a ManyToManyField for keeping track of the user&#8217;s items(with an intermediary &#8216;through&#8217; model for keeping track of the quantity of the item), and that means that I can add items to the player&#8217;s inventory with a single line of code:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #dc143c;">profile</span>.<span style="color: black;">inventoryitem_set</span>.<span style="color: black;">create</span><span style="color: black;">&#40;</span>item=item,owner=<span style="color: #dc143c;">profile</span><span style="color: black;">&#41;</span></pre></div></div>

<p>With <em>item</em> being the item I want to add, and <em>owner</em> being the profile I am adding the item for.</p>
<p>One question that came up while building my inventory system was <strong>&#8220;Should items be stackable?&#8221;</strong> &#8211; because it makes sense for things like weapons not to stack, but things like usables <strong>to</strong> stack. In the end, I decided to add a <em>stackable</em> BooleanField to all of my items, and then just check it in my InventoryItem&#8217;s save() method, like so:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">def</span> save<span style="color: black;">&#40;</span><span style="color: #008000;">self</span>,<span style="color: #66cc66;">*</span>args,<span style="color: #66cc66;">**</span>kwargs<span style="color: black;">&#41;</span>:
	<span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #008000;">self</span>.<span style="color: black;">item</span>.<span style="color: black;">stackable</span> <span style="color: #ff7700;font-weight:bold;">and</span> kwargs.<span style="color: black;">get</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'force_insert'</span>,<span style="color: #008000;">False</span><span style="color: black;">&#41;</span>:
		<span style="color: #008000;">self</span> = InventoryItem.<span style="color: black;">objects</span>.<span style="color: black;">get_or_create</span><span style="color: black;">&#40;</span>item=<span style="color: #008000;">self</span>.<span style="color: black;">item</span>,owner=<span style="color: #008000;">self</span>.<span style="color: black;">owner</span><span style="color: black;">&#41;</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span>
		<span style="color: #008000;">self</span>.<span style="color: black;">quantity</span> += <span style="color: #ff4500;">1</span>
		kwargs<span style="color: black;">&#91;</span><span style="color: #483d8b;">'force_insert'</span><span style="color: black;">&#93;</span> = <span style="color: #008000;">False</span>
	<span style="color: #008000;">super</span><span style="color: black;">&#40;</span>InventoryItem, <span style="color: #008000;">self</span><span style="color: black;">&#41;</span>.<span style="color: black;">save</span><span style="color: black;">&#40;</span><span style="color: #66cc66;">*</span>args,<span style="color: #66cc66;">**</span>kwargs<span style="color: black;">&#41;</span></pre></div></div>

<p>Is this the best way to do it? Probably not. But it lets me have items that do stack and items that don&#8217;t stack fairly easily, in addition to being able to add items to the player&#8217;s inventory without having to write a lot of boilerplate code.</p>
<p>Overall, progress is being made &#8211; while I&#8217;m not sure I will be able to finish as much as I would have liked to by the time that the contest is over (December 11th), I&#8217;m fairly confident that I will have a codebase completed that I am happy to work on far into the future.</p>
<h2>Completed this week:</h2>
<ul>
<li>Basic combat system &#8211; needs some tweaking but currently workable</li>
<li>Inventory management &#8211; add items, remove items</li>
</ul>
<h2>Still to do:</h2>
<ul>
<li>Create more content and quests &#8211; while there are plans in place for upwards of 5 areas at the start of the game, there have only been quests for 2 of them designed so far.</li>
<li>Write better storyline content &#8211; right now it just says things like &#8220;the storyteller tells you to go over there. So you decide to do that.&#8221;</li>
<li>Lots of polishing and re-working &#8211; while most of the internals of the game work and are playable right now, they don&#8217;t feel &#8220;just right&#8221; yet.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://buildingbrowsergames.com/2008/11/03/rawrmys-inventory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rawrmy Starts</title>
		<link>http://buildingbrowsergames.com/2008/10/27/rawrmy-starts/</link>
		<comments>http://buildingbrowsergames.com/2008/10/27/rawrmy-starts/#comments</comments>
		<pubDate>Mon, 27 Oct 2008 14:00:32 +0000</pubDate>
		<dc:creator>Luke</dc:creator>
				<category><![CDATA[diaryofabrowsergame]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[doab]]></category>
		<category><![CDATA[progress]]></category>
		<category><![CDATA[rawrmy]]></category>

		<guid isPermaLink="false">http://buildingbrowsergames.com/?p=527</guid>
		<description><![CDATA[This week was spent getting started on Rawrmy &#8211; building the initial systems, and planning out how the game will play out.
I have decided to build Rawrmy with Django &#8211; which is an MVC framework like Ruby on Rails(except in Python instead of Ruby).
Django has a vast number of freely available libraries for common functions, [...]]]></description>
			<content:encoded><![CDATA[<p>This week was spent getting started on Rawrmy &#8211; building the initial systems, and planning out how the game will play out.</p>
<p>I have decided to build Rawrmy with <a href='http://djangoproject.com'>Django</a> &#8211; which is an MVC framework like Ruby on Rails(except in Python instead of Ruby).</p>
<p>Django has a vast number of freely available libraries for common functions, in addition to coming with some handy features bundled &#8211; like an auto-generating admin interface, and authentication systems that are pre-built for you(and will work for 90% of the things you&#8217;d need it for).</p>
<p>With that said, all of Rawrmy&#8217;s initial systems are built &#8211; login, registration, and profiles &#8211; mostly by taking advantage of the excellent <a href='http://code.google.com/p/django-registration/'>django-registration</a> library.</p>
<p>One of the stumbling blocks that I&#8217;ve encountered while working on Rawrmy is flexibility &#8211; while I&#8217;d like to make my systems as flexible as possible for the sake of future content, I am rapidly finding that there is a certain point where you need to trade flexibility for <strong>just writing the code</strong>. This is becoming most evident with the area exploration system &#8211; areas are currently a model in my database, and their code looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">class</span> Area<span style="color: black;">&#40;</span>models.<span style="color: black;">Model</span><span style="color: black;">&#41;</span>:
	title = models.<span style="color: black;">CharField</span><span style="color: black;">&#40;</span>max_length=<span style="color: #ff4500;">500</span><span style="color: black;">&#41;</span>
	slug = models.<span style="color: black;">SlugField</span><span style="color: black;">&#40;</span>blank=<span style="color: #008000;">True</span><span style="color: black;">&#41;</span>
	monsters = models.<span style="color: black;">ManyToManyField</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'Monster'</span>,null=<span style="color: #008000;">True</span>,blank=<span style="color: #008000;">True</span><span style="color: black;">&#41;</span>
&nbsp;
	<span style="color: #ff7700;font-weight:bold;">def</span> save<span style="color: black;">&#40;</span><span style="color: #008000;">self</span>,<span style="color: #66cc66;">*</span>args,<span style="color: #66cc66;">**</span>kwargs<span style="color: black;">&#41;</span>:
		<span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #ff7700;font-weight:bold;">not</span> <span style="color: #008000;">self</span>.<span style="color: black;">slug</span>:
			<span style="color: #008000;">self</span>.<span style="color: black;">slug</span> = slugify<span style="color: black;">&#40;</span><span style="color: #008000;">self</span>.<span style="color: black;">title</span><span style="color: black;">&#41;</span>
		<span style="color: #008000;">super</span><span style="color: black;">&#40;</span>Area,<span style="color: #008000;">self</span><span style="color: black;">&#41;</span>.<span style="color: black;">save</span><span style="color: black;">&#40;</span><span style="color: #66cc66;">*</span>args,<span style="color: #66cc66;">**</span>kwargs<span style="color: black;">&#41;</span>
&nbsp;
	<span style="color: #ff7700;font-weight:bold;">def</span> <span style="color: #0000cd;">__unicode__</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:
		<span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">self</span>.<span style="color: black;">title</span></pre></div></div>

<p>Originally, my URLS looked like this:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">url<span style="color: black;">&#40;</span>r<span style="color: #483d8b;">'explore/(?P&lt;area_slug&gt;.+)/$'</span>,views.<span style="color: black;">explore</span>,name=<span style="color: #483d8b;">'explore-area'</span><span style="color: black;">&#41;</span>,</pre></div></div>

<p>I had planned to retrieve the area the user was exploring based on the slug, and then use that to figure out what happened when they explored that area. However, I quickly came up against issues with the flexibility of this approach &#8211; while it makes it easy to add more areas and allow users to explore them, it makes it <strong>very</strong> difficult for me as the developer to add custom behavior to an area. If I want to add custom logic to the Forest area but not the Mountain area, how am I supposed to do that using the current configuration?</p>
<p>With that in mind, my urlpatterns have changed, and I now hard-code the area slug, and map it to a specific view:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">url<span style="color: black;">&#40;</span>r<span style="color: #483d8b;">'explore/forest/$'</span>,views.<span style="color: black;">explore_forest</span>,name=<span style="color: #483d8b;">'explore-forest'</span><span style="color: black;">&#41;</span>,</pre></div></div>

<p>This way is a little less flexible in terms of being able to deploy new areas instantly, <strong>but</strong> it allows me to write any custom logic I need &#8211; which is what I was looking for.</p>
<h2>Completed this week:</h2>
<ul>
<li>User management &#8211; login, logout, register</li>
<li>Escort management &#8211; choose escort</li>
<li>Class Choice &#8211; choose class</li>
</ul>
<h2>Still to do:</h2>
<ul>
<li>Exploring &#8211; needs a lot of fleshing out</li>
<li>Storyline &#8211; needs to be better (writer disappeared)</li>
<li>Hook &#8211; what makes this game fun?</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://buildingbrowsergames.com/2008/10/27/rawrmy-starts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Diary of a Browsergame: Re-booting</title>
		<link>http://buildingbrowsergames.com/2008/10/20/diary-of-a-browsergame-re-booting/</link>
		<comments>http://buildingbrowsergames.com/2008/10/20/diary-of-a-browsergame-re-booting/#comments</comments>
		<pubDate>Mon, 20 Oct 2008 14:00:13 +0000</pubDate>
		<dc:creator>Luke</dc:creator>
				<category><![CDATA[diaryofabrowsergame]]></category>
		<category><![CDATA[contest]]></category>
		<category><![CDATA[doab]]></category>
		<category><![CDATA[restart]]></category>

		<guid isPermaLink="false">http://buildingbrowsergames.com/?p=494</guid>
		<description><![CDATA[As you all know by now, Browser-Based Game Zone is running a PBBG contest.
As you&#8217;ve probably guessed by now, work on Working Title has sort of fallen by the wayside. Life got busy, and I couldn&#8217;t devote as much time to the project as I would have liked to for a while. Having said that, [...]]]></description>
			<content:encoded><![CDATA[<p>As you all know by now, <a href='http://www.bbgamezone.com/contest.php'>Browser-Based Game Zone</a> is running a PBBG contest.</p>
<p>As you&#8217;ve probably guessed by now, work on Working Title has sort of fallen by the wayside. Life got busy, and I couldn&#8217;t devote as much time to the project as I would have liked to for a while. Having said that, Working Title has been shelved for now &#8211; when I&#8217;m a little less busy, I will probably come back to it &#8211; but for now, it is shelved.</p>
<p>One thing not all of you know, however, is that I will be entering the PBBG contest as well. The game that I will be working on has been tentatively called &#8216;Rawrmy&#8217;(although we&#8217;re working on a better name). It will be a mostly-singleplayer RPG, with a heavy focus on a quest-based storyline.</p>
<p>There isn&#8217;t really much more to say about it right now &#8211; but check back every monday for posts on Rawrmy&#8217;s progress!</p>
]]></content:encoded>
			<wfw:commentRss>http://buildingbrowsergames.com/2008/10/20/diary-of-a-browsergame-re-booting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

