DiegoM's Forum Posts

  • That last snippet that you are not sure what it is, is what classes used to look in Javascript and they are used just like classes defined with the newer syntax.

    	let grad = new Grad(1, 2, 3, 4);
    	grad.dot2(0, 1);
    

    Maybe you can try this module github.com/jwagner/simplex-noise.js , it looks promising.

  • Looking back on this... I can't remember what was the reason to skip implementing it. It should work just as Create Object with the minor difference that the newly created instance would have the angle of the picked instance instead of the angle of the template, everything else should work the same.

  • That's because what the import keyword is doing is creating a variable, and the variable can only be seen in the scope it is created in. Just like a regular variable can not be seen outside of the function it is created in.

    There is a caveat though. If the module you are trying to use is an older one, the way they export things is by attaching properties to the global scope. So in that case, it doesn't matter were the import statement is, because the module will just add things globally.

    For example, if you take the library you are trying to use and add this to the very end:

    globalThis.FastNoiseLite = FastNoiseLite;
    

    A FastNoiseLite property will be created in the global scope, then it doesn't matter in which file you import the module, globalThis.FastNoiseLite will be available.

  • A couple of things to get this working.

    1) Use the import in the file you need it.

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

    That creates the variable FastNoiseLite in the script where it is written. So instead of putting it in your main.js you put it at the top of importForEvents.js

    2) This part is tricky.

    The module you are using is exporting a class using the default keyword

    export default FastNoiseLite {
    	...
    }
    

    When you do

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

    What is happening is that all the things the module is exporting become part of the new FastNoiseLite variable.

    Because what you are looking for was set as the default thing to export, what you need to write to access the object you are looking for is this:

    	// Use FastNoiseLite.default to access the default export from the module
    	
    	const noise = new FastNoiseLite.default();
    	noise.SetNoiseType(FastNoiseLite.default.NoiseType.Perlin);
    

    In this particular case where the module you want to use has a default export, it is much better to use this to import:

    	import FastNoiseLite from "./fastNoiseLite.js";
    

    Doing that just places the default export of the module into the FastNoiseLite variable, and is used like you expect it should be used.

  • The Animations editor already supports bulk importing.

    construct.net/en/make-games/manuals/construct-3/interface/animations-editor

    The basic use case is just being able to drop a folder or a zip file onto the animations pane and have an animation created. The animation is named after the folder or zip file.

    For more complex use cases, the importer supports placing a configuration file next to the files. The configuration file is a JSON file which can include several settings to be applied on the created animations.

    I haven't tried it myself, but it should be relatively easy to have Aseprite (or any other program that supports some kind of scripting) to package all the files together in a way C3 will understand.

  • You can open and close all the bars from the main menu.

    Menu -> View -> Bars -> Tilemap bar

  • This happens when you open the latest beta and then go back to using the stable version. The latest betas are adding a little bit of extra information to the Animations editor save state. Older versions don't understand that, and crash when they try to load it.

    Clearing the browser cache works because it allows C3 to start from scratch again.

    Since most of the user base only uses stable versions, most people aren't seeing this problem.

  • This issue has been mentioned before, but we haven't been able to figure out what the problem is. On top of that it doesn't seem to affect a lot of people so it's harder to find out what the problem might be.

    I mentioned Firefox as a workaround, because we are not really sure how to fix this one, mainly because we haven't been able to reproduce it ourselves.

  • Have you tried using a different browser? Firefox would be a good try, as it is completely different from Chrome. Other browsers, like Edge or Opera might run into the same problem as they use the Chromium engine under the hood, which makes them pretty much identical to Chrome.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Do you have any browser extensions installed? If so, you can try disabling them all to see if the problem stops happening.

    If that works, you can try disabling them one at a time to figure out which one is causing problems.

  • Yeah sure, you can send it to diegobts@scirra.com

  • Can you share your example project?

    Maybe there are some performance improvements that can be done on Construct's side.

  • The position of the tiles in the brush tileset is not indicative of what the auto tiling will do. That's just the place each tile needs to have so the algorithm works.

    The tiles are chosen such that the outer region of the drawn tiles always have the "grass" part and any inner part has "water".

    Notice that whenever a tile is placed on the tilemap, all edges of the tile which have an adjacent space which is an empty tile, end up being some form of "grass" while any inner space is "water".

    Ej 1. A single tile with 8 empty tiles around it will always be tile "8". All "grass" in the edges and "water" in the middle.

    Ej 2. A single tile with 8 drawn tiles around it will always be tile "64". All "water" no "grass".

  • Since this was a very simple fix, it will go out in the next beta.

  • Just took a look and the system timescale is applied to the main delta time of the runtime to calculate the playback speed of a timeline.

    The problem with that is the the runtime delta time already has the time scale applied to it by the time it is used by a timeline, so it's using a value that is multiplied twice by the current timescale.