Chadori's Forum Posts

  • The pros and cons of global vs local applies here.

    Pros

    1. Easy access, especially for libraries.

    Cons

    1. You can easily clutter the global scope.
    2. You can easily make bad practices, in which lead to inefficient code.
    3. Quite messy in the long run.
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for explaining. I understand.

    I think the only ones that are impossible for us to replicate efficiently in JavaScript are Line of Sight and Sine.

    The others can be worked around.

    Thank you.

  • Hi Ashley,

    Will the other behaviors like Line of Sight, Timer, Pin, Tween, Sine, Anchor, Rotate, etc. be included in the future?

    I've moved my current project to mostly use the Scripting API to improve performance on mobile, which it fortunately significantly did, it reduced my CPU usage from +-80% to +-30%, which mostly came from being able to control the picking and loops.

    However, I still have some heavy nested events that use behaviors that do not yet have a scripting interface, the ones mentioned above.

    Will those be included in the future?

    Thank you for your time.

  • Hello again Stweve, I apologize for the delay, I was so busy and only got the time to test it.

    It seems that on iOS 14, there is a new way to implement background audio which is no longer supported in the Mobile Background addon, and needs a new way to get implemented.

  • Release 13.1 - Features Update

    New features update for the Mobile IronSource Collection, a continuation update of Release 13.0.

    Check out the website for more information.

    Thank you!

  • Release 13.0 - Major Stable Update

    New stability update with focus in adding new stable features, addon scripting support and fixing some remaining bugs left in Release 12.1.

    Check out the website for more information.

    Thank you!

  • Thank you for clarifying that Ashley.

    Is it possible you can describe the process on how Event Triggers and Functions are handled? I know they are skipped, which is great, but to what extent?

    I've been experimenting on a new optimization technique I've been doing on an existing mobile project, and I've found that moving all utility functions to JavaScript has dropped my mobile CPU usage from +-60% to +-32%, and removed stuttering janks which I've only recently discovered how to specifically solve.

    Now, I only use the event sheet for every ticks and event listeners, which makes the project feel lightweight.

    However, amazingly, I've found that moving functions to a non-included event sheet does the similar performance improvement.

    I previously mistakenly thought the performance issue was the GPU, since the CPU usage is not that high and I've not seen a way to profile the GPU usage, and lowering the fill-rate was improving the experience so it easily disguised the issue.

    Fortunately, it seems it was just the accumulated event count causing the CPU usage, which is understandable given the limited performance capability of mobile CPUs.

    I would appreciate if you could explain here how the event triggers and functions are skipped, so that we can better understand how we can make better use of the event sheet.

    Thank you!

  • Hi Ashley, I've noticed that Functions can be called even if not included in the current event sheet.

    Does this mean all functions are global, and checked every tick?

    Tagged:

  • FWIW, containers are pretty straightforward: because they always create and destroy together, all instances have the same IID (i.e. the same index in the instance lists), so you should already be able to figure out the container instances fairly easily.

    Oh right, I never thought about that, that's a great tip.

    Thank you!

  • Hi lucid, I've finished adding the scripting interface for Spriter, with complete documentation.

    Kindly review it, thank you!

    I also posted a small suggestion in the repository, kindly also check, thanks!

  • Hi Stweve,

    I haven't tried, but according to the Android and iOS documentation, it should allow it. I'll try to test when I get the chance.

    However, have you tried using the Audio object's Run in background property? It should work the same.

  • Hi Ashley,

    Will there be a Scripting API for containers, to be able to reference them? A sample use-case is setting all containers with an instance variable of the uid of the parent object, upon creation.

    Also, other interactions as well.

    I've tried picking the objects by manual name search (runtime.objects["name"]), however it seems that the container objects are only later created after the "instancecreate" event. So, it's not possible to reference them on creation, unlike events.

    Thanks.

  • Hey lucid, it's @Chadori. Thanks!

  • Hi lucid,

    Is the plugin available on GitHub?

    Is it alright to make a pull request? I would like to add an IScriptInterface for JavaScript users in Construct 3.

    I could update the addon directly, but I think it is better that the additional code is reviewable, to make sure it is up to your standards.

    This feature is important to us mobile developers using Construct 3, since it reduces a lot of event sheet cycling, saving us performance, especially with projects that already have lots of events in the project.

    I hope you could consider it.

    Thank you!

  • That was my first assumption and I always got undefined. But now, I tried again, it worked perfectly, not sure what I did wrong before though.

    Thank you very much!