Tom's Forum Posts

  • One thing that may help in advanced mode is putting all your compiled code in any anonymous function wrapper:

    $(function() {

    });

    Change the last line to:

    })();

    if it needs to execute the code block as soon as it's loaded.

    This stops conflicts with any other scripts apparently in the global scope which can cause issues. For example if the Jquery.min is in the global namespace there will be conflicts between minified variable names as the closure compiler declares things such as:

    var s = true, x = null, v = false;

    These might conflict with Jquery minified code.

    You probably know all this but just incase it's the issue.

  • Ah sorry, I looked at the ghost hunter one and it seems to be compiled so thought they all were.

    In regards to advanced killing, let me know what you find out because I have scripts that don't survive it either.

  • Is the c2 runtime compiled by googles closure compiler? (it looks like it is, just asking out of curiosity!)

    Is there any downside to not compiling it apart from obvious bandwidth and slight speed improvement? I only ask, because if a game throws a JS error, isn't it going to be really difficult to debug it? Is having it obfuscated important? would it be good if developer mode is on to non compile it?

  • Editing registry keys to switch between dev mode and non dev mode seems a bit... long winded. Can't we have a button? Also would probably be a good idea to print something on the canvas like "DEV MODE" in bottom right in red small or something to stop people accidently exporting non cacheable JS's.

  • Once Scirra has a bigger footprint on the web this will become much less of an issue.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • The one thing that article illustrates is the beurocracy involved in developing HTML5, it's political and nothing you should be worried about. The beginning of the article was a bit of a scare monger but it's not going to affect end users much at all.

  • How about:

    "Construct.... Two!"

    or

    "Construct pew, pew-pew!"

  • I'm not sure if that can load fonts the user doesn't have though

  • Hi Jerry,

    It's great you are considering Construct for educational resources. The tutorials forum has a lot of tutorials:

    It's best if you start making what you want, then post whenever you come across something you get stuck on. You said you don't know where to start, but some of those tutorials should give you a good starting point.

    Tom

  • Looks good! Keep up the good work, always good to see new Construct sites popping up.

  • Related info:

    http://stackoverflow.com/questions/4037 ... ull-screen

    I imagine Ashley will figure out a way to do this in a later build. It's possible but it's going to need some special code.

  • Oh you're talking about the editor. Then yeah every time you make a change you will need to reload the editor.

    I'm not sure of any other good solution to this. Maybe a dev panel that has a button on it which reloads all resources and other stuff? Or a button that closes and reopens construct would be really handy.

  • In the source:

    [quote:2kwpdv2m]<script type="text/javascript" src="c2runtime.js"></script>

    It would probably be good if you could build the external JS with a version # in the name to remove confusion for debugging when viewing peoples code etc, (you can see exactly what version they are using). It will have other benefits down the line as well.

    IE:

    [quote:2kwpdv2m]

    Alpha release 27:

    <script type="text/javascript" src="c2runtime.a27.js"></script>

    Also as mentioned in another thread, plugin development is hampered by browser caching. During development it would be beneficial to stop caching:

    [quote:2kwpdv2m]

    <script type="text/javascript" src="c2runtime.a27.js?nocahce=27 feb 2011 13:38:32"></script>

    But during the formal export the query string can be removed.

  • Sounds like a browser caching problem. I think Construct saves all the plugins as external JS files to stop common resources being re-downloaded all the time.

    I think during development, when the run button is pressed, a query string parameter should be added to ALL external JS, to stop caching.

    IE:

    <script type="text/javascript" src="c2runtime.js?nocache=14/feb/2011/12:47pm"></script>

    This forces the browser to reload the resource and not rely on caches.

    When the project is exported formally, the query string params can be removed.

  • Right clicking during a game brings up context menu in a lot of browsers which interrupts the user flow, if you add:

    oncontextmenu="return false;"

    to the canvas element it should prevent this, proposing this as a default setting for all exports.