Thndr's Forum Posts

  • After spending quite a few hours trying to work things every which way I've just decided to mimic how AJAX calls are tagged and triggered to ensure I can direct the data where I need to as the asynchronous stuff works fine with condition triggers

  • I currently have this code that sends everything to the console.log just fine, but when it comes back into Construct it always displays the textbox(messagebox) name or C2function name(bothlogs), depending if I'm calling the temp variable or the expression within the C2Function

    	Exps.prototype.getText = function (ret, stuff_)
    	{
    		var varself = this;
    		function.get(stuff_)
    		.then(function(content) {
    			// .replace to remove control characters from the string
    			varself.msgContent = ((content).toString()).replace(/[\x00-\x09\x0B-\x1F\x7F-\x9F]/g, "");
    			console.log("Retrieved: " + varself.msgContent);
    			return varself.msgContent
    		})
    		.then(function(text) {
    			console.log("Returned: " + text);
    			ret.set_string(text);
    		})
    		.catch(function(err) {
    			if(err){
    			varself.dataError = (err).toString();
    			console.log(varself.dataError);
    			}
    			varself.msgContent = ("error " + varself.dataError).toString();
    			ret.set_string(err);
    		});
    
    	};
    [/code:37md67hx]
    [img="https://i.imgur.com/5dtZhH9.png"]
    [img="https://i.imgur.com/623HJcT.png"]
    
    Theoretically it should return with the same thing the console.log functions produce but I can't seem to get it working. I'm assuming it's something to do with it being a promise rather than a linear function.
    
    My goal is to have the plugin.getText() expression be able to immediately get the text, as currently I have it 'working' with an action/triggered condition combo but that's not ideal for directly applying the text it to object instances on demand. If someone could help me
  • In order to solve an issue with selecting an <input> object (button, filechooser, etc.) based off from it's HTML CSS ID I created a simple plugin that would allow me to do so.

    Since I've received some requests for the plugin itself I'll release it here

    https://github.com/Thndr/c2-ChangeCSSID

    All it is, is a function with an Action to find the first instance of a field with the CSS ID of 'oldID_' and then replaces it with 'newID_'

       Acts.prototype.changeID = function (oldID_, newID_)
       {
          var file_ = $("#" + oldID_);
          file_.attr('id', newID_);
       };[/code:27qsytfr]
    
    [img="https://i.imgur.com/KDNavBP.png"]
    
    Due to the timing on how it works you have to have a fake delay/skip 1 step before the function if you are using it on complete.
    I have not tested this plugin when you already have <inputs> and you mass change them, but if you change them when they spawn there should be no conflicts of it attributing the value to the wrong object.
    
    Also make sure the page you embed the project doesn't use the same CSS IDs or there might be an issue as well, as I have no tested that.
    If anyone has a suggestion on how I can target specifically the object's HTML element without needing the old CSS ID then I could remove one line out of the two needed for this function, and it will provide better assurance the wrong element isn't selected.
  • So as a temporary solution I've made another custom plugin that literally does this:

    	Acts.prototype.changeID = function (oldID_, newID_)
    	{
    		var file_ = $("#" + oldID_);
    		file_.attr('id', newID_);
    	};[/code:1jrqi8ut]
    
    In events:
    [img="https://i.imgur.com/KDNavBP.png"]
    
    I made it a plugin because I didn't want to use BrowserExecJS due to potential issues, but I might end up just reverting to it if the custom plugin is just annoying to deal with.
    
    An inelegant work around for now, but I'd be surprised if there was really no way to pass the info I need through normal Construct functions.
  • I have a FileChooser input element on the canvas that I currently use the ID property to select it with a custom plugin. At the moment I'm using a string to manually select that ID and I would like to use an expression within Construct to load the ID of the specific instance I select within the events; however, there is no obvious expressions under the object to do so that I can find.

    Other than manually setting an instance variable to the same name as the ID for each instance manually created is there another way to get that ID or even generate the ID upon the creation of an instance of the FileChooser?

    It's not a big deal since I can manually hard program the fields on each instance if needed or a different work around, but it would be useful if I could set and select them via the event system.

    ----

    If the above is not possible would it be possible to pass the instance's input element to the function itself if I have it targeted in my events? I am currently using $("#ID") to select it but if I could just bypass it all around and retrieve the file's blob(not blobURL) and pass that through then that would elminate the need to even put in IDs for each input as I could just use the event system's instance selection.

    I current use a manual ID string and then have the plugin detect the file using this line

    var file_ = $("#" + fileInputID_);[/code:3vkggff3]
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • https://www.scirra.com/blog/186/construct-3-on-mobile

    This blog post by Ashley links to the chromium blog post on progressive web apps

    https://blog.chromium.org/2017/02/integ ... eeply.html

  • Everade

    https://www.scirra.com/blog/204/the-fut ... -3-runtime

    [quote:1sjze2vz]Enable hosting the runtime in new environments like a Web Worker, or a headless mode in Node

    This sounds like what you want.

  • [quote:xl5d98xe][quote:xl5d98xe]Also just getting "Failed to install addon" even with the base SDK unmodified.

    It works fine here, you can literally rename the SDK download zip from .zip to .c3addon and it installs.

    Yeah my mistake, kept zipping the folder instead of the contents of the folder.

    Also I'm not seeing any errors in Chrome Console when it says it failed even if I'm zipping the contents.

  • https://www.scirra.com/doc/c3sdk/config ... ugins.html

    [quote:1whjod8a]The following constants are defined in the file-level scope:

    const PLUGIN_ID = "MyCustomPlugin";

    const PLUGIN_VERSION = "1.0.0.0";

    const PLUGIN_CATEGORY = "general";

    All three constants must match the values specified in addon.json.

    The Addon.json file doesn't come with a category section, but the plugin.js has one and the documentation states it has to match the other file.

    Also just getting "Failed to install addon" even with the base SDK unmodified.

    [quote:1ei4kesf]A page with Scirra tested benchmarks for each platform(PC/Mac/Linux with PC specs, Android/iOS with model, wrapper vs browser) with a Construct 2/3 version of the exported test file would work wonders in giving people an idea of how relative their current devices are to the test devices.

    We already ship some in Construct 3, in the tech demos section.

    I meant more of a page outside of the program that lists the benchmarks done on Scirra owned testing platforms along with the platform technical details to set expectation levels.

    I've been playing around with it little myself and I like your recent blogpost where you can link to them directly.

    Is there c2 plugin support for in c3? i mainly ask because if there isn't then yes, a export package of some kind or even access to the cloud exporters (or whatever is going on with c3) could be extended to c2 devs who have projects that rely on plugins. I know all of my c2 games do.

    With some minor tweaking they should work fine.

    https://www.scirra.com/blog/193/addons-in-construct-3

    [quote:9jmpqwxy]For addon developers

    Construct 3's addon format is generally similar to Construct 2's. However third-party plugins and behaviors will need to have their editor script (edittime.js) rewritten in to a new format for Construct 3. This basically involves rewriting the action, condition and expression (ACE) tables in to a new format, and moving UI strings to a separate language file to facilitate translation. However the runtime script (runtime.js) should continue work unmodified. There are a small number of runtime features that have changed in Construct 3, but these are usually trivial to update. We'll provide documentation and assistance on the forum around this. We're aiming to have initial documentation on addons ready as early on during the public beta as possible so addon developers can get a head start on porting. Overall it ought to be a quick job to port Construct 2 plugins to Construct 3.

    We're aware some third-party developers sell their addons and might not want them bundled with projects. We will provide a way for addons to opt-out of bundling so they stay in the editor only.

    For the cloud exporters I assume it's just taking the HTML5 export and putting it through a wrapper, thus not requiring any special plugin code for that. If that's the case it also means they could document the process so you could roll your own with the same process they use.

    https://www.scirra.com/blog/187/buildin ... onstruct-3

    However, the blogpost however doesn't specifically state what sort of technology they're using for the cloud based mobile build process. Hopefully they'll have more information on how they're doing this in the future.

    Ashley is there any technical limitations not allowing us to use the C3 build service for C2 projects. In an ideal world you would just upload your c2 export in zip file and building with the c3 build service. Until C3 matured and most major plugins has become available to c3.

    That is their ideal to just import C2 into C3 without issue. With their official plugins/addons I would expect no issues, but for third party plugins/addons you would need for the plugin to be modified

    Construct 2 and Construct 3 export to the same canvas engine and they even advertised taking C2 projects into C3

    https://www.scirra.com/blog/191/saving- ... onstruct-3

    [quote:9jmpqwxy]Importing Construct 2 projects

    As promised, Construct 2 projects import to Construct 3 with high fidelity. Construct 3 has all the same features Construct 2 has, and we've written an importer to read the XML-based Construct 2 project format and load it in Construct 3. This is well-tested, as we've been able to import large, complex Construct 2 projects kindly donated by developers like Aurelien Regard (The Next Penelope) and Daniel West (Airscape). So you can rest assured your project will import correctly. (Note if you use third-party addons, you will need to install Construct 3 versions of the addons before importing.)

    I have asked Ashley to respond directly to my post.

    You seem to be more of a cheerleader trying to run interference so I would ask that you not respond to me until I have heard a response directly from Ashley to my question.

    You reposted the same post and keep saying the same things without addressing any questions when others are asking you to clarify things due to you being ambiguous.

    What is wrong with it being browser based?

    1- Go ahead with C3 as it may at least be useful to people using Mac and Unix even though most C2 users have said they do not want a Chrome browser based subscription engine.

    It's not just Chrome based, as Firefox will be compatible in the near future.

    This issue of yours is two different issues

    1) browser based

    2) subscription

    What's wrong with it being Browser Based? What technical issues are there that you are concerned about? You haven't answered that other than "But chrome updates" which is has an easy solution.

    > I would say that getting this community more involved would be a great start. Conducting direct polls and really having a way for supporters to give feedback.

    >

    This has worked against us in the past. The multiplayer feature was massively voted for, but from the data we look at, very few people actually use it. So the hype effect is a big distorting factor in polls. I don't regret it, it was a super interesting project to work on, but it's something to bear in mind, and is the main reason I have avoided polls since then.

    Having said that, we do have a feature-voting system planned anyway but I am going to strongly caveat it with warnings that "votes are not a guarantee of implementation", for exactly the reason we had with multiplayer. Also I can easily imagine things like 3D becoming #1 voted features, and there are a wide range of reasons why we're holding off on that.

    While I didn't use the multiplayer plugin much it is a very interesting thing to play around with. I would say my only complaint is that you can't connect directly to another player without the signalling server. (Last I tried, unless it's been updated)

    Glad to hear you're planning for a rating/voting system for suggestions. I have some unique ones that Tom might be interested in even if they're low priority

    (IPFS, Ethereum)

    [quote:10ppf3a2]Construct does indeed publish to the platforms that are named but it really isn't clear about the extent of each platform's capabilities.

    Generally, it's as good as the browser engine is. Still I do appreciate prospective customers want to know what will and won't work. I think a lot of products have this problem where they support N platforms but X features only work across Y platforms, and can end up with pretty complicated support matrices. HTML5 is generally a good way to smooth over those gaps, but it's true that we probably ought to do more to highlight possibly problematic platforms which have several missing tickboxes. One problem though is it's really hard to have public messaging around that when you've signed an NDA...

    [quote:10ppf3a2]But the biggest thing is exporters and getting the projects out to the masses.

    Yes, lots on the way here, as announced.

    Can't wait to hear the details. With your bigger staff and the major legwork on Construct 3 done I hope you can tackle the documentation issues with ease.

    No. If they're advertising platform support, that means the features of those platforms should work. Period.

    There's a difference between making them responsible for the wrapper itself and making them responsible for supporting the export process into the wrapper.

    The ecosystem has improved greatly since the start of Construct 2 but not every platform is equal.

    > Okay, wow, now a 17 page thread.

    >

    > I'm not sure what anyone here thinks we should actually do. We've already announced things like our own mobile app build service and new IAP/ad plugins for C3, so that is on the way. We've got Xbox One support just around the corner. Mobile support from what I've seen is pretty solid with WKWebView and Android 5.0+, all supporting JIT-compiled JS and hardware-accelerated WebGL. Maybe we could tweak the way we advertise certain things. Maybe some people have bugs, or unoptimised cases, in which case please file reports, or send me .capxs to profile for performance improvements (as ever, I always ask, and either get sent nothing, or just projects with silly performance-destroying mistakes, hence my skepticism).

    >

    > Do you want us to rebuild the C3 editor? I would go so far as to say that would probably ruin us, and waste a brilliant opportunity. Do you want us to build native engines? I've covered that in this blog with our rationale around that, which nobody ever really directly argues against, there's just vague accusations of how HTML5 is "poorly optimised" or something, which really is not the case given the potency of modern JIT compilers and the native-equivalent performance of WebGL.

    >

    > So what have I missed? What do you think we should actually do differently that isn't something we've already covered? If I can't make sense of any specific complaints or clear suggestions on what to do, then I don't see why we shouldn't just carry on as we are - I think we already have a strong plan for the future.

    >

    I'd like to mention that in less than 48 hours, this post generated 17 pages. Let's you see that you indeed have a passionate community (with various reasons for using construct). I would say that getting this community more involved would be a great start. Conducting direct polls and really having a way for supporters to give feedback. The forums are a good starting point but so many people don't use the forums so it's not always the best thing to use. I know I've lurked the forums for years and haven't really posted much outside of sharing my projects.

    Giving roadmaps that are clear and also make sure the wording in your advertisement doesn't cause confusion or give people false hopes. Construct does indeed publish to the platforms that are named but it really isn't clear about the extent of each platform's capabilities. So build once, publish everywhere can seem very misleading to the consumer Scirra seems to market to (hobbyists, artists, designers, and overall non-coders who have no true knowledge of what's capable).

    The browser IDE seems to be an issue for a lot. There are many posts regarding why. I personally don't see it as an issue as long as I can still make my games without compromise.

    But the biggest thing is exporters and getting the projects out to the masses. Construct is used for a ton of reasons. Some people want to simply learn about game dev and make games to share with their friends. Some just want to fiddle around every now and then. And some want to create commercial games. Each group want and need particular things. For the most part, Construct has the game making portion of it nailed.

    I have been waiting for Construct 3 and have been really putting in faith in what you and Tom says about the future of this technology. I'm not a programmer and I see this company as an entity that cares about creators such as myself who want to make games but don't necessarily care to learn coding.

    I WANT to use construct 3. But I also want to be sure that what I create will be able to be published properly. The entirety of Construct 2 had me frustrated yet still around because of the ease of development. Maybe focus more on the post development stuff. I see that there are support options mentioned for Construct 3 but you have to understand that subscribing would be putting faith into what Scirra says again. It's a hard pill to swallow when a lot of the community has put faith for the past 5+ years.

    Really show us what we're getting into with C3. Be more transparent with the future and upcoming features.

    Thanks for taking the time to hear us out

    +1 this.