el3um4s's Recent Forum Activity

  • Just for joke: I added a bubbly background to Construct3 KiwiStory ??

    update : I almost finished my plugin for set a bubbly background to Construct3.

    This is a test with Scirra's Glokar game:

  • Nice nice nice!

    Thank you

    Another add on my own plugin for drawing map with Construct3: now you can choose the style with a simple event.

  • I do not know if it's the right section, but I have a curiosity.

    I tried to create an executable file with NW.js and with Electronjs. Both for Windows 64bit. I used KiwiStory as a starting point, without modifying anything (I just added a ico file). I setted to true the option Deduplicate images, Recompress images and Minify script.

    For NW.js I used this tutorial. For Electronjs I used this instructions to download a zip files with the HTML and JS source. Then I created an electron app that reference to index.html like start page. This is a github with my code.

    And this is the two files I obtained (hosted on GitHub)

    As you can see, the NWjs export is 77MB (compressed), the Electronjs export is 47MB. If I decompress the NWjs's file I get a folder of 154MB. Electronjs is 3 times smaller than NWJS.

    Instead the used RAM is similar:

    So, why is the size difference so big?

    Another question, from a noob.

    Many applications have been built with electronjs. I myself use some of these (Gitkraken and Atom and Skype). Why does Scirra / Construct prefer NWJS? Are there any features that are missing at Electron?

    One last question: using electron to create a file to distribute is allowed by the terms of use of Costruct3? (Obviously with an active subscription)

  • To simplify my program I decided to create a plugin to view the maps. it's still work in progress.

    gif: https://twitter.com/twitter/statuses/995078682636095488

  • Colludium - Ashley

    I have a problem to set colors in WebGL. I can draw with primary colors but not with other RGBA colors.

    For exemple, if I want to draw a yellow quad, this works:

    instance.js

    iRenderer.SetColorRgba(127,254,212, 1);
    iRenderer.SetColorFillMode();
    iRenderer.ConvexPoly([myx, myy, myx+w, myy, myx+w, myy+h, myx, myy+h]);
    [/code:jfq526sl]
    
    [b]runtime.js[/b]
    [code:jfq526sl]
    instanceProto.drawGL = function(glw) {
        var myx = this.x;
        var myy = this.y;
        var w = this.width;
        var h = this.height;
       glw.setColorFillMode(255, 255, 0, 1);
       glw.quad(myx, myy, myx+w, myy, myx+w, myy+h, myx, myy+h);
      };
    [/code:jfq526sl]
    
    But if I change 
    
    [b]instance.js[/b] iRenderer.SetColorRgba(127, 254, 212, 1);
    [b]runtime.js[/b] glw.setColorFillMode(127, 254, 212, 1);
    
    I have a white quad.
    
    Instead in [b]instanceProto.draw[/b] I can draw a coloured quad simply changing [i]ctx.fillStyle[/i]
    
    [code:jfq526sl]
      // ctx.fillStyle = `rgba(255, 255, 0, 1)`;
      ctx.fillStyle = `rgba(127, 254, 212, 1)`;
      ctx.beginPath();
      ctx.moveTo(myx, myy);
      ctx.lineTo(myx+w, myy);
      ctx.lineTo(myx+w, myy+h);
      ctx.lineTo(myx, myy+h);
      ctx.closePath();
      ctx.fill();
     [/code:jfq526sl]
    
    What's wrong with what I'm doing?
  • Could you give me examples of where to use this for?

    Hello mumu64

    It's only a test of c3's potential. I made it for testing addons in developer mode. If you look into the SDK Manual (this page), I want to simplify the point 2.

    You can use this program also for create a local web server for testing web app built with another software. Some things need to run into a HTTPS server: with this app you can create one and use it for testing.

    If you prefer, you can do the same with command line and npm.

  • Why rotated sprite looks worse using "WebGL enabled" than with no WebGL?

    I created a sprite with only a color and then I rotated it. If i use "WebGL enabled" the outline is pixelated.

    But if i disable WebGL the outline is ... clear.

    I have the same effect if I use GLWrap_ to draw a rectangle:

    glw.quad(tlx, tly, trx, try_, brx, bry, blx, bly);[/code:3b4qfwz6]
    
    the image (after rotation) is worse than
    [code:3b4qfwz6]
          ctx.beginPath();
          ctx.moveTo(tlx, tly);
          ctx.lineTo(trx, try_);
          ctx.lineTo(brx, bry);
          ctx.lineTo(blx, bly);
          ctx.closePath()
          ctx.fill();[/code:3b4qfwz6]
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The function glw.convexPoly takes an array of points in only one argument. See glwrap.js for more details.

    Thanks Colludium

    This works:

    instanceProto.drawGL = function(glw) {
       var q = this.bquad;
       glw.setColorFillMode(0,0,255,1);
       glw.convexPoly([q.tlx, q.tly, q.trx, q.try_, q.brx, q.bry]);
    };
    [/code:305dxzse]
    
    But, how I can draw a line? And points with color? Is this correct? Is the only way?
    [code:305dxzse]
      var point = glw.quad(50, 50, 55, 50, 55, 55, 50, 55);
      var line = glw.quad(150,150,151,150,251,251,250,250);
    [/code:305dxzse]
  • This code it's ok, draw a blue rectangle.

    instanceProto.drawGL = function(glw) {
        var q = this.bquad;
       
       glw.setColorFillMode(0,0,255,1); // colora
       glw.quad(q.tlx, q.tly, q.trx, q.try_, q.brx, q.bry, q.blx, q.bly);
    };[/code:3g8azeha]
    
    But this doesn't draw 3 blue points: they're black.
    [code:3g8azeha]instanceProto.drawGL = function(glw) {
      glw.setColorFillMode(0,0,255,1);
      var a = glw.point(1,1,5,1);
      var b = glw.point(20,20,5,1);
      var c = glw.point(40,40,5,1);
    };
    [/code:3g8azeha]
    
    And this code
    [code:3g8azeha]instanceProto.drawGL = function(glw) {
      var x1 = glw.point(80,80,5,1);
      var x2 = glw.point(100,100,5,1);
      var x3 = glw.point(100,200,5,1);
    
      glw.convexPoly(x1, x2, x3);
    };
    [/code:3g8azeha]
    gives me this error:
    [code:3g8azeha]Uncaught TypeError: Cannot read property 'length' of undefined[/code:3g8azeha]
    
    I don't undertand how I can draw lines. I can't find a line function in c2/glwrap.js
  • I'm trying to make a simple plugin. I want to design simple geometric shape. But I don't understand how I can create the drawGL function.

    I can draw on canvas with instance.draw but I don't know I can do the same with drawGL. If I use gwl.quad I have only a black rectangle. And I can't set the color.

    instanceProto.draw = function (ctx) {
    		var myx = this.x;
    		var myy = this.y;
    		var w = this.width;
    		var h = this.height;
    		ctx.fillStyle = "blue";
    		ctx.fillRect(myx, myy, w, h);
    	};
    
    instanceProto.drawGL = function (glw) {
    	};
    [/code:2h5eova9]
    
    There is not information in C3 manual ([url=https://www.construct.net/it/make-games/manuals/addon-sdk/search?q=drawGL]link[/url]). The same in C2 manual ([url=https://www.scirra.com/manual/search?q=drawGL]link 1[/url], [url=https://www.scirra.com/manual/23/runtime-functions]link 2[/url]).
  • I just published the first version of my "Local Server for Construct3". I built this Windows app only with c3 (and a bit of javascript).

    It's only an experiment but I'm satisfied ??

    GitHub: Link to releases

    GitHub: Link to source files

    Local Server for Construct 3

    A simple Windows app built with Construct 3. You can choose a folder and start a local server (http on port 65432, https on port 8080).

    How to Install

    Download the Local.Server.for.Construct.3.zip from the releases page. Then extract the zip and launch the "Local Server for Construct 3.exe" file.

    How to Use

    Choose the folder to use like root for the local server. Don't use spaces in folder path.

    If the two circles are green you can start the local server. Differently, you can click to Copy Settings to copy the settings file. Then click to Install Local Server.

  • First: Thanks for this useful plugin It's awesome!

    I have a problem with AliasValue: it's ok with var, not with const and let.

    But if I pass const and let to a function, and I use Call function, I can get the correct value.

    What's wrong?

el3um4s's avatar

el3um4s

Early Adopter

Member since 9 Nov, 2015

Twitter
el3um4s has 16 followers

Connect with el3um4s

Trophy Case

  • 9-Year Club
  • Forum Contributor Made 100 posts in the forums
  • x2
    Popular Game One of your games has over 1,000 players
  • Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

15/44
How to earn trophies