shalmu's Recent Forum Activity

  • The only method I see now is to ask animators to prepare things in a separate project "animations", open both working project and "animations" then copy/paste sprites from one to another.

    Is there an ability to export those the same way we do with plugins? To some kind of ".c2sprite" file?

  • there isn't much we can do about that.

    What about using an existing rendering lib, like pixijs.com They claim it's a "2D webGL renderer with canvas fallback"

    Or two.js: "It is renderer agnostic enabling the same api to draw in multiple contexts: svg, canvas, and webgl."

  • I can't believe you still don't have this possibility since 2012

    • What if I have a lot of diffirent aces, and I would like to split them to keep them in different files?
    • What if I have a huge drawing system that I want to keep in a separate file?
    • What if I have the same chunk of code that I want to use in 5 different plugins?

    I realize that edittime works in a pure V8 context, but there are pure V8 libs, like Node.js, that allow to use require.

    I was hoping it's gonna work in Construct, tried to separate the drawing stuff, wrote this:

    var draw = require('./drawEdit');
    draw.draw();[/code:2hql0u53]But it wouldn't work.
    
    Any thoughts about it?
  • Ashley, I merely saw it in a video tutorial about "How to create a Grid plugin".

    Does it mean (I ask for the sake of good coding practice) that I have to write two different chunks of code that do the same thing in those two methods? Or should I only rely on webGL and skip the "draw"?

    What I do right now is I write this:

      var sorryShown=false;
    	instanceProto.drawGL = function (glw){
        if(!sorryShown){
            alert('Sorry, but this plugin cannot be used with WebGL on.\n'
                +'To turn it off, go to Project->Enable WebGL and set it to "Off".');
          sorryShown=true;
        }
      };[/code:3vdzbl64]
    So that people won't wonder why nothing happens if they are in GL mode.
    
    Or maybe I could take advantage on a cross-context lib, like Two.js?
  • Alright, so to draw anyway, I do this:

    instanceProto.drawGL = function (glw){
        this.draw(this.runtime.overlay_ctx);
    }[/code:kw3xbeg3]
    but in this case .draw()'s parameter "ctx" is null...
    How can I pass the real 2D canvas to .draw?
    I tried "this.runtime.canvas" as well as "this.runtime.overlay_canvas" - nothing is working...
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I am doing the simplest tutorial:

    goo.gl/20ixH0

    but it won't execute "draw" method, no matter what I do.

    I even put "alert(111)" inside the body of the function, it won't fire.

    Any ideas?

shalmu's avatar

shalmu

Member since 29 Jul, 2015

None one is following shalmu yet!

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies