<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>Building Browsergames - Latest Comments in Building Browsergames: a simple combat system (PHP)</title><link>http://bbgames.disqus.com/</link><description></description><language>en</language><lastBuildDate>Tue, 15 Sep 2009 16:56:10 -0000</lastBuildDate><item><title>Re: Building Browsergames: a simple combat system (PHP)</title><link>http://buildingbrowsergames.com/2008/06/11/building-browsergames-a-simple-combat-system/#comment-16661012</link><description>I tried modifying the attack of the third monster from 3 to 7, you will end up with a situation where in the loop the attack is always less than defence, and the loop never exists causing a fatal error of memory loss.&lt;br&gt;&lt;br&gt;5 player attack value ____  monster defence value 7 &amp;gt; no one will lose any health&lt;br&gt;4 monster attack value ____  player defence value 5 &amp;gt; no one will lose any health</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">someone</dc:creator><pubDate>Tue, 15 Sep 2009 16:56:10 -0000</pubDate></item><item><title>Re: Building Browsergames: a simple combat system (PHP)</title><link>http://buildingbrowsergames.com/2008/06/11/building-browsergames-a-simple-combat-system/#comment-11992082</link><description>I get errors like this: &lt;br&gt;"Notice: Use of undefined constant attacker - assumed 'attacker' in /Users/Niels/Sites/bg/smarty/bg/forest.php on line 53"&lt;br&gt;&lt;br&gt;Caused by the arrays:&lt;br&gt;$combat[$turns] = array(&lt;br&gt;				attacker	=&amp;gt;	$attacker['name'],&lt;br&gt;				defender	=&amp;gt;	$defender['name'],&lt;br&gt;				damage		=&amp;gt;	$damage&lt;br&gt;			);&lt;br&gt;&lt;br&gt;I fixed it this way:&lt;br&gt;$combat[$turns] = array(&lt;br&gt;				'attacker'	=&amp;gt;	$attacker['name'],&lt;br&gt;				'defender'	=&amp;gt;	$defender['name'],&lt;br&gt;				'damage'		=&amp;gt;	$damage&lt;br&gt;			);&lt;br&gt;&lt;br&gt;PS: I realy like this tutorial, i was searching a long time for something like this :) .</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Xenon</dc:creator><pubDate>Wed, 01 Jul 2009 15:20:25 -0000</pubDate></item><item><title>Re: Building Browsergames: a simple combat system (PHP)</title><link>http://buildingbrowsergames.com/2008/06/11/building-browsergames-a-simple-combat-system/#comment-7216361</link><description>Oh yes, true, I did not fully read it AND did not fully try to understand that code indeed. I am still a beginner in these things, and expected that smarty (the part I skipped) would enable you to decide every turn what you want to do.&lt;br&gt;Thanks for your reply!</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">MrLollige</dc:creator><pubDate>Sat, 14 Mar 2009 14:00:54 -0000</pubDate></item><item><title>Re: Building Browsergames: a simple combat system (PHP)</title><link>http://buildingbrowsergames.com/2008/06/11/building-browsergames-a-simple-combat-system/#comment-7215374</link><description>I think that you may have misinterpreted the way that the combat system&lt;br&gt;works, here - after encounting a monster and clicking attack, the entire&lt;br&gt;combat simulation is run and the player's health is updated, before the next&lt;br&gt;screen. There isn't really a screen where they can see the battle is going&lt;br&gt;badly and run away.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">bbgames</dc:creator><pubDate>Sat, 14 Mar 2009 13:01:16 -0000</pubDate></item><item><title>Re: Building Browsergames: a simple combat system (PHP)</title><link>http://buildingbrowsergames.com/2008/06/11/building-browsergames-a-simple-combat-system/#comment-7209993</link><description>This works, but only if you allow people to freely escape from their battles. If you do not want people to be able to flee, will you have to add a row for every instance of a monster, and update their hp every time?&lt;br&gt;&lt;br&gt;Right now, if things are going bad, you could navigate away and your HP is back to normal again....</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">MrLollige</dc:creator><pubDate>Sat, 14 Mar 2009 05:12:05 -0000</pubDate></item></channel></rss>