Fengist's Forum Posts

  • AFAIK there's no way to determine if an app crashed or the user simply closed it normally, ended the task or exited normally. And, the console log doesn't keep a history that I know of, it's created as the app is running.

    If I really wanted to track down a specific cause I'd have a 'hidden' debug mode which sets a boolean to true if the user selects it and stores that as a local variable.

    I'd use the Browser plugin to write various events in my app to the log (if debug is true) to keep track of what the app is doing. I'd use the JS code above to try to constantly capture that log and store it locally as well. The next time the app is run, I'd check to see if the debug is true and if so, either send that entire log off to a server somewhere or have a 'developer' layout where you can pull that previous run log up and examine it.

    Using that basic method, you could at least determine where the app crashed and possibly the cause.

    You could test your app on your phone in developer mode as that post suggests but more than likely, if your app runs fine in preview without errors, any errors generated on your phone are likely going to be a result of that platform's hardware/drivers/etc and not bad code.

    Again, all of these ideas are just theories, nothing I've actually done or tested.

  • ( had to outdo your pascal after all ;) ).

    I love you guys, I really do.

  • In most other languages there are things called exceptions that can be checked for.

    en.wikipedia.org/wiki/Exception_handling

    In some languages, exceptions can be checked for globally so that if the program crashes anywhere, it breaks out of what it's doing and the programmer can decide how to handle the crash, like a bug report. In JS there is the try/catch which can be used on blocks of code to find when things go wrong.

    In Construct there appears to be nothing like this. In most languages

    4÷0

    would cause an exception. In construct, it let's it fly and gives the results as Infinity. This tells me that Construct is likely set up to at least avert crashes caused by the programmers bad code.

    So, as far as I know, there's no way to have your actual app check itself for errors or crashes and report those crashes back to you. My method of debugging is to run in Chrome and hit the F12 to bring up the developer console. I keep watch on it to see if any serious errors are occurring. If my app runs on my hardware, it's able to do everything I want it to do and I see no errors, then I've done all I can.

    As Ashley pointed out, there are so many different hardware and software configurations out there that it's impossible to test for all of them.

    About the closest thing I've found that can help you track down errors is this:

    stackoverflow.com/questions/19846078/how-to-read-from-chromes-console-in-javascript

    I haven't tried this, but supposedly this JS will capture the console log (in Chrome, I don't know about other browsers). You could likely adapt this to store the log locally and send that log back to a web server somewhere where you could review it. Determining whether the app crashed or not is another ball of wax you'd have to solve. Another thing that could give you some insight is the PlatformInfo plugin. The information it provides is pretty limited but you could also have that sent back to a server to at least know what OS the user is running.

  • Let me demonstrate how old school I am. The pseudo code in my op... it's Pascal

    tutorialspoint.com/pascal/pascal_repeat_until_loop.htm

    And yea, the Do While seems to be Java's equivalent.

    The While loop in Pascal seems pretty close to what you described in Rust. In Pascal, the moment the condition becomes true the loop breaks, and I didn't consider that it would work any differently in Construct.

    In my case, I needed to run through an array of 20,000 elements and check for a number of true conditions and make changes which could affect cells already examined in the loop, making them true. I needed to keep checking the array until all conditions were false.

    I don't need them often either which is why I haven't encountered this in Construct before, but when I do need one, there's just no good substitute.

    Thanks guys, I have been educated.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well be damned.

    In every other language the While requires a condition.

    While found=false do begin
     do stuff
    end while
    

    In that case, even a single found=true breaks the while loop.

    Apparently Construct doesn't even require a condition for the while. Never needed one before so that was a bit unexpected.

    Thanks.

  • lol, yea, crashed the editor to the point that I got an Aww Snap trying that stunt. Lost about 4 hours of work.

  • Does the stop loop action work?

    I imagine it would but, both For and Repeat in Construct force you to enter a number of times it should be repeated. Seems like bad coding to add in a for loop to run a million times just to make sure you get the job done when a repeat until a boolean condition exists would work.

    While is totally unsuitable, at least in my coding experience, because the instant 'Found' becomes true, it breaks the loop.

    But yea, thanks for the idea. I guess a million for loop is on the way.

  • Yea, I tested mine as well when the patch first came out and the third test did MUCH better. As soon as 161 gets fixed, I'll load up a comparison, make a note here and update the OP with a link.

  • Pseudo code:

    Repeat
     Found = FALSE
     X=Time mod 10
     if X = 0 then Found = TRUE
    Until Found = True
    
  • I can't even get it to run a blank project.

    Filed a bug report: github.com/Scirra/Construct-3-bugs/issues/3236

    160 doesn't seem to have this problem.

  • Would be interested to see the same project with the new beta Fengist

    Well, if I ever get C3 to work. Now I can't load any project and run it, not even a blank one. Putting in a bug report. Soon as I can I'll post a second version.

  • I think the word ambitious would be an understatement.

    This post reminded me of a time when a friend and I, many years ago, pitted my Commodore Vic-20 with the Sargon chess cartridge against his Chess Challenger.

    https://i.imgur.com/uiIOsL6.jpg

    https://images.computerhistory.org/chess/sensory-chess-challenger.fidelity-electronics.1982.102633899.jpg?w=600

    Both of those machines from the 80's provided some serious challenge to the amatuer chess player (provided you were patient) and I have little doubt that a C3 chess adaptation could easily outperform these old 'computers'. When you consider that Deep Blue was measured in GigaFlops and a modern computer is rated in TeraFlops, there should be plenty of computing power to make a decent AI. However, I doubt anyone has tackled this due to the fact that it wouldn't be a huge money maker and most people today want more instant gratification than a lengthy chess game can provide. But, chess still has a good following.

    That being said, I'd start here:

    chessprogramming.org/Main_Page

    Out of curiosity, I did some digging and was even able to find tons of resources including the logic (and assembler code) used to create the first Sargon. So, if you're serious about this, the methodology is out there. As for templates? You're likely on your own.

  • So, for some people all these little upgrades may be nice, for me they mean nothing so far.

    Nice? While goofing off I found an 'issue' involving lots of sprites. In the very next patch, that issue was drastically improved.

    In all of my 55 years, once... and only ONCE... have I found an issue, made it known and had a dev team release a fix in the next patch. ONCE mind you.

    There's an old joke about plumbers charging too much money.

    The customer asks, "Is the shit out of the tub?"

    The plumber nods his head.

    The customer says, "Here's your money."

    Yea, that's pretty nice.

    Do all companies work like this? Oh hell no. Am I willing to support those that do? Ashley , "Here's your money."

  • Thank you nettemple and Fengist! I greatly appreciate your help in trying to solve this problem. And many thanks for the code samples and examples as that helps a lot!

    I'm working on trying to create the form inside Construct and posting the data to the database via AJAX, as that does indeed seem the only way to do it.

    Thank you again!!

    Glad to help.

    For the record, there is another way this could be done but you seem to be short on time.

    There is a plugin called HTMLElement that allows HTML pages to be brought into Construct, displayed and information exchanged between the HTML and Construct. Incorporating the form is still going to be your quickest and easiest solution as HTMLElement is not terribly intuitive to learn, would require reworking a lot of the HTML on the form to include special codes, reworking the CSS and loading that into Construct and some new PHP scripts.

    If you plan on doing much more work like this, it may be worth your time to learn that plugin as the power it extends to Construct to display HTML is pretty powerful.

    BTW, great looking site and game.

  • Ummm, you can create bro but before you take step watch this video in this video check top 10 ways to come up with game ideas! Video link: youtube.com/watch

    Gud luck for the future.

    Nice video, thanks for posting this. I discovered that my inspirations follow right along with his '10' list. The current inspiration came from playing a game and thinking, I can make this better. Another came from an experiment on these forums which lead to a game jam which led to a game that I think, I can do better.