Fengist's Recent Forum Activity

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • Not sustainable? Bill Gates and Steve Ballmer made their money before all this rental bullshit and they are worth about $160,000,000,000 And that's just the top 2 guys.

    Correct. And how many versions of Windows and DOS have we had to purchase? I started on PC's with DOS 3.0. The MS guys also had something that Scirra doesn't, a virtual monopoly on OS's that started with IBM. Scirra is facing a market saturated with programming IDE's.

    The problem with the one-off model in a saturated market is that you have to WAIT for someone to WANT your product in order to make money off of it. In my occupation it's called the "break-fix" model. I have to wait for you to break it before I can fix it and charge you gobs of money doing so. The HUGE problem with that is, I never know if I'm going to be able to feed my self next week because I have no steady, consistent income. IF you have a monopoly on your product and do great marketing like DOS and Windows then yea, you'll make gobs of money just like they did. IF you're in a competitive market and you product or service isn't the only one out there, you have no idea if your business will be open next week or if you'll be sleeping in the gutter. That's ESPECIALLY true if you're a small indy company working in a garage (gee, I think Bill and Steve did that) with no financial backing.

    I for one have no problem with the subscription model. Ashley and Tom gain the confidence that their business is stable enough that they can hire more employees to give an even better product and even better service.

    A few years ago when I first purchased C2, you rarely saw any Scirra member on the forum. I'd post an issue and never get an official response. Now? I see them on here daily solving problems for their customers. THAT's the difference I'm willing to invest in.

  • Switching to c3 can be a solution for some users, for others this is not an option, c3 is a service with quite limited payment options, it is not a product like c2.

    For the same reason you can't buy Microsoft Office as an installable product any more. You have to 'rent' Office 365. It's not a long-term, sustainable method of income. I still see customers come into my computer repair shop running Office 2007. That's 12 years of using a product that needs to pay employees to keep it fixed and updated while making only one payment. The cost of maintaining such software over the long-haul exceeds the income of a one-time payment system.

    Get used to it. Windows as a service is coming.

  • Oh... I see what you're trying to do. You're trying to pass POST parameters to a URL AND open that page in the browser so that you can add the scores and player info.

    I don't even know if that's possible. You may be able to do that by opening the page in an IFrame inside the game but I've never attempted to pass a query that way.

    My initial thoughts would be to incorporate the save_score.php form into the Construct project and then pass the data from that form to a php that adds the data to the MySQL database via Ajax and either returns a success or failure.

  • OK This is a working version:

    Suggestion. Either use real_escape_string before doing a query

    php.net/manual/en/mysqli.real-escape-string.php

    or use the PHP prepare:

    php.net/manual/en/mysqli.prepare.php

    I realize this was just a basic example but it's a good habit to present even when demonstrating the basics.

  • Ajax is your only real option for working with PHP. The Browser go to url is designed to open web pages, not pass query strings with Get or Post.

    Go to URL

    "Navigate to a given URL. Note this uses the same window/tab as is showing the HTML5 game, so this action will end the game. The Target can be used to select which frame to redirect, which is only useful if the game is displayed within a frame (e.g. an iframe embed), and the frame has permission to redirect the parent "

    Here's the basic PHP CORS header that I use. It attempts to get a HTTP_ORIGIN from several possible sources. It then compares that origin to two URI's I have plugged in and accepts incoming AJAX requests from them (the host website and the preview editor). I modify this to whatever use I need and then 'include' it in any PHP files I'm making for the current project.

    A lot of people will simply put in:

    header("Access-Control-Allow-Origin: *");

    which allows anyone and everyone to access the php file. Since this is for a game and people will find ways to cheat/hack, this solution keeps that under control while allowing it to be expandable to more than one requester.

    The Allow-Methods describe what the AJAX requester can or cannot do. In my example, they can GET. You can find other options here:

    developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Methods

    Another thing it does is creates a small txt file in the same directory with the URI of the last request that came in. That way, you can test it from different sources and see what the origin is.

    error_reporting(-1); // reports all errors
    ini_set("display_errors", "1"); // shows all errors
    ini_set("log_errors", 1);
    ini_set("error_log", "php-error.log");
    
    $http_origin = NULL;
    if (array_key_exists('HTTP_ORIGIN', $_SERVER)) {
     $http_origin = $_SERVER['HTTP_ORIGIN'];
    } else if (array_key_exists('HTTP_REFERER', $_SERVER)) {
     $http_origin = $_SERVER['HTTP_REFERER'];
    } else {
     $http_origin = $_SERVER['REMOTE_ADDR'];
    }
    
    $myfile = fopen("origin.txt", "w") or die("Unable to open file!");
    $txt = $http_origin;
    fwrite($myfile, $txt);
    fclose($myfile);
    
    //No origin found, die gracefully
    if (!isset($http_origin)) {
     die();
    }
    
    if ($http_origin == "https://preview.construct.net" || $http_origin == "https://www.mywebsite.com") {
     header("Access-Control-Allow-Origin: $http_origin");
     header('Access-Control-Allow-Methods: "GET"');
    }
    

    One of the handiest things you can do when working with AJAX is to run in debug mode and keep watch on the Ajax.lastdata. That will show you the last information sent back by the website you're making requests to.

    Ajax and CORS is designed to limit who has access to the PHP file. If you're going to be transferring data via GET or POST, and then stuffing it into MySQL, which is very susceptible to injection and cross site scripting, you really want to know and limit who's accessing that PHP file.

    A quote to live by:

    "Writing software is easy. Making it idiot proof is nearly impossible."

  • It's either giving that or a 500 error.

Fengist's avatar

Fengist

Member since 6 Nov, 2015

Twitter
Fengist has 5 followers

Trophy Case

  • 9-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • x3
    Coach One of your tutorials has over 1,000 readers
  • x2
    Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

16/44
How to earn trophies