<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>Scirra Forum : Construct 2 SDK - Advanced use</title>
  <link>http://www.scirra.com/forum/</link>
  <description>This is an XML content feed of; Scirra Forum : Javascript SDK development : Construct 2 SDK - Advanced use</description>
  <copyright>Copyright (c) 2006-2011 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 22 May 2013 09:02:23 +0000</pubDate>
  <lastBuildDate>Mon, 30 Jan 2012 00:01:28 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 10.01</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.scirra.com/forum/RSS_post_feed.asp?TID=47293</WebWizForums:feedURL>
  <image>
   <title>Scirra Forum</title>
   <url>http://www.scirra.com/forum/forum_images/web_wiz_forums.png</url>
   <link>http://www.scirra.com/forum/</link>
  </image>
  <item>
   <title>Construct 2 SDK - Advanced use : It really depends on the context...</title>
   <link>http://www.scirra.com/forum/construct-2-sdk-advanced-use_topic47293_post305606.html#305606</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="../users/armitage1982">Armitage1982</a><br /><strong>Subject:</strong> 47293<br /><strong>Posted:</strong> 30 Jan 2012 at 12:01am<br /><br />It really depends on the context of the contact point.<br /><br />Let's make the distinction between the maximum collision pairs Box2d can handle and the maximum proxies (objects) you can spawn in a single world.<br />By default the only 8 limit number I remember to see in Box2d was the maximum number of polygon vertices a shape could have... Which is probably enough considering you can build complex object from many shapes.<br /><br />If I do recall correctly the maximum default number of object you can spawn in box2d was 1024 but you can easily push this up to 2048 without any slowdown. That's what I did in my engine because I'm using the edge shapes that generate a lot of proxies. Actually if the physical engine is a key feature of your game you will easily reach that given limitation but since Box2d is only about processing data, it's not a real problem (you would probably have to focus way more on the rendering part).<br /><br />The pair number is 8 * proxies by default. If you go over this default number, Box2D throw an exception (that I guess Construct 2 handle to avoid any crash ?). <br /><br />Maybe the suggestion of 8 collisions point per objects comes from this factor ? That would simply mean that 1024 object can have safely up to 8 collisions points at the same times. Hopefully this will probably never happen !<br /><br />The contact point is something you handle on your own, personally I store them in a pool and use them to process specific collision.<br />But trust me, there is many situation where an object will generate more than 8 collisions at time (for example 10 balls on the ground :).<br /><br />So except if the Construct 2 Team did some weird optimizations in that area (why ?) you probably don't have to "count" the number of contact point your game will have to handle at max but rather know how many object can be displayed at the same times, if you really need that much and finally if you can group them in various Bit Mask to avoid as much as collision and awaken object in your simulation.]]>
   </description>
   <pubDate>Mon, 30 Jan 2012 00:01:28 +0000</pubDate>
   <guid isPermaLink="true">http://www.scirra.com/forum/construct-2-sdk-advanced-use_topic47293.html</guid>
  </item> 
  <item>
   <title>Construct 2 SDK - Advanced use :   Kyatric wrote:@VampyricalCurse:...</title>
   <link>http://www.scirra.com/forum/construct-2-sdk-advanced-use_topic47293_post303038.html#303038</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="../users/vampyricalcurse">VampyricalCurse</a><br /><strong>Subject:</strong> 47293<br /><strong>Posted:</strong> 19 Jan 2012 at 8:46am<br /><br /> <table width="99%"><tr><td class="BBquote"><img src="//static2.scirra.net/forum_images/quote_box.png" title="Originally posted by Kyatric" alt="Originally posted by Kyatric" style="vertical-align: text-bottom;" /> <strong>Kyatric wrote:</strong><br /><br />@VampyricalCurse: With the built-in behavior, the way things are coded yes, it's better to stick to 8 points.<br /><br />Ashley had to code the physics behavior so it can be widely used, in many cases.<br />He had to make decisions to manage this.<br /><br />But Armitage said he wanted to develop his own plugin based on box2D. So after all, maybe a specific implementation may help raising the possible number.<br />A plugin specificaly coded for a game could handle only issues of said-game.<br /><br />I think in theory that makes it possible. <br />Now to see it actualy done is yet to be seen.</td></tr></table> <br /><br />I see, so I did misunderstand. So, in the case that I need a bit more than 8 points, how many points it's a bad idea?]]>
   </description>
   <pubDate>Thu, 19 Jan 2012 08:46:34 +0000</pubDate>
   <guid isPermaLink="true">http://www.scirra.com/forum/construct-2-sdk-advanced-use_topic47293.html</guid>
  </item> 
  <item>
   <title>Construct 2 SDK - Advanced use : @VampyricalCurse: With the built-in...</title>
   <link>http://www.scirra.com/forum/construct-2-sdk-advanced-use_topic47293_post303005.html#303005</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="../users/kyatric">Kyatric</a><br /><strong>Subject:</strong> 47293<br /><strong>Posted:</strong> 19 Jan 2012 at 3:11am<br /><br />@VampyricalCurse: With the built-in behavior, the way things are coded yes, it's better to stick to 8 points.<br /><br />Ashley had to code the physics behavior so it can be widely used, in many cases.<br />He had to make decisions to manage this.<br /><br />But Armitage said he wanted to develop his own plugin based on box2D. So after all, maybe a specific implementation may help raising the possible number.<br />A plugin specificaly coded for a game could handle only issues of said-game.<br /><br />I think in theory that makes it possible. <br />Now to see it actualy done is yet to be seen.]]>
   </description>
   <pubDate>Thu, 19 Jan 2012 03:11:11 +0000</pubDate>
   <guid isPermaLink="true">http://www.scirra.com/forum/construct-2-sdk-advanced-use_topic47293.html</guid>
  </item> 
  <item>
   <title>Construct 2 SDK - Advanced use :   Armitage1982 wrote:I&amp;#039;m...</title>
   <link>http://www.scirra.com/forum/construct-2-sdk-advanced-use_topic47293_post302978.html#302978</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="../users/vampyricalcurse">VampyricalCurse</a><br /><strong>Subject:</strong> 47293<br /><strong>Posted:</strong> 19 Jan 2012 at 1:28am<br /><br /> <table width="99%"><tr><td class="BBquote"><img src="//static2.scirra.net/forum_images/quote_box.png" title="Originally posted by Armitage1982" alt="Originally posted by Armitage1982" style="vertical-align: text-bottom;" /> <strong>Armitage1982 wrote:</strong><br /><br />I'm nearly sure that I will have at least 50 or 100 collisions points to proceed each frames which is CPU intensive.</td></tr></table> <br /><br />Umm... I am pretty sure somewhere in C2 I read that no more than 8 collisions points are recommended? And you want 50 to 100??? Am I misunderstanding what he is saying? O .o ]]>
   </description>
   <pubDate>Thu, 19 Jan 2012 01:28:41 +0000</pubDate>
   <guid isPermaLink="true">http://www.scirra.com/forum/construct-2-sdk-advanced-use_topic47293.html</guid>
  </item> 
  <item>
   <title>Construct 2 SDK - Advanced use : I will !Thanks for the replies.I...</title>
   <link>http://www.scirra.com/forum/construct-2-sdk-advanced-use_topic47293_post302920.html#302920</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="../users/armitage1982">Armitage1982</a><br /><strong>Subject:</strong> 47293<br /><strong>Posted:</strong> 18 Jan 2012 at 10:21pm<br /><br />I will !<br /><br />Thanks for the replies.<br />I guess it all depends on the project. But if Construct 2 deliver his promesses then it will be a nice tool for fast prototyping and handy to quickly publish/update research on a game.<br /><br />The physics demo you send me Kyatric is working smoothly too so who knows...<br />Box2d only compute things, actually you can use it without the need of any rendering stuff, so it will go as fast as the javascript engine goes. But it's always possible to create a huge array of games without relying on physics engine, so like you are saying it's not waisted money at all (and certainly not for that price). I can also probably learn a few things from C2 plugins source code too :)<br /><br />As far as you keep a little room for the developer side of game making and avoid locking everything with too much UI tools, you can only enlarge your experienced users base (not that I am experienced at all but many have a rude approach of game maker tools. They think they can do everything... Yes but in 4 years ^^).<br /><br />Thanks again, keep up good work ;)]]>
   </description>
   <pubDate>Wed, 18 Jan 2012 22:21:34 +0000</pubDate>
   <guid isPermaLink="true">http://www.scirra.com/forum/construct-2-sdk-advanced-use_topic47293.html</guid>
  </item> 
  <item>
   <title>Construct 2 SDK - Advanced use : @Armitage1982, I&amp;#039;m not sure...</title>
   <link>http://www.scirra.com/forum/construct-2-sdk-advanced-use_topic47293_post302910.html#302910</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="../users/ashley">Ashley</a><br /><strong>Subject:</strong> 47293<br /><strong>Posted:</strong> 18 Jan 2012 at 9:51pm<br /><br />@Armitage1982, I'm not sure what your question was from your last post.  Could you clarify what you were asking?<br /><br />Javascript can be coded in an object oriented style if you choose, just because the language doesn't have the keyword 'class' doesn't mean you can't.  And I already mentioned javascript is compiled to machine code these days so is pretty fast, although obviously not as good as C++.  Performance varies depending on your machine and browser so you should just try stuff out to see if it's fast enough for your purposes.]]>
   </description>
   <pubDate>Wed, 18 Jan 2012 21:51:20 +0000</pubDate>
   <guid isPermaLink="true">http://www.scirra.com/forum/construct-2-sdk-advanced-use_topic47293.html</guid>
  </item> 
  <item>
   <title>Construct 2 SDK - Advanced use : Hard questions to answer, as I...</title>
   <link>http://www.scirra.com/forum/construct-2-sdk-advanced-use_topic47293_post302908.html#302908</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="../users/kyatric">Kyatric</a><br /><strong>Subject:</strong> 47293<br /><strong>Posted:</strong> 18 Jan 2012 at 9:46pm<br /><br />Hard questions to answer, as I don't believe anyone went for such advanced/specific use yet.<br /><br />For the question about collisions, as I said previously the built-in physic behavior is based on box2D.<br />You can check <a href="http://www.scirra.com/forum/physics-beta_topic48183.html" target="_blank" title="Game maker">this demo</a> that shows quite a few elements on screen with physic behavior. It's perfectly fluid on my FF 9.0.1 on win7 (NVIDIA GeForce GTX 560 Ti).<br /><br />So I guess JS via C2 sounds powerful enough on computation level (I'm not sure if the webGL rendering helps in any way with the computing of physic though).<br /><br />And for the AI part, same thing I guess. I think I'm not knowleageable enough on this.<br />The furthier I went as for "AI"/computing is the <a href="http://www.scirra.com/forum/behaviorpathfinder_topic44444.html" target="_blank" title="Game maker">pathfinder behavior</a> and it has always appeared to work pretty good on my computer (I started it on XP with a dual core 2.5Gh and finished it on win7 with a quad core 3.5Ghz).<br /><br />I guess if you really push it you will hit limitations, but hard to precisely tell you "you can do up to X collision at the second" for now 'cause it sounds it depends so much on the gear/OS/browsers/etc...<br /><br />As you said, at worse you can always do "simpler" thing with C2 it is not totaly wasted money.<br /><br />Keep us informed about your experimentations/results <img src="http://www.scirra.com/forum/smileys/smiley1.gif" border="0" align="middle" /><br /><br />Also moved to the SDK forum, it is less likely to drown answerless.<span style="font-size:10px"><br /><br />Edited by Kyatric - 18 Jan 2012 at 9:50pm</span>]]>
   </description>
   <pubDate>Wed, 18 Jan 2012 21:46:56 +0000</pubDate>
   <guid isPermaLink="true">http://www.scirra.com/forum/construct-2-sdk-advanced-use_topic47293.html</guid>
  </item> 
  <item>
   <title>Construct 2 SDK - Advanced use : Well I did not get answers to...</title>
   <link>http://www.scirra.com/forum/construct-2-sdk-advanced-use_topic47293_post302901.html#302901</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="../users/armitage1982">Armitage1982</a><br /><strong>Subject:</strong> 47293<br /><strong>Posted:</strong> 18 Jan 2012 at 9:17pm<br /><br />Well I did not get answers to these questions but since HTML5 is still a promise, I bet on scirra and construct 2 as my first tool in that new area. Time will tell me if I was right  <img src="http://www.scirra.com/forum/smileys/smiley2.gif" border="0" align="middle" /><br />In any cases I can still use it to build web stuff or simple things.]]>
   </description>
   <pubDate>Wed, 18 Jan 2012 21:17:30 +0000</pubDate>
   <guid isPermaLink="true">http://www.scirra.com/forum/construct-2-sdk-advanced-use_topic47293.html</guid>
  </item> 
  <item>
   <title>Construct 2 SDK - Advanced use : Thanks for the answers.I had a...</title>
   <link>http://www.scirra.com/forum/construct-2-sdk-advanced-use_topic47293_post296915.html#296915</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="../users/armitage1982">Armitage1982</a><br /><strong>Subject:</strong> 47293<br /><strong>Posted:</strong> 24 Dec 2011 at 2:39am<br /><br />Thanks for the answers.<br /><br />I had a look at the provided links and the architecture looks really nice !<br /><br />What I was meaning by OO design was strictly a manner of organizing my game objects, but if I correctly understand Javascript does not allow this feature the way I want and you must use a few tricks to do it correctly. It's a bit a mess but ok for me.<br /><br />As an example, I know that one of the potential bottleneck of using Box2d is when you solve/pre-solve/post-solve the Contact Collision by Yourself. <br />- First, I don't know if using these callbacks are possible within the current architecture<br />- Second, isn't javascript a bit slow regarding to this task ? I ask only because I don't know much about this language and I'm nearly sure that I will have at least 50 or 100 collisions points to proceed each frames which is CPU intensive.<br />- Same think with the AI using Finite State Machine for every objects on every cycles.<br /><br />I'm only asking this from a processing speed point of view. I know that HTML5 rendering still need a bit of power to talk about graphic speed right now.<br /><br /><br />Thanks for your support.]]>
   </description>
   <pubDate>Sat, 24 Dec 2011 02:39:46 +0000</pubDate>
   <guid isPermaLink="true">http://www.scirra.com/forum/construct-2-sdk-advanced-use_topic47293.html</guid>
  </item> 
  <item>
   <title>Construct 2 SDK - Advanced use : Modern Javascript is compiled...</title>
   <link>http://www.scirra.com/forum/construct-2-sdk-advanced-use_topic47293_post296168.html#296168</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="../users/ashley">Ashley</a><br /><strong>Subject:</strong> 47293<br /><strong>Posted:</strong> 20 Dec 2011 at 2:22pm<br /><br />Modern Javascript is compiled to machine code so it's definitely fast enough.  I'm not sure what you mean by an "OO Plugin" (aren't all objects in C2 "OO"?) but they can definitely interact with the low level parts of the engine, mainly because Javascript doesn't support encapsulation.  All the pre-supplied plugins and behaviors are written in the SDK as well, so all features in Construct 2 are exposed to the SDK.<br /><br />You might also be interested in this blog post on <a href="http://www.scirra.com/blog/53/c&#111;nstruct-2s-architecture" target="_blank" title="Game maker">Construct 2's architecture</a>.<span style="font-size:10px"><br /><br />Edited by Ashley - 20 Dec 2011 at 2:22pm</span>]]>
   </description>
   <pubDate>Tue, 20 Dec 2011 14:22:12 +0000</pubDate>
   <guid isPermaLink="true">http://www.scirra.com/forum/construct-2-sdk-advanced-use_topic47293.html</guid>
  </item> 
 </channel>
</rss>