Nabu's Forum Posts

  • Hello everyone,

    On the Pin Behavior page of the Construct 3 Manual, we can read that Scene Graph is a modern built-in replacement for the Pin Behavior and we are encouraged to use it.

    https://www.construct.net/en/make-games/manuals/construct-3/behavior-reference/pin

    "The scene graph feature is a modern built-in replacement for the Pin behavior. Consider using the Add child action to connect objects together instead of the Pin behavior. This has better support for connecting chains of objects together, and provides conditions that can pick instances across the hierarchy."

    Three questions about this :

    - Will the Scene Graph/Hierarchy will have the possibility to link a child to one of its parent's image point like Pin Behavior do ?

    - Will it also handle Rope Style and Bar Style available with the Pin Behavior ?

    - Will the pin behavior be deprecated after some point Ashley ?

  • dop2000, thank you for the javascript example, that is nice and simple. That corresponds correctly to the topic title, which was inaccurate. Some cases remain uncovered like for weapons attached to a sprite's image point. They must be on top of their parent sprite regardless of their x,y coodinates, becaused they are pinned. So they can't be included into the z-sorting action.

    I found some answers to this topic https://www.construct.net/en/forum/construct-3/general-discussion-7/scene-graph-154671 of users requesting Scene Graph and Hierarchy to support z-ordering.

    TackerTacker : "Something to consider is how z-sorting will work."

    https://www.construct.net/en/forum/construct-3/general-discussion-7/scene-graph-154671#forumPost1020323

    simstratic : "I also tend to think that children should inherit z-order"

    https://www.construct.net/en/forum/construct-3/general-discussion-7/scene-graph-154671/page-3#forumPost1021422

    eleanorjmorel : "Will you also add whether we can Zordering or not, and on top or bottom of the parent?"

    https://www.construct.net/en/forum/construct-3/general-discussion-7/scene-graph-154671/page-4#forumPost1022358

    So this is more about a request to add z-ordering inheritance for Hierarchies or z-order to Pin Behavior. Suggestion => https://construct3-21h2.ideas.aha.io/ideas/C321H2-I-244

  • newt, is there any way to make hierarchy follows z-ordering ? I have a sprite that is part of the zSort family and some objects created at runtime and added to the hierarchy as children. When the sprites are sorted, the z-index of children do not follow. All I have as options is z-elevation which is a different thing.

  • brushfe, do you allow me to take your image to illustrate and clarify the presentation on the suggestion platform post ?

  • Hi everyone,

    I was wondering if there was a way to z-sort multiple object types using the system action "zSort" and benefit from the performance of it instead of relying on loops.

    Currently I have a project with characters that wear weapons, have text object for their names and informations, and visual effects. All these characters are z-sorted by their y position. So to have their respective objects following their z-order, I have to manually move in front or behind everything, which is slower.

    The sorted objects are from different object types and can't be all sorted at once inside a family. Also each of these objects are allways relative to their wearer. That is why I thought of a suggestion to make here https://construct3-21h2.ideas.aha.io/ideas/C321H2-I-244 for adding an option "Pin to Z-Index" to the Pin behavior and make the pinned object maintains its relative Z position according to the object it's pinned to.

    What do you think of it ? Did someone already had to deal with it ? Any solution or workaround ?

  • brushfe, thanks for your image.

    dop2000, of course you're right. I follow you on having the parameters displayed is the inline call.

  • I used to have hundreds of functions for triggering effects, requesting commands and running ai states. These are already in separate events sheets called via includes, with at least 20 functions per sheet. Having functions displayed as a list without each paramaters name would be easier to read through, as parameters mostly only matter when editing the function core, I think.

    I just did a suggestion here : https://construct3-21h2.ideas.aha.io/ideas/C321H2-I-497

  • oosyrag

    Some functions have 4-6 parameters, like creating something at runtime by passing name, x,y coordinates, angle, size, some informations.

    Are you talking about performance or code readability ?

  • Hello,

    It is possible to hide the built-in function parameters from view, to make the function event blocks less heavy on the editor ?

    I used to have lists of functions with the previous function object that was easily manageable with only the function name appearing at the top event.

    Thanks

  • Ashley, sorry to re-use this topic but I still don't find any solution other that staying on chrome 66 (NW.js 0.29) to avoid a memory leak (on all my 4 big projects). By the way, if any other C2 user that encounter the problem can confirm it ? Or am I the only one left with the issue ? Thanks to all.

  • Hello,

    The available demo of Metrocity Escape has been updated to version 3.

    Nouveautés :

    • La démo comporte maintenant 3 niveaux complets
    • De nouveaux véhicules ont été ajouté
    • Des nouveaux effects visuels, sons et musiques
    • Niveau de difficulté légèrement augmenté, les boss ont plus de points de vie
    • Meilleur équilibrage du jeu
    • Quelques bugs corrigés

    The demo is now complete with its 3 levels and the next updates will concern the full game itself. There will be two sequences, the first with 5 levels Shoot'm'up and Runner oriented gameplay, and the second exclusivly Shoot'm'up with 3 levels.

    Come and try the game here Metrocity Escape (Itch.io)

    Your feedback and suggestions are most welcomed. Wish you'll like it !

  • Hello,

    Time has passed since but I'm still stuck on this performance problem related to Chrome and NW.js. The only solution I have found is not playing any sound at all, or use an old version of NW.js.

    Ashley, can I send you one of my project privately for you to test it ? Do you know of other cases like this ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi,

    In your second example, you are iterating through an array twice, so it should take more processing time than doing it once. Also, built in array functions may be less CPU consuming than the editor loop you are using. And it could vary greatly depending of the size of your array.

    So the first example may stick to o(n), while the second may be 2 x o(n) in complexity. First is faster.

  • Hello gabmusic and others,

    Are there any news about this ? I had an issue a year ago that seemed related to yours, with CPU usage increasing (Engine in the Debugger) over time until the game was impossible to play. I reported by replying to this forum https://www.construct.net/en/forum/construct-2/bugs-21/nwjs-audio-memory-leak-135277.

    I did some tests and ended with these results :

    • Problem only appears on chrome since version 66 (so NW.js after 0.29.0)
    • No problem with any other browser
    • CPU usage seems to not increase when no sounds are played

    Very few people encounter these problems but I can see all of my projects affected, though everything was fine before the Chrome update. One year that I'm stuck with exporting via NW.js 0.29.0. Do you experience the same and do you think you issue is related ?

    Cheers

  • Hello everyone,

    I've uploaded the last version for the Metrocity Escape demo on itch.io Here is the list of changes.

    Features :

    • Vehicles can now be unlocked when docked and left at a station, for further play sessions
    • Unlocked vehicles can be selected at game start
    • Several vehicles added, including bikes
    • Vehicles can store multiple items and player can cycle through them
    • Agents standing on a vehicle are now ejected upon collision
    • Shotgun and Rocket Launcher added as personal weapons (available in bonus and at stations
    • Added the possibility to shoot from bikes, with direction based on nearest enemy vehicle
    • New agents graphics
    • Police barrages may appear as events when wanted level in superior to 2
    • Additional control tips added in the menu
    • In game pause added

    Tweaks :

    • Army gunship boss life increased
    • Most vehicles life increased
    • Dragoon laser size and damage increased
    • Missile damage increased

    There are now 55 vehicles in the game. I hope you'll enjoy trying it. Any feedback is most welcomed !

    A downloadable version (Windows 64bits) has been uploaded, it has more stability than the browser version, and unlocked vehicles are kept between game sessions.

    You can try it here : nabu.itch.io/metrocity-escape-prototype