matriax's Recent Forum Activity

  • Ok! thanks for the fast reply.

  • I saw is possible set float and percent on the .XML but wonder if there is another type allowed to add a string in the parameters.

  • R0J0hound Have some problem pasting objects with various WebGL effects.

    Only the image with the last webgl effect applied is pasted correctly.

    Here a blank project with and image and just one event:

    https://drive.google.com/file/d/1HDm4qI ... sp=sharing

    What i'm missing ¿?

  • Using the Gigatron shader Nesify there are some predefined palettes like gameboy or Nes.

    Wonder, if is possible create a shader that can load 256 colors in runtime from a given .pal format.

    The colors on the shader are like this one:

    TRY_COLOR (vec3 (13.0, 65.0, 56.0));

    So maybe something like:

    TRY_COLOR (vec3 (R0, G0, B0));

    Until

    TRY_COLOR (vec3 (R255, G255, B255));

    So i think this should be created from an automatic way due also needs to be created the uniforms and the .xml params.

    Then i guess on events load the .pal file that is like:

    24 0 8

    56 16 24

    64 16 24

    80 24 32

    ....

    And set the numbers for that effect params on the FX.

    I don't know if this is possible or maybe there is another easy way.

    What you think?

  • Seems there is a way to fix this using that:

    https://developer.mozilla.org/en-US/doc ... eObjectURL

    R0J0hound any idea if this can work? Or there is another way to avoid that 1.5mb limit on chrome browsers?

  • Well seems i have a solution. Provided by dop2000 .

    Loading a .txt with ajax plugin with this content:

    var global = Function('return this')(); //get global scope.
    
    global.openFileDialog = function(fileType) { 
     // this function must be called from  a user
     // activation event (ie an onclick event)
    
        // Create an input element
        var inputElement = document.createElement("input");
    
        // Set its type to file
        inputElement.type = "file";
    
        // Set accept to the file types you want the user to select. 
        // Include both the file extension and the mime type
        inputElement.accept = fileType;
    
        // set onchange event to call callback when user has selected file
        inputElement.addEventListener("change", function (event) {
    
        [...this.files].forEach(file => {
            //var s = file.name;
    var url = URL.createObjectURL(file);
            c2_callFunction("GetFileFromDialog", [url]);
        });
    
         } );
    
        // dispatch a click event to open the file dialog
        inputElement.dispatchEvent(new MouseEvent("click")); 
    };[/code:46st2m3i]
    
    An execute javascript with "openFileDialog();" on sprite clicked or whatever.
    
    Is a bit of workaround but seems works on any browsers and NW.JS. 
    
    If somebody know another solution/way, let me know.
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • How can i open the browser dialog to load an image without use the NW.JS plugin or the "File Chooser" plugin wich is a form control ?.

    I tried to look in the browser actions but only appears "invoke download" to open the browse dialog to save some file but can't find the one for load to be used in the online version without form controls ¿?.

    Maybe i guess i should use "execute javascript" but can't find any code to do that. Any idea?

  • R0J0hound LOL! That's just the idea i had days ago and last night told to dop2000 that after the attempts we did i was gonna develop it and compare with the actual method we already have

    Not understand very well the way you did(I had another aproach) but yours looks better.

    THANKS SO MUCH !!!

  • R0J0hound After all test i made, the unique way to take screenshot larger than the user screen is:

    With "Fullscreen in Browser" set "OFF" on Browsers and NW.JS. In case of NW.JS only in Window Mode.

    With that i can take screenshots even of 3200x3200 no matter that my max resolution is 1920x1080.

    But i can't get my interface looks right with "OFF" so my idea/workaround was start with Scale inner, and before the screenshot set "OFF" but there is no option to that in the system/browser actions, so wonder if there is anyway to access to that option using "execute javascript" ¿?

  • R0J0hound I already tried that way but not works or i can't get working.

    This are my events:

    I'm using "Scale inner" for scaling because is what works for me needs. Tried the rest of the options and all same or less resolution except with "Full screen scaling OFF".

    Windowed:

    Exports an image of 2560x2560 with the texture area of: 2367x1668.

    Full Screen:

    Exports an image of at same resolution app starts or set initially.

    Maybe i understood you wrong ¿?

    Edit: Also the window app size can be larger than the user screen resolution, or at least in W7. Btw, the app also need to work online and there is no window size only on Nw.JS.

  • I want to export a 2048x2048 images in C2 or using the R0J0hound Paster plugin but have this problems:

    1.- Take snapshot canvas on System actions: (Image Ok - Resolution Fail)

    Problem > The image exported depends of the window app size. If user have max monitor resolution of 1920x1080 can't export to 2048x2048.

    2.- Paster plugin(WebGL). Pasting objects or Paste Layer: (Image Fail - Resolution ok)

    Can export 2048x2048 textures but the exported images with some WebGL effects not looks equal(Like contrast). Also if the image have any blend WebGl effects(Screen, Darken, Difference..) gives an error. Here a screenshot with the error: https://cdn.pbrd.co/images/H6OnMPl.png.

    3.- Paster plugin(WebGL). Load texture from canvas: (Image Ok - Resolution Fail)

    Is similar to Canvas Snapshot, but i can set the canvas/resolution of the paster to 2048x2048 but the exported shows only the window app size: https://cdn.pbrd.co/images/H6OogKo.png

    So, wonder if there is anyway to export up to 2048x2048(Or higher) using the canvas snapshot or paster plugin no matter the window app size. Or do a real screenshot of X size of the canvas/layout not only the window display.

    Any idea?

  • Seems Chrome have a limit to download more than 1.5mb file size.

    And due Nw.JS uses chromium after export have the same problem. On firefox and IE works fine due their size limit is more large. I know for Nw.JS i can use their Write file actions.

    But, for an online app, using the Browser plugin, how i can avoid the file size limit of 1.5mb on chrome browsers?

matriax's avatar

matriax

Member since 22 Jun, 2015

Twitter
matriax has 114 followers

Trophy Case

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

Progress

17/44
How to earn trophies