Ashley's Forum Posts

  • If it works in C2, it's accidental and unintentional. File paths are not the same thing as URLs, but depending on the specific circumstances, sometimes a file path is accepted where a URL is expected and vice versa, but this isn't the kind of thing that should be relied on.

  • Sprite's 'Load image' action takes a URL, not a file path. They're not the same thing. You probably should use the NW.js object to read the file in to a Binary Data object, then load the Binary Data object's URL instead.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It looks like the graphics drivers are just too unreliable to support WebGL then. It's not uncommon on Linux, since the drivers are often less well supported than other systems (unfortunately). If you're using open-source drivers, switching to proprietary ones may help, since they are often better quality (understandably, since they are developed by the hardware vendor rather than volunteers trying to reverse-engineer complex hardware!)

  • If images aren't importing correctly please file a bug following all the guidelines.

  • That shows that WebGL appears to be working fine:

    WebGL: Hardware accelerated

    WebGL2: Hardware accelerated

  • Look at the release notes, they cover the recommended options:

    1. Use C3's mobile app build service to build C2 exports.
    2. Use an actively supported third-party build service like PhoneGap Build.
    3. Use the Cordova CLI. This is a free manual build tool that works offline. (This option is more appropriate for advanced users.)
    • Post link icon

    I think your attitude is unnecessarily combative, so I'm closing this thread as per the Forum & Community guidelines.

    I apologise if you took my post the wrong way: my intention is to try to guide you to lessen your frustration - as in the right approach is "don't get angry, get curious" - and secondly help you find a solution quicker. The fact you appear confused about the order things could be happening in, indicated to me that you had not done something that would clearly indicate the order things are happening in. Console logging is a typical way of indicating that, and the samples you had posted did not include that already, which is why I suggested it.

    Further your attitude does come across as generally accusing Construct or its design. There's nothing wrong with that in itself, as Construct is not perfect, there are many cases where backwards compatibility influenced a more unusual design, and so on. However it seems to be the only thing you are focusing on. There are many cases just in this thread you seem to be taking the view "nothing else works like this/it's illogical/this is crazy/do I have to do some pointless workaround". None of that really helps you understand what it is doing, why it's designed to do that, and how to make events that work with Construct, not against it. Everything in Construct generally is designed for some good reason and in many cases actually is analogous to how other programming languages work.

    I empathise that working with difficult technical problems can be frustrating and sometimes it can get to you. However if there was a genuine misunderstanding over my post, firing back with the kind of language you used is certainly a step too far. I post in this forum with a good faith intent to try to help people, and I may sometimes misjudge the kind of advice people need, but I think you should take some time out to cool down, and come back with a more constructive attitude when posting on the forum in future.

  • Which method should I use to secure it?

    This opens up a whole area of digital security. I'd recommend looking for a course covering the basics, because if you don't know what you're doing, you'll probably make something so insecure a passer-by can at least delete everything, or possibly steal all the data - and if you are storing people's personal data, you can become liable for significant fines if that gets leaked and you were negligent in your security measures.

    At a minimum look in to using HTTPS and protecting against injection attacks, but there's a lot more to it than that!

  • I'm confused: in your first post you said it's not working, and in the second post you appear to say it is working. I don't know what to say now.

    I also have to point out: I hope you never run that code on the Internet - it's so insecure it would be trivial for a passer-by to delete or steal the entire database.

    • Post link icon

    I'm not entirely clear from your posts what is actually happening vs. what you expect to happen. It's much easier to share project files so they can be run directly and adjusted if necessary.

    It's normal that if FuncA calls FuncB, then FuncB will complete and return before FuncA does. The exception to this is if you add 'Wait'. It's very similar to using setTimeout in Javascript, and running the rest of the function in the callback to that method. This means that the function returns early with the default return value, all other events run to completion, and then at some point later on the timeout happens and the rest of the code runs. By this point it's too late to return a value from the function: it's already finished. Therefore the return value will be ignored.

    This is, again, normal behavior in computing: as it stands Construct functions are synchronous, but anything involving 'Wait' essentially makes the events asynchronous. In general calling an asynchronous function from a synchronous one will mix up the execution order, as the synchronous function will not wait for the asynchronous one to complete. This is not specific to Construct and is typical of programming in general.

    It's common that people run in to a problem and then they immediately blame Construct. I would discourage you from doing this - not only is it somewhat tiring, it's also not the best way to investigate and diagnose a problem and will probably just send you on a wild goose chase which will only increase your frustration. A better approach is to basically take a debugging approach. For example you could add console logs frequently through the events, with messages like "Starting funcA", "Finishing funcA", "Step1", "Step2" etc. Then you can easily see in the console the specific order that everything ran in. This then helps figure out where things are diverging from what you expect, and helps you hone in on why. Chances are it's working as designed (but remember events are a pretty different paradigm to traditional programming languages, so in some cases the intended design may not be identical to other typical languages). Even if you become convinced it's a bug, you then have a project ideally set up to either share on the forum to ask about why it's working that way, or post to the bug tracker as a project demonstrating what you believe to be a bug.

    On the other hand, if you just keep making random changes to an event sheet, and always want to blame something other than the logic of your events, then yeah, you'll probably have a hard time making progress!

  • The data expression looks wrong. Try displaying it in a text object to see what it's really sending. As it stands if your balance is "abc" and the email is "xyz", it will produce balance=abcemail=xyz. Normally for URL-encoded type data you need an extra & to separate values, e.g. balance=abc&email=xyz

  • Wherever possible, please file bug reports following all the guidelines. In general it's simply impossible to provide any advice or help without all that information.

  • It looks like an optimization warning, not an error. You should be able to ignore it and continue to publish.

    I don't think its suggestion of using an app bundle would provide significant savings anyway - the APKs Construct generates are already widely cross-platform with little overhead.

  • Updated the original post with new downloads based on Chrome 77 (NW.js 0.41.0).

    • Post link icon

    Please don't post duplicate topics, closing.