Je Fawk's Forum Posts

  • The pick children could have a different behavior. I haven’t tried using that yet though. Anytime there’s events surrounding creating objects this sort of thing comes up one way or another. A bug report could be valid since there was more complexity added for the children feature.

    Most of the events I write work around when new objects can be picked. It is a rough aspect of the system. The picking system works great when all the objects already are created. It also works well when all you’re doing is modifying some object just created. Beyond that I tend to try a two pass method like create all the objects I need in one event then in a second event pick things again. The wait 0 can work but it makes it harder for me since I often require things to be done in a certain order.

    At one brief point the new objects were added to the object list once created. However that was changed to fix cases where infinite loops were being caused with some events. It’s an interesting design process to try to come up with a different way to handle the picking in a robust reliable way, but I know I haven’t come up with anything I’ve liked. Overall I’ve found the event system to be more complex and nuanced over time so I try to use a simple subset of it that I know the precise behavior of.

    Thank you very much for the detailed reply. Very interesting to hear your take on this. Sounds similar to coding nodejs apps actually, where newer js "eye candy" can cause performance issues.

    Regarding Construct, at some point I started creating my objects outside the layout, very far -10000, -10000. I added the Waits required, or used very short timers, and then once everything was initialized I moved them to the proper position.

    It was quite a hassle however to take care that everything finished initializing and there was a lot of back and forth checking and assigning "IsInitialized" variables.

    This was the most stable way for me for a while to do things.

  • Related to this bug I've reported, which is shows much simpler code: github.com/Scirra/Construct-bugs/issues/7184

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • As kindly answered:

    "I cannot reproduce it, works for me either way

    wait, no it's weird for me as well

    seems like pick children only works for newly created instances if that instance is specifically picked in that event

    so it doesn't seem to be part of the picked instance if you don't reference any instance of that object type

    for example this event works with copy picked or as a custom action as well without a wait 0"

  • The why has to do with when new objects are pickable. Basically new objects aren’t added to the list of objects till an event ends and the next event is a top level event. A top level event just means it’s not a sub event of another event, but it can be in a group. Search for “top level event” for other attempts to describe this behavior.

    Wait 0 will delay things being run till the end of the event sheet so the new objects will be added to the object list by then.

    Now pick by uid is a special case. If you created an object you can pick it at any point.

    Thank you for the detailed explanation.

    The top level event doesn't seem to apply here, unless I misunderstand it, in which case please correct me.

    I just use the same blocks:

    1. one in a function where I pass the UID beforehand by going through all the children of type Tattoo, and that works.

    2. one in a function where inside the function I go through all the children of type Tattoo, missing out on the UID, and that doesn't work.

    So when the UID is passed, somehow... it works, and the object is picked beforehand in the loop of that function call.

    Sorry if I don't understand still, it seems like code in one place works, but in another, it doesn't.

  • EDIT: wait sorry, I may have misunderstood your original issue. I tend to use "wait 0" often and tends to behave correctly. I never risk a newly created object without using "wait 0", but perhaps there are specific times where this is OK. When is the 2nd function without a UID parameter called? If there's multiple of that one object, and no UID is specified, perhaps C3 is picking whatever first instance of that object that exists, then picking it's children and such.

    EDIT 2: oh wait, I just understood the colour-coded purple shows the 2nd function being called. From what I understand, if the 2nd function doesn't have "copy picked" or a UID to pass, then the 2nd function effectively "doesn't know" which instance to pick, so I guess unexpected behaviour happens. I'd always pass a UID just to be crystal clear for C3 to know which instance to pick (or copy picked if that works after a "wait 0").

    I always use "wait 0" on a "on created" event. Like every object that gets created, I have an "initialise" function or custom action for that object, but it seems that "wait 0" is always needed before calling the function.

    I think it's related to the whole "objects don't necessarily exist until the bottom of the event sheet/next tick" or something similar to this, so a "wait 0" solves this.

    Doesn't seem to cause issues as far as I am aware, even if multiple objects are created on the same tick and such. But yeah, hmm.

    Yes, sorry about the coloring, Photoshop tricked me to add the same color to the text in both places, making it a bit more confusing.

    Thank you for your reply. I run into this issue a lot, and I try to avoid using Wait 0 because it causes assets to flicker (eg.: i create the body, and then wait 0, and then the eyes—you will notice how the eyes get created slightly later; or if I need to replace something, again using Wait 0 will cause a flicker.)

    I think it's related to the whole "objects don't necessarily exist until the bottom of the event sheet/next tick" or something similar to this, so a "wait 0" solves this.

    Yes but you see, one function picks it in the same tick, the other doesn't.

  • If you are referring to sprite creation why have you blurred out the important events? When you create an instance yes you need to wait until next tick for it to be available.

    The blurred events aren't important. Wait 0 is not needed, as I explained in my post.

  • I'm trying to understand some complex (and to me, kinda random) issues I constantly run into.

    For example in this code, I was aware that sending the UID, on a sprite creation, can avoid using Wait 0.

    But WHY?

    It's like sending the UID makes the function wait, until that UID is available or something.

    Any clues?

    Tagged:

  • I've used this before but only for fun, lol. In serious use cases, it shouldn't cause any issues during runtime and should work like any other character.

    My only potential issue for not using this is because of the writing and searching process, and that's all. I search emojis on Google and it takes more time writing emojis since I use a desktop keyboard (even with Windows emoji), which I think is a different case if I used a smartphone's virtual keyboard. Writing 🔫 takes more steps than typing weapon, you see.

    Furthermore, since it's a picture that 'could' show differently depending on the device or platform, there's a chance it's a different emoji than what you could've expected, for example: inconsistencies in used emojis. It could lead to an organization issue.

    Nevertheless, I see the benefits of this, especially with guides. Emojis shouldn't cause any issues with JavaScript and other languages, hence Construct 3 shouldn't either, even advanced minification shouldn't have any issues with this.

    Thank you for the info, especially since I know you're very much aware of how C3 works.

    I'm on mac so I press one key and the emoji window appears, really fast. On Windows it's Window Key + dot (.) but unsure how it works with virtual keyboard...

    Inconsistencies are a problem indeed since I work on Windows sometimes.

  • This is a neat idea! You can definitely try it (make a backup copy of the project first). And if you notice any issues, simply remove the emojis.

    Thank you. I could have done it obviously, but I figured to ask on the forums, maybe there are people that attempted such weird thing and could teach me a thing or two (such as, maybe C3 doesn't open the project anymore, maybe the export is broken, can't revert a git branch or something)

    It's pretty hard to "simply" remove them in my current project

  • This might sound silly, but it helps me organize and spot the event names much faster—in the project window, and as tabs.

    There's only so many colors I can use to distinguish. I'd love to use something like this

    🔈 Audio

    For my event sheet, but I'm afraid it will break somewhere, either in C3 editor, at export, or when pushing to git.

    Anyone with experience on this matter?

  • Think of opacity or alpha as a color. Changing the alpha value is like changing the red or the blue or the green value. The alpha value being 0 or 80 makes no difference to your GPU. The visiblity toggle on the other hand fully disables rendering of an object.

    I understand, this makes sense, thank you.

  • I ran some tests to figure out what affects the gpu fill rate. I noticed that 0% opacity sprites use GPU fill rate, but setting them invisible does not.

    Is there any reason for this?

    Is it because 0% opacity can be used as masks with some webgl effect? (but that would turn the layer to render it's own texture, so it could be solved)

    Tagged:

  • I've been having issues with Chromium for a few months now. Both Chrome and Edge run like hot garbage. Firefox is so much better but has UI glitches.

  • The feature to cap max FPS is very much needed. I've been running into issues for years now because of this, always having to resort to some trick, workaround, or completely remake a whole system.

  • Alright but what browsers DO support encoding to MP4?

    So Chrome, Edge, and Firefox do not.

    I tried with Safari and no luck either.