francoisdiotte's Forum Posts

  • 15 posts
  • Hehe i'm just little bit picky for performance, here is a suggestion�

    You should find a way to perform only 1 condition for fullscreen check, because this function are executed tons of times. For exemple:

    var isfullscreen = (document["mozFullScreen"] || document["webkitIsFullScreen"] || document["fullScreen"] || this.isAwesomiumFullscreen);
              var overlay_position = isfullscreen ? jQuery(this.canvas).offset() : jQuery(this.canvas).position();
    

    Could be replaced by something like that:

    var overlay_position = this.isFullscreen ? jQuery(this.canvas).offset() : jQuery(this.canvas).position();
    

    But how ever, it work now! Thanks again

  • Yes it work!!

    Sweet thanks, we really appreciate it! You can close this ticket :)

    Peace

  • Oh I just got an idea to be sure this not affect performance at all, you can write something like that:

    if(document["mozFullScreen"] || document["webkitIsFullScreen"] || document["fullScreen"]){
         runtimeProto.positionOverlayCanvas = function()
         {
              var overlay_position = jQuery(this.canvas).offset();
              overlay_position.position = "absolute";
              jQuery(this.overlay_canvas).css(overlay_position);
         };
    }
    else {
         runtimeProto.positionOverlayCanvas = function()
         {
              var overlay_position = jQuery(this.canvas).position();
              overlay_position.position = "absolute";
              jQuery(this.overlay_canvas).css(overlay_position);
         };
    }
    

    But I'm not sure if document["fullScreen"] are set at this point.

  • I use Chrome 20.0.1132.47 and without the fullscreen detection, the overlay are missaligned.

    So I recommand you using this to be sure

    var overlay_position = (document["mozFullScreen"] || document["webkitIsFullScreen"] || document["fullScreen"])?jQuery(this.canvas).offset():jQuery(this.canvas).position();
    

    This weekend I will download the r98 at home and test it again. Today it's impossible due to overwork! By the way, we just buy a license but it's not affiliate on my personnal account. My boss buyed one, his name "Paul Gamache". So we pay for your great product and really really appreciate it!

    Thx to paying attention on my issue!

    Peace

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Of course yea it's possible. Should push with more tests to be sure...

    I just found now it broke position on full screen, for the exact same reason, but reverse... When on fullscreen, relative seem to be different. I fix this with this:

    runtimeProto.positionOverlayCanvas = function()
         {
              var overlay_position = (document["mozFullScreen"] || document["webkitIsFullScreen"] || document["fullScreen"])?jQuery(this.canvas).offset():jQuery(this.canvas).position();
         overlay_position.position = "absolute";
         jQuery(this.overlay_canvas).css(overlay_position);
    };
    

    I hope this help

  • Oh I just found it's possible to fix it localy in preview.js. It's ok for now, I will have to fix it on every release!

    Let me know if you will fix this soon.

  • Ok try explain it clearly, sorry for my english, I'm french first :P

    I found the solution to fix it, but it's on frame code, that only you could permenently fix :) let me explain...

    So I dont have any .capx for that, cause the probleme is in integration of canvas in my html. So first, here a example of my html and style, minimum requirement to reproduce my problem:

    <body>
         <header>My header</header>
         <section>
              <canvas id="c2canvas" width="1000" height="500"></canvas>
         </section>
         
         <style>
              header{
                   display:block;
                   height:200px;
                   background:#DDDDDD;
              }
              section{
                   display:block;
                   position:relative:
              }
              section canvas{
                   border:1px solid #DE0000;
              }
              section #c2canvas{
                   border:1px solid #000000;
              }
         </style>
         
    </body>
    

    The result of this set canvas overlay top at "200px"... It's wrong cause it's supposed to be "0px" due to the position:relative; in section tag. So the overlay canvas dont position it correctly in that kind of situation. Yea, I can move my canvas tag out of there, but it broke my semantic css...

    I looked in c2runtime.js to find a solution, and I just found this function:

    runtimeProto.positionOverlayCanvas = function()
    {
         var overlay_position = jQuery(this.canvas).offset();
         overlay_position.position = "absolute";
         jQuery(this.overlay_canvas).css(overlay_position);
    };
    

    If I replace ".offset();" by ".position();", which retrieves the current position relative to the offset parent, it solve the problem!

    For now I fix it manualy after each export, but I'm pretty sure you could fix this quickly.

    I hope it's my explanations are ok and clear! Tell me if not.

    Peace

  • Well with physic it's pretty simple according this tutorial :

    scirra.com/tutorials/67/delta-time-and-framerate-independence/page-1

    Set time scale of game to 0 to pause the game and 1 to unpause... enjoy

  • Keep it simple :) But yea it should be usefull!

    thx

  • Hello world!

    Scirra work like a charm!

  • Zack0Wack0

    First, cheer! You made a usefull pluggin for multiplayers games! My actual professionnal project of bike simulator connect 10 peoples simunatly and that is a evidence socket is THE solution.

    Well we tryed the Socket IO version and we found somes problems on server implementation with Tomcat 7 and Spring MVC. Socket IO seem have no concret exemple with this server configuration. You can imagine how is hard to convience a long term project to change his server setup hehe... so... I've 2 big questions:

    1. Do have any information about my actual server configuration and Socket who can help us?

    2. If no answer to question 1, are you interested to work with me to build a Comet socket version for Construct 2?

    Comet work with actual server setup. playframework.org/documentation/2.0/JavaComet

    I'm a senior programmer who want help this community but if a start working on this plugin, I will for sure need assistance from you. I already explored your code and it seem to be easy. If you already started Comet version, tell me! My enterprise can pay for it! We register Construct 2 this week, cause last week my proof of concept was accepted!

    Thx in advance!

  • Ashley, there is no major problem with that except when I try to develop my own plugin. So Fimbul are right.

    For exemple, I actualy explore possibility with your plugin system and Comet socket. I know there is a plugin but it seem we really have to use Comet instead of Socket IO or Websocket.

    Well a simple menu to turn it on/off should be interesting for developer who try to expect network whit Chrome network inspector for exemple.

    best regard's!

  • Velojet

    Aaaa! I was expecting a checkbox somewhere in project preferences... Ok then it's all I need!

    Thx

  • Hello there! First post here, and btw... scirra your editor is fantastic! Keep working hard on!! Rock on!

    Ok my question is veeeery simple. I've found this post but I need more precision.

    What the location of option to disable the preview reloading? (_reloadpoll_)

    thx in advance!

    Peace

  • Hello there!

    And where is this option in file menu?

  • 15 posts