Danwood's Forum Posts

  • I got this js expression that saves a snapshot on my user folder:

    "var fs = require('fs');fs['writeFileSync']('" &replace(NodeWebkit.UserFolder & "screenshot" & ".png","\","\\")& "','" &CanvasSnapshot& "'.split(',')[1], {'encoding': 'base64'});"

    I used NodeWebkit.UserFolder for saving it on my User folder, but i need it to be on the desktop, what should i add to that?

  • Jermfire

    Node Webkit

  • I've noticed it as well, looks like it happens when using 2 differenct conditions, 1 with an ihnstance, and the other global, but i may be wrong. I recommend making a proper bug report so Ashley could look into it better.

  • Is there a way to do it (as title)? I've tried following some tutorials, but the created image seems corrupt. I would like to automatically save the snapshot in a custom folder like desktop/folder

  • I can confirm that the next NW 0.13 will most probably fix the jank, because i had the jank in Chrome 41, and they disappeared on Chrome 43, NW 0.13 is based on Chrome 43! Moreover, NW 0.13 alpha3 is already there, but i can't manage to export/preview the game with it as there is a problem with package.zip file. Hope the full version will solve this issue.

    We made this with C2, and are selling on Steam:

    Subscribe to Construct videos now

    Lego are a toy, but you can create awesome things with them, same with C2. You don't "feel" it is a professional tool, that's your prospective, but feelings dont speak: results speak.

  • I export my game in NW.js for Steam. I need a way to automatically save a snapshot to a specific folder (Desktop/DinoSystem or Documents/DinoSystem).

    I succesfully did something similiar with save dialog using js:

    "var fs = require('fs');fs['writeFileSync']('" &replace(NodeWebkit.ChosenPath,"\","\\")& "','" &CanvasSnapshot& "'.split(',')[1], {'encoding': 'base64'});"

    But now i need it to automatically save the screen in the aforementioned folder! Any hint?

  • Thank you all for the comments. I'm a bit emotional sometimes, but when i look back i see that i was giving too much importance to something that doesn't deserve it, either because he's a troll or lame... what really matters is being productive, creative and delivering as scheduled.

  • The comment felt a bit sarcastic.

    In general I'd recommend not to get too offended by negative comments whether they be on youtube or twitter etc. Either someone will leave constructive negative criticism, which you should take in stride when you are tweaking your game, or someone is just looking to get a rise out of you, in which case you should grow thicker skin!

    Definitely... but you know, i need to practice my written english (for the spoken one i've lost all my hopes )

  • Check the comments. 2 years of hard work, and the guy "unsubscribes because i didn't make the game from scratch", just because i said i used C2.

    Subscribe to Construct videos now

    Do you have this issue too with some people?

  • > It does, i tried. I got hundreds objects, even if i check every 10 seconds, the lag caused by the evet is there. Because i need to put For Each object -> create test sprite -> test sprite overlaps/dont overlap. Basically, it has to repeat the event for every object.

    >

    (Emphasis added)

    Creating a sprite is a far more performance intensive than checking for an overlap! Instead you should just have one instance of a 1x1 sprite which you simply position to the image point, then test for overlap with. If you are just moving around one instance of the "detector" sprite and not constantly creating and destroying them, it should be perfectly performant.

    Awesome! I'm gonna try this

  • I came up with a workaround that seems to work for my case.

    I simply reduce all objects size by a factor of 100, and then make them bigger again just after the check. This reduces the object to a tiny dot, basically, just what i wanted.

    Since i use the self.width /height thing, the process doesnt require For Each, and as far as my testing is right, it is performance-friendly, there is no lag like with the other workarounds.

  • spongehammer

    Nope, here's an example:

    All "Stones" that overlap "Tree" enable a variable, say "Shaded".

    I can simply use:

    Every 10 seconds

    Stone overlaps Tree

    -----------------------> Stone set Shaded to 1

    And that's how it works now, it is very performant indeed, even with hundred stones.

    I just need to know if i can test if the Stone is overlapping Tree at its Origin point, without using for each or creating new sprites.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It does, i tried. I got hundreds objects, even if i check every 10 seconds, the lag caused by the evet is there. Because i need to put For Each object -> create test sprite -> test sprite overlaps/dont overlap. Basically, it has to repeat the event for every object.

    While simply overlapping condition doesn't. I'm wondering if there is a way to avoid for each and just test if the sprite overlaps at the origin point.

  • 2 years of C2, a very complex game in development, and still i can't do this:

    I want an object to test if it is overlapping another object at a specific image point (in this case the Origin). I know i can spawn a test sprite at the image point, i just want to do it in the simpliest and more performance convenient way, is there one?