oosyrag's Forum Posts

  • If you don't have obstacles, you don't need pathfinding. You can try tween, moveto, or bullet instead.

    If you do need pathfinding for some reason, then more information about your game would be needed to help troubleshoot.

    For starters, use as large a cell size as you can that still works. And make sure you're not finding a path every tick, it should only be done once until needed again.

  • Also note that many commercial RTS games with pathfinding do actually allow overlapping. Broadly speaking, they either use a system of de-collision at given intervals or at the final destination, or they use a steering/flocking algorithm that applies forces to avoid collision.

    Of course preventing overlapping completely is a thing that exists and possible as well, but it often causes issues with pathfinding when traffic happens. There are examples of developers getting this to "work", and then abandoning it later after realizing it causes more problems than otherwise.

  • You do not have permission to view this post

  • dropbox.com/scl/fi/4v2sedjay6c4tcwm278fb/dissolveandburnexample.c3p

    Now with burn layer.

    Pretty happy how the effect itself turned out - you can change the look and feel significantly by adjusting the tween duration and ease, octave setting for the noise, burn texture, timing between the dissolve and burn, noise type, adding some motion/rotation/animation to the burn texture ect.

    Pretty not happy with how many layers it takes and the redundant base sprite and burn/dissolve masks, along with all the associated events. I'm 99% certain it can be refactored but my brain is not cooperating at the moment. I've never been particularly comfortable layering blend modes in Construct but I'm sure there's a more compact way to do this somehow... aiming for a single base sprite with the flame texture and one mask (maybe 2 are needed for this approach).

    Also the burn texture can probably be drawn with some simple noise on the drawing canvas too, instead of using a sprite.

  • construct.net/en/make-games/manuals/construct-3/plugin-reference/nw-js

    See the section in the manual regarding using file paths correctly on the NW.js page.

    It recommends writing to NWjs.UserFolder & "myfile.txt", however I would additionally recommend putting it in a directory unique to your game, as well as saving the file as .json if you'll be saving data in json format. Alternatively, use an obfuscated/unique/encrypted format you are familiar with.

    You want to use the NW.js Write text file action, with your array.asJSON as the content to write. Or whatever else type/format of data you're saving. Dictionary.asJSON works well as well, and is more similar to LocalStorage in terms of keys and values. Save to your dictionary as you normally would have to LocalStorage, with the additional step of writing the dictionary to disk as a file through NW.js when desired.

    To load, you can use the ReadFile() expression (into your load dictionary or load array action). You can get information about the file location with the NW.js action List files along with the UserFolder, ListCount, and ListAt() expressions to confirm and validate the existence of save files.

  • Oh I see. I don't think you can run another executable from your project. That sounds like it would be a huge security issue.

  • Export to NW.js or Windows (WebView2).

    Consider reading the fabulous manual.

    construct.net/en/make-games/manuals/construct-3/overview/publishing-projects

  • Do not mix physics with other movement behaviors.

    If you're using physics, use physics actions to move objects.

  • You can insert the racer's time and id into an array and sort the array.

    Although you wouldn't need to sort at all since it would be in order already if you push to the array (back) as they finish, since they would presumably be finishing in order...

    The position number would simply be the array index + 1

  • Separate out the decimal portion and integer portion. Use zeropad() to add zeros for the decimal portion.

    For any number "n" - set text to int(n) & "." & zeropad(round((n-int(n))*100),2)

    To zeropad to "d" digits instead of 2, it would be int(n) & "." & zeropad(round((n-int(n))*10^d),d)

    int(n) - the whole number portion of n

    n-int(n) - the decimal portion of n

    round((n-int(n))*10^d) - multiplying the decimal portion of n to get a whole number up to d digits, and rounding to get rid of the remaining decimals

    zeropad(n,d) - pad number (n) out to a certain number of digits (d) by adding zeroes in front of the number

  • You do not have permission to view this post

  • Here's the dissolve portion.

    dropbox.com/scl/fi/4xlpja8hk97ttb9lwvlm4/dissolveexample.c3p

    It involves using a noise texture from the advanced random plugin on a drawing canvas, placed above the target sprite on a layer with force own texture enabled, setting the blend mode to destination in, and using an alpha clamp effect with the threshold tweened from 0 to 100%.

    Set the blend mode of the drawing canvas to normal if you need help to visualize what's happening. You can also use the destination out blend mode instead, and tween the alpha clamp threshold from 100 to 0 instead for more or less the same result.

    For the fire part, I imagine you would do exactly the same thing, using the same noise pattern, on a fiery colored texture, but timed so that it starts slightly ahead of the dissolving part.

    The linked effect uses simplex noise instead of perlin noise, but perlin is what we have to work with here in the advanced random plugin, short of importing the simplex algorithm manually or through a JS library.

  • You do not have permission to view this post

  • Use for each, and identify the origin with an instance variable.

    You can set the instance variable by uid of the spawner - when enemy spawn boomerang, set origin to enemy.uid.

    Then for each boomerang, pick enemy by uid, and do whatever movement actions you have on those two instances only.

    Bonus - don't forget to handle what happens if the enemy gets destroyed or is no longer available but the boomerang is still out.

  • Getting the dpi of a(ny) given mobile device reliably isn't currently a thing that exists.

    A user calibration/one time set up may be your best option. Think rhythm games that rely on user input to calibrate audio and visual latency based on the user's device.

    There are sometimes ways to hide it too, like asking the user to "press 'x' to start" when determining which type of controller button mapping tooltips to display, Xbox vs ps.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads