Mikal's Recent Forum Activity

  • Nice, cool art and effects igalencar .

    With all your cool energy effects, you might want to check out dynamic lighting, perhaps just for your ship? Or are you already doing this?

    I just ported over an effect that might be interesting for you (by porting, I mean I ran blackhornet's conveter and zipped it up ).

  • I've been seeing the same thing, but don't yet have a small *.c3p that I want to upload to reproduce it. I usually fix it by hitting F5 (refresh) and it works. Here's the console output in case it gives an obvious hint:

    [SW-Preview] Up to date
    bootPreview.js:13 Registered service worker on https://preview.construct.net/local/
    runtime.js Failed to load resource: net::ERR_CONNECTION_RESET
    index.html:1 Uncaught (in promise) Event
    Promise rejected (async)
    InitC2 @ previewWindow.js:293
    InitScriptData @ previewWindow.js:228
    OnMessage @ previewWindow.js:31
    OnMessageFromPort @ bootPreview.js:26
    [/code:3brntz59]
  • > Thanks locohost and ASHLEY. I'll wait for r70.

    >

    Sorry I wasn't more helpful <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad">

    No worries locohost , it ended up being the bug Ashley mentioned (the same setup worked with the newer r70.2). Your pointer to node.js, and your server.js were very helpful to get everything up and running. What plugins are you working on?

    As an aside, in my experimenting, I also got this working using node.js

    (install via npm install http-server)

    In dev plugin dir run:

    http-server -S --cors="Access-Control-Allow-Origin: *"[/code:3s0we5bd]
    
    However, it's not as good as your setup, I think it only handles static files, so you need to restart it after you change the addon source files, while you setup handles it dynamically, so I'm going to stick with your setup.
    
    Also an easy source for self-signed certs is: [url=http://www.selfsignedcertificate.com/]http://www.selfsignedcertificate.com/[/url] I would not trust this for other uses, but I'm ok with it on my local PC.
  • Thanks locohost and ASHLEY. I'll wait for r70.

  • Ported over another one of my own C2 examples with working rotating normal maps. Looks pretty good. Glad to have to this available for my new project.

  • Converted normal-map-extended (original forum thread) from matriax to c3.

    So far, seems to work.

    When I copied over the original example *.capx, C3 'compat' complained in the Chrome console that certain parameters could not be set. Interestingly enough (and this is probably a clue Ashley , the parameters that were not set contained non-alpha characters in their IDs, for example: "Light2 Ambient (Green)". After I corrected the parameters that were not copied and ran C2 and C3 side by side, the effect looks the same in each. Obviously experimental, but feel free to try it.

    Thanks to blackhornet for the converter and matriax for the original C2 effect.

    [edit]

    Updated for C2, C3 runtimes and added to addon repo, also now with spotlight effect (see later in the thread.)

    construct.net/en/make-games/addons/194/normalmapextended

    See original thread above for discussion. Also here's a great Construct tutorial on dynamic lighting and normal maps.

    Running in C3:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Great! That seemed to work. Thanks for the help. I'll post a separate thread on the experimental result.

  • justifun

    Just converted in lightspeed ... means 80 times restart C3.. clear cache, rename zip file to .c3addon ... errors somewhere and restart again ... + 3 beers ..

    A Nightmare to converting something for C3.

    So try this if it's same as the original ;

    http://gigatron3k.free.fr/html5/C3/FX/atreshold.c3addon

    Regards

    ...

    Gigatron

    Any general tips / guidance on converting over effects? What do you typically have to change in the *.fx file (I'm looking at the effect SDK and comparing some *.fx before and after, but would be interested if you have general tips. I agree with your comments on the other files, right now they are a bit of a pain to deal with.

    I'm trying to convert over NormalMapExtended

  • You need to specify an output path also.

    I am specifying an output dir (the command line is wrapping above in the code window.)

    Here's another example with a shortened commandline:

    D:\Projects\NormalExtended>C2C3AddonConverter.exe -effect .\OutlineC2 .\Out

    C2C3AddonConverter 1.0.0.13

    Processing: OutlineC2

    Exception: Object reference not set to an instance of an object.

  • 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:298jj1yn]
    

    locohost

    Thanks for this, I'm trying it out with nodemon server.js, but I am getting errors when trying to load the addon. It looks like the server is running (I can get the addon.json file via a general chrome browser request via: https://localhost:49200/plugin/example/addon.json ). I installed self-signed cert/key and updated server.js (otherwise the previous would not work.)

    C3 reports the generic, 'unable to load, go check server, etc.'. Checking the chrome console, this is the error:

    r69-2/main.js:154 Error loading addon JSON:  TypeError: Assignment to constant variable.
        at d.ǃvcY (r69-2/main.js:73)
        at <anonymous>
    ǃG.ǃEA.then.then.catch @ r69-2/main.js:154
    [/code:298jj1yn]
    
    If I put in another bad filename, I see a different error message on console, so I think the file is being server to C3. but then something seems to fail on parsing (I also tried the C3 EffectSDK example and get the same error.)
    
    Any hints?
  • blackhornet

    Trying to use the -effect switch as a start, but I'm getting an error. Just as a test, I am starting with an old version of the Outline.

     Directory of D:\Projects\NormalExtended\OutlineC2
    
    11/27/2017  04:15 PM    <DIR>          .
    11/27/2017  04:15 PM    <DIR>          ..
    11/27/2017  04:15 PM             1,547 outline.fx
    11/27/2017  04:15 PM             2,100 outline.xml
                   2 File(s)          3,647 bytes
                   2 Dir(s)  395,019,923,456 bytes free
    
    D:\Projects\NormalExtended>C2C3AddonConverter.exe -effect d:\Projects\NormalExtended\OutlineC2 d:\Projects\NormalExtended\Out
    C2C3AddonConverter 1.0.0.13
    Processing: OutlineC2
            Exception: Object reference not set to an instance of an object.
    
    D:\Projects\NormalExtended>dir Out
     Volume in drive D is New Volume
     Volume Serial Number is 805A-25C1
    
     Directory of D:\Projects\NormalExtended\Out
    
    11/27/2017  07:59 PM    <DIR>          .
    11/27/2017  07:59 PM    <DIR>          ..
                   0 File(s)              0 bytes
                   2 Dir(s)  395,019,923,456 bytes free
    [/code:3m7q22f0]
    
    I'm trying to convert over [url=https://www.scirra.com/forum/effect-normal-map-extended-1-01-updated-13-jul_t149650]NormalMapExtended[/url]
    
    Originally, since I thought effects conversion were not supported by your converter yet, I starting writing yet another c# hacky helper tool to convert over the most tedious parts of the effect xml (parameter section for addon.json and parameter description section for the en-US.json). I thought I got them working (looks like valid json for both), but C3 crashing after adding the addon (I've been going back to safe mode to uninstall, then install again in normal mode.) I found a couple issues like setting id to lowercase, but then I was stumped. I guess I should go jump into developer mode.
    
    However, seeing that you are now on your way to include effect in your conversion tool, I shall stop and be patient! Thanks for all your work on this.
  • Testing Paster in C3. Jump in the water bunny...

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