Grimmy's Recent Forum Activity

  • I am making a small grid of drawing canvasses. (To test seamless noise)

    I have 2 Drawing canvasses each 200 by 200 pixels sitting pixel perfect next to each other in my layout.

    When I scale my browser window I see a single pixel column gap flickering between them. Why is this?

    I have tried changing the Fullscreen mode and also switching on pixel rounding but I always see the gap at certain resolutions.

    How can I fix this?

    Thanks

  • Thanks very much for this. I got the javascript implementation working in C3, but again, there seems to be no customization options or any way to make the noise seamless afaik :(

  • Hi again, DiegoM I tried simplexnoise2d.js but surprisingly despite its name it seems to be written in typescript. This mean when I bring it into construct I just get a ton of errors.

    I always thought c3 supported typescript but it seems to rename everything to .js and also throw errors.

    I just saw the help on typescript. Seems a lot of effort just to include a library.:(

  • Thanks fedca, yes this was my initial approach but sadly I dont think there is a way to make the advanced Random Seamless.

    Although Im still hoping there is :)

  • Well, after spending quite a bit of time with this I realised FastNoiseLite doesnt do 'seamless' noise ; which is really what Im after.

    So, does anyone know any library I can use to generate seamless noise in construct?

    I saw a few but tried them and they all have very weird setups that I just dont understand how to import and use in construct. I just get errors. For example, one begins like this...

    function Grad(x, y, z, t) {
     this.x = x; this.y = y; this.z = z; this.t = t;
     }
    
     Grad.prototype.dot2 = function(x, y) {
     return this.x*x + this.y*y;
     };
    

    ..which is neither a class of regular function, others have other, even weirder looking setups and I just get errors everytime I try to hook them up.

    I am well aware of using export and import but I cant get anything working.

    Does anyone have any recommendations?

    Thanks

  • Thanks. using...

    import FastNoiseLite from "./fastNoiseLite.js";
    

    ...instead of...

    import * as FastNoiseLite from "./fastNoiseLite.js";
    

    ..works a treat.

    Oddly though, if I put the import in the main script it doesn't work, but if I put it in the import for events sheet it does. Is there a reason for that?

    Thanks again

  • OKay. Here is the c3p file.

    Cheers

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi, I am trying to use the FastNoiseLite noise libray but I keep getting the error: FastNoiseLite is not a constructor or FastNoiseLite is not defined.

    In my import for events script I have:

    import * as FastNoiseLite from "./fastNoiseLite.js";
    

    The fastNoiseLite.js script is in the script folder with the correct case name

    fastNoiseLite.js has purpose 'None Set'

    fastNoiseLite.js has export set eg..

    export default class FastNoiseLite { //...code
    

    And in my function triggered by a button press I create a new instance with :

    const noise = new FastNoiseLite();
    

    which is where the error happens.

    ..Any ideas?

    Thanks

  • Thanks! I got it working.

  • Does it matter that this javascript is in the event sheet and not a separate js file?

  • yes :) but I still get the error

  • Thanks but not much help I'm afraid. That demo seems to just getImagePixelData followed by loadImagePixelData.

    Also, that demo script very complicated and hard to understand. I just want to know how to plot a single pixel on a 1 by one canvas. If I cant manage that I stand no change of doing anything close to what that demo is doing.

Grimmy's avatar

Grimmy

Member since 20 Nov, 2012

Twitter
Grimmy has 2 followers

Trophy Case

  • 12-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

17/44
How to earn trophies