Danwood's Forum Posts

  • Glad to see there is a way to prevent it! However, I'm stuck here:

    4. Set an ID for the form element(s) where you want to prevent middle clicking

    I didn't even know there is a way to assign an ID to whole categories of objects, how can i do it?

  • Could you provide more details please, maybe screenshots?

    Also please note that I only tested this using NWjs, the result of this script may vary using other browsers.

    EDIT: Never mind I know what you mean now, I thought there were problems with the script.

    To be honest I have no clue how to prevent that icon from appearing, there might be a way to block the button itself.

    I'll ask this question to some experienced JS devs, they might find an easy solution for you soon.

    Thank you! I tried to take a screenshot but as i press any button the icon disappears. It's problematic not for the icon itself, but the fact it makes it difficult to properly use the middle mouse button.

  • I know that this bug report is closed, however for people that stumble upon this post for a fix here you go:

    1. Add the "browser" plugin to your project

    2. Add an event "on start of layout" (you might have to use it on a globally included eventsheet)

    3. Add the browser action "execute Javascript" and use the code from below

    4. All right click actions should be blocked from now on

    Code:

    "document.addEventListener('contextmenu', function(e){e.preventDefault();}, false);"[/code:2jz76is9]
    

    There is a similiar thing happening when middle-mouse clicking: it appears a scrolling icon and the some key actions are prevented unless i remove it. Is there a way to disable it too?

  • I know that this bug report is closed, however for people that stumble upon this post for a fix here you go:

    1. Add the "browser" plugin to your project

    2. Add an event "on start of layout" (you might have to use it on a globally included eventsheet)

    3. Add the browser action "execute Javascript" and use the code from below

    4. All right click actions should be blocked from now on

    Code:

    "document.addEventListener('contextmenu', function(e){e.preventDefault();}, false);"[/code:3cyxe9vu]
    

    Thank you so much!! It won't happen anymore

  • Danwood I see that occuring as well on preview in the opera browser, might worth investigating

    I wonder if there's a way to fix it myself, or if we need to wait for a future NW update <img src="{SMILIES_PATH}/icon_rolleyes.gif" alt=":roll:" title="Rolling Eyes">

    UPDATE: seems like nightly build today fixed it! (and that's why i always update <img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz">)

    https://dl.nwjs.io/live-build/10-20-201 ... 6/v0.18.1/

  • I've also noticed there is a chrome menu appearing when right clicking on a button!

  • Just a quick update, it turns out NW.js 0.18 had a bug which broke Construct 2 games. It's already been fixed though and apparently there will be an 0.18.1 release tomorrow. Assuming that works, we'll have a NW.js update out then.

    That would also explain why you couldn't get 0.18 to work!

    Thank you Ashley! That's a relief

  • It strongly depends on the game you're making: our game took over 2 years, being a survival game on top of a complex ecosystem simulator. With C2 you can make large games as well, if you know how to organize your workflow and optimize, and definitely if you know how to use the C2 event system.

  • We should have an official installer out shortly for NW.js 0.18. I think updating from the direct download is easy to make a small mistake and break it!

    Great!

  • lol, I'm so used to directly update from the nw site that forgot about it

  • I've installed the new stable NW.Js v0.18.0 (http://nwjs.io/downloads/), and my game doesn't preview (perpetual white loading window). Do you happen to have the same problem?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • To be honest I personally have no idea on how I could approach this. My game is based on the concept of an old GBA game, meaning that there are units off-screen that fight each other and I have no clue on how I could destroy them and keep the illusion of them fighting off-screen.

    I got a similiar game here. You can only work on the object that do not interact / fight while offscreen. You can use arrays to keep track of objects variables/position etc, and destroy/recreate them depending on their position/distance from the scrollx/y. Of course, this could be a double edged sword, as the performance impact of the creation/destruction (which should never happen every tick) could exceed the benefict of the reduced object number.

  • My game can only use solution 3, as it is a big game world with an emergent "ecology". Solution 1 is doable in theory, but the amount of layers is too high to use it, as many objects use their own layers also to trigger events and so on.

    There are some "persistent" objects which are destroyed / recreated based on camera position (happens on a timer, i carefully tested the trade-offs).

    All in all, if you know how to use timers and don't exceed with webgl effects, the main issue is number of objects, as we all know...

  • I made my own group watcher in the events, lol

  • Wow, why didn't i find it, i've searched for hours for an expression xD ty!