Mikal's Recent Forum Activity

  • Is there an SDK method to update a Sprite animation frame with a new image (from a blob, data URI, JS array, etc.)

    I am looking for alternatives/workarounds to a current stuttering issue seen when using the Sprite Action Load Image from URL.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Checking in on this, it would be useful to add this. Ashley?

  • I'm working with an animation runtime which is rendering via webgl to a separate canvas.

    I want to use the result of the render as the image for a Sprite in C3. I would like to change the image for the Sprite on every frame (to show the animation.)

    I am using the Sprite Load Image from URL action (using a blob URI or a data URI that has been captured from the separate canvas) to set the image of the Sprite.

    It's working pretty well, except for a stutter I get every few seconds. Tracking it down, it _looks_ like it's due to v8 running 'Major GC' and pausing the rest of execution for a while. Is there something in the Sprite Load Image from URL action that would cause 'Major GC' to kick off every few seconds?

    I have created a simplified test case which shows the issue (in this case I created a JSON object of data URIs instead of capturing another canvas and using the animation runtime, to help isolate the issue to just the Sprite Load Image from URL action.)

    Looking at the perf graphs, a big system task is kicking in, then 'Major GC' starts.

    I thought I would start here for discussion, but if needed, I can also file a bug report.

    Example Project:

    LoadSpriteURLTest.c3p

    I am also very open to other ways to do a load of the sprite texture each frame if that would work better (within the JS C3 SDK or other C3 actions, etc.)

  • Really nice work, I have been playing with using a pathfinding library (Easystar) and have found that at about pathfinding actors it starts to slow down a bit. This looks really nice going up to a higher actor count and with more interesting behavior. Looking forward to see more of your work on this.

  • Ah, that would be difficult then. Also for this module to work, you need to get the raw audio in a buffer, which I am not sure how to do from the C3 Game Recorder (except something like loading and decoding the recorded webm file which seems like a pain also.)

  • I think this is for a download application vs web app (right?). So - you may be able to use npm modules if you export (and there are other ways if it is for web.)

    If that's the case you may look at this:

    npmjs.com/package/audiobuffer-to-wav

    You would then add an appropriate JS or plugin to call it (after loading your locally recorded file, getting it from a buffer, etc.)

  • Try assigning it to another local variable within the function declared static. However, this could have issues with multiple calls to the same function within the 1s, where the variable could get reassigned while the wait is active and could be tough to debug. Perhaps look at using a timer (with tags) assigned to an object instead, and use the function to start the timer and the timer end trigger to do the next action(s).

    construct.net/en/make-games/manuals/construct-3/behavior-reference/timer

  • Updated project file.

    • Fixed a bug in Player UI (would impact tilemaps that do not have square tiles.)
    • Updated Easystar plugin bundled in project to handle 'disable diagonals', I also asked Eren on their github to fix the posted C3 version.
  • One quick thing to check: c2runtime vs c3runtime.

    The example projects may be c2runtime. Your new project may be c3runtime. Some of the 3rd party addons may only support c2runtime.

    You can change your new project to c2runtime to see if this is true (in the C3 editor.)

    If true and you need new c3 runtime features, you can ask devs or the C3 community to port the c2runtime addon.

    construct.net/en/make-games/manuals/construct-3/tips-and-guides/the-c3-runtime

  • Not really Isometric, actually Military Projection. Inspired by PsychicToaster's work for their game, which will be great (watch for it.)

    Demo Project

    • Military Projection
    • Easystar tilemap pathfinding (w/ dynamic tilemap/path load on floor change.)
    • NPC AI using pathfinding also.
    • Z sort done with Y compare point and setting Z elevation to small fractional value.
    • Static objects only sort once at start for layout.
    • Dynamic objects (Player/NPC) sort every tick.

    IsoEasyStarGBAV3.c3p

    construct.net/en/forum/extending-construct-2/addons-29/behavior-easystar-js-96215 by Magistross and ported to C3 by Eren

  • Looks good, I want to see the drones in action. Do they circle the tank or do they have more intelligent behavior?

  • I also just used this tilemap behavior and it worked well (there's a C3 version at the end of the thread.)

    construct.net/en/forum/extending-construct-2/addons-29/behavior-easystar-js-96215

    It has some additional features for pathfinding (directional conditions) and is also fast. However, it does not have actions for movement, which you must do separately (e.g. using a MoveTo plugin.)

Mikal's avatar

Mikal

Early Adopter

Member since 22 Apr, 2016

Twitter
Mikal has 103 followers

Trophy Case

  • 8-Year Club
  • Entrepreneur Sold something in the asset store
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Popular Game One of your games has over 1,000 players
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • x10
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

19/44
How to earn trophies