locohost's Recent Forum Activity

  • I'm getting this error :

    "Failed to execute 'texImage2D' on 'WebGL2RenderingContext': The cross-origin image at https://firebasestorage.googleapis.com/ ... 34acd970e7 may not be loaded."

    And as you pointed out, the image is correctly loaded with GET but an exception get thrown anyway when you try to display it with the sprite.

    Are you using Firefox or Chrome? Console should show same info regardless, but thought I'd ask.

  • I'm getting this error :

    "Failed to execute 'texImage2D' on 'WebGL2RenderingContext': The cross-origin image at https://firebasestorage.googleapis.com/ ... 34acd970e7 may not be loaded."

    And as you pointed out, the image is correctly loaded with GET but an exception get thrown anyway when you try to display it with the sprite.

    Where do you see this? My FF console does not show this. I still think this is bug. C3 is retrieving the image, by url, from Firebase Storage. We can clearly see that happening. C3 simply refuses to set the sprite image.

  • Look inside the console and check if any error could be keeping you from loading your image by URL.

    Thanks for replying Magistross! Yeah I wish there was an error in the console. Not only is the console 100% error free, you can actually see that C3 IS loading the image from Firebase Storage.

    Here is a pic of my network tab. Note the 200 jpeg fetch near bottom...

    https://firebasestorage.googleapis.com/v0/b/pic-quiz-puzzle-game/o/C3%20Loads%20Image%20But%20Wont%20Set%20Sprite%20Url.PNG?alt=media&token=cce5e1b4-df54-4868-978f-328140eb6f08

    So C3 gets the image, it just refuses to set the Sprite image. I'm thinking this one is a bug.

    NOTE: When I put the image in my localhost plugin dev server, in static content, then load that in C3 code, it works fine. So it must be something about the url it's choking on. Maybe? I'd love to find out soon

  • I have a very simple onLoad event that sets a Sprite instance image using "load from url". It works great if the image is hosted on localhost server, but doesn't work at all if the image is hosted in Firebase Storage. I can paste the url in Firefox or Chrome and the image loads fine. Just doesn't work in C3 code.

    Is anyone using any hosted file storage and has this working? I'm not sure what I can do to fix.

    Here is the url I'm trying. Click this and LMK if you see my handsome face...

    https://firebasestorage.googleapis.com/v0/b/pic-quiz-puzzle-game/o/profile_50.jpg?alt=media&token=510f44e4-0df3-4ba2-83d2-3b34acd970e7

  • rexrainbow Dude... Please consider being more helpful to those of us simply trying to learn. Kidding of course Thank you, thank you, thank you!!!!

  • rexrainbow Thank you! I'm reading the posts. One note: Your "download my plugins" only works if we're using Construct 2. Your downloader needs to find the C2 folder to work. I'm on C3 right now so I can't view your code.

  • I imagine this can be done but so far I can't find an example. From within a custom plugin, can we call a built-in plugin, other custom plugins and/or other external code? Specifically, I want to "pick" a Sprite by ID/UID from within a custom plugin and I'm not sure how to do that. Can someone link to an example(s)? Thank you!

  • Ok, that's very interesting. I'll definitely check that out. Thanks for posting!

  • Looks like everyone, including me starts out trying to build C3 addons in the same sequence in which the manual reads. This is definitely NOT the way to start C3 addon development. The C3 SDK manual is upside-down. You MUST first setup a local plugin server, go through the process of getting that working. Then you MUST develop your plugins in "developer mode" per the manual. After you get your plugin loading and working in developer mode, you can say "it's working" and then do the normal .zip/.c3addon import into C3. DO NOT keep trying to import any custom plugin with even one single bug! In addition to no debugging info in the console, you will also lock up C3 editor addon mamanger and object import dialogs. Sometimes you will lock the main addon loading screen.

    Get your local plugin dev server working FIRST and dev that way.

    Here is my working C3 plugin server. If you don't know Node/Express, Google and you'll find a million articles and tutorials. Very easy to install. Below is a link to the zip of the c3-plugin-server app folder. Make sure you run your command window as admin. Unzip the app. Then run npm install to update/install all the packages you need. There are helpful comments in server.js. nodemon server.js will start the plugin server. Node provides good error messages on install. If you see any you should be able to fix.

    https://drive.google.com/file/d/0B2LbtzyJ6MqNWHZnVDhfR2o1SFk/view?usp=sharing

    const https = require('https');
    const fs = require('fs');
    const path = require('path');
    const express = require('express');
    const cors = require('cors');
    
    const corsOptions = {
    	origin: 'https://editor.construct.net'
    };
    
    // You will need to use openssl or some Windows app
    // to generate your own self-signed cert files. C3 
    // developer mode plugin loading will NOT work in Http 
    // mode. Plugin server must be Https
    const serverOptions = {
    	key: fs.readFileSync('./key-20171101-071835.pem'),
    	cert: fs.readFileSync('./cert-20171101-071835.crt'),
    	requestCert: false,
    	rejectUnauthorized: true
    };
    
    const app = express();
    app.use(cors(corsOptions));
    // Put testing and non-plugin static content in this folder
    app.use('/static', express.static(path.join(__dirname, 'static')));
    
    // Put all plugin related code and static content in this folder
    // Put each plugin in its own folder like: /plugin/mytestplugin1/
    // In C3 addon manager, in developer mode, load plugin like... 
    // 	  https://localhost:49200/plugin/mytestplugin1/addon.json
    app.use('/plugin', express.static(path.join(__dirname, 'plugin')));
    
    const port = process.env.PORT || 49200;
    https.createServer(serverOptions, app).listen(port, function () {
    	console.log('Construct 3 plugin server running. Listening on port: ' + port);
    });
    [/code:1e9e5l0a]
  • The code doesn't go in any of those. If you look at the sample, it goes in c2runtime/runtime.js

    Yes I saw that late yesterday. You would think something as important as the main code file, the file where your custom code goes, would be mentioned quite a few times in the C3 AddOn SDK manual right? The "addon example" is barely even a code skeleton. There needs to be more real code examples in the manual.

    Look I get it. I'm an IT Consultant and .Net developer by trade. Been doing it for over 16 years. None of us wants to write manuals or any support docs. We just want to code. But C3 is a new commercial product for sale. You must have very good documentation if you want lots of paying customers. Poor docs sends your customers off to competitors with clear, detailed docs. Hire a non-technical professional writer. That's what we do most projects.

    And for the record, yes, I think C2/3 has some pretty decent docs and tutorials for the most part. Just some holes here and there that need filled in

  • Sadly the SDK manual does not ever mention where in the 3 main files, instance.js, plugin.js, and type.js, we should put all of our code. They each define JS classes so they can all hold custom methods. I can make a wild guess and say put custom code in methods inside instance.js class because it has the OnCreated and OnPropChange hooks. Is this right? SDK manual needs some more work I think :-/ At the very least it needs waaaay more example code.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The index is on the left of the page: Home, Guide, Reference.

    Uuugh, I'm blind. Thank you blackhornet

locohost's avatar

locohost

Member since 19 Sep, 2014

None one is following locohost yet!

Trophy Case

  • 10-Year Club
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

14/44
How to earn trophies