Mikal's Recent Forum Activity

  • Ah, learning slowly but surely, this works in preview:

    async function go() {
    	var projUrl = ''
    	projUrl = await c3_runtimeInterface._GetLocalRuntime()._assetManager.LoadProjectFileUrl('j.json')
    	var loadedJson = {}
    	loadedJson = await	c3_runtimeInterface._GetLocalRuntime()._assetManager.FetchJson(projUrl)
    console.log(loadedJson)
    }
    go()
    
  • Ashley

    I'm trying to use the AssetManager, but I still get a CORS error during preview.

    Did I read your below message incorrectly? Does fetching not work at all during preview and AssetManager does not help for fetching during preview?

    I have this in my events (and j.json project file in the project.)

    + System: On start of layout
    -> Run JavaScript: var loadedJson = c3_runtimeInterface._GetLocalRuntime()._assetManager.FetchJson("j.son")
    console.log(loadedJson)
    

    The above fails with a CORS error during preview.

    Thanks for the help.

  • Thanks Ashley, I will take a look at the AssetManger SDK.

  • I am integrating the face-api.js into C3 as a plugin, but I am having an issue with preview. It works fine with the export of game to HMTL5 and hosted (locally or on a remote server.) It also works fine when exported with Electron and run as a desktop app (https://electronforconstruct.armaldio.xyz/).

    The issue occurs when the JS api requests a file via a fetch URI (that's included in the root of the plugin and the root of the exported HTML5.) The error on the Chrome console is:

    Access to fetch at 'https://editor.construct.net/r151/preview/ssd_mobilenetv1_model-weights_manifest.json'
    from origin 'https://preview.construct.net' has been blocked by CORS policy:
     No 'Access-Control-Allow-Origin' header is present on the requested resource.
    If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch
     the resource with CORS disabled.
    

    However, preview fails any suggestions? Is it possible to enable CORS between preview.construct.net and editor.construct.net or is that a security issue for construct.net?

  • If you are only looking for a reflection you could try my reflectY effect.

    construct.net/en/make-games/addons/82/reflecty

    Comes with an example. Place the sprite with the effect higher in z order than anything you want to reflect. Offset parameter must be set based on sprite location. Gradient fade parameter can be set to 0 for no fade.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Includes above example. Creates an Alpha / transparency gradient across an image vertically with a start, stop value and a power to apply to the gradient.

    construct.net/en/make-games/addons/289/gradientalphavertical

    Created using the always excellent c3IDE:

    construct.net/en/forum/construct-3/plugin-sdk-10/c3ide-construct-plugin-ide-141201

  • q3olegka

    You can contact me as MikalDev on the unofficial Construct Discord server, if I have time, I'll take a look.

    Discord invite (5 uses:)

    discord.gg/KBMmmdb

    My general recommendations for Construct 2 to Construct 3 effect conversion is in this post, you can probably fix the effect yourself:

    construct.net/en/forum/construct-3/plugin-sdk-10/dropshadow-effect-ported-c3-142753

  • Ashley thanks for this new feature and the updated docs. A question - do you have a suggested programming pattern on how to deal with possible errors in the response? Previously in my plugins I would have different C3 triggers for success and error conditions. However, now I am thinking that I will need to add if / else clauses and new expressions to check (e.g. plugin.lastRequestSuccess, plugin.lastRequestErr) to determine what to do after the wait has been completed, instead of calling triggers. I'm thinking I don't need to add 'tags' to each request, because the wait will block execution and other trigger calls, but that probably is not correct (e.g. can other triggers be called while wait event is being processed?)

    In general, what design pattern do you suggest for devs working on new plugins and utilizing the async wait SDK, for success and error handling as the result of actions?

  • The iterations parameter reduces the impact on GPU, but changes the look and variety, but through tweaking other parameters, the effect can still look reasonable. Play around with the example in 'C3 Debug Mode' to see GPU usage. It's pretty heavy. If you need very light on GPU, I would suggest using an animated sprite instead (via screen recording flameball effect, or check out this pixel effects pack which you can modify with a very simple effect like the built in C3 color effect.)

    stealthix.itch.io/animated-effects

    Or create your own with:

    codemanu.itch.io/particle-fx-designer

    For general MOG discussion, I found this book series pretty informative:

    amazon.com/Development-Deployment-Multiplayer-Online-Games/dp/3903213055

    The rest of the series is work in progress and early versions are here:

    ithare.com/contents-of-development-and-deployment-of-massively-multiplayer-games-from-social-games-to-mmofps-with-stock-exchanges-in-between

    I imagine this was not the intention, but for me to get access the Timeline object, with the r148 stable, I still needed to go to 'Settings'->'Advanced'->'Enable Experimental Features'.

  • Created 'Copy' effect for C3, dynamically capture screen area, use as sprite texture (for a jumbotron effect in a sports game?) Can do multiple sprites that capture at different points in render order. Addon:

    construct.net/en/make-games/addons/280/copy

    Created with the great c3IDE: construct.net/en/forum/construct-3/plugin-sdk-10/c3ide-construct-plugin-ide-141201

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