Fengist's Forum Posts

  • Ah found it. Half way down the page on the left hand side is a blue tab with a triangle. It's a flyout menu that gives links to the manual pages.

  • Ill check on my laptop then maybe its something bc i ise duckduckgo browser. Ty for your help!

    Correction. I could only see the main menu when I resized it. But trust me, on the desktop, the manual links are there.

  • The hamburger icon? On the desktop the menu is over on the left side. Maybe the hamburger has links to the topics. But that's the right page.

  • construct.net/en/make-games/manuals/construct-3

    Right at the top of the page under 'Learn/Documentation'

    Might be the phone, I see it on a desktop just fine.

  • I got bored and figuring this out was better than sudoku.

    twistedvoid.com/diamondtest

    download:

    twistedvoid.com/diamondtest/DiamondTest.c3p

    It uses one hexagonal sprite and placement is based on 2 for-loops. There's a number of variables used and I just set them to globals for expediency. The two you need to set are, startnumberofcolumns and startnumberofrows. The other thing you should play with is the sprite x and y scale. The online example duplicates the image you provided. However, playing with the 2 vars and the sprite size, you can do a bit more.

    And for those who'd just rather see the code here:

    *Got home and updated it to clean up the code (couldn't have the public thinking I do inefficient coding.) The download c3p now looks like the code above.

  • Just from my previous CS classroom experience, the first things you should teach are the very basics. Learning the difference between a byte, integer, float, boolean, array, etc. is essential to understanding every computer language. Teach for loops, while statements, if/then conditions.

    I'm reasonably fluent in several languages and variables and structures like those are core to every language including Construct. Once they get the basics of those, it's just a matter of syntax. While Construct is mostly in a language I have issues with (JS), the core concepts of how languages work allows me to code with ease.

    If your intent is to teach the basics of how programming languages solve problems and to create a working game, I'm not so sure I'd delve too deep into actual JS coding. C3 can do all that without writing code. Getting structure and syntax down in a coding IDE can be pretty intimidating. While JS is a very useful language I believe I'd leave the writing code part to more advanced courses like C++, Python or C#. Those that want to learn higher level languages will take that plunge into writing actual code. Those that do not, will still have the basic concepts and could still create in C3. Besides, writing code in Construct can be fun as you usually get instant gratification and see the results. In other languages, it's mostly a thankless grind with only crunched numbers to show for it.

  • I know relatively little about PHP. I've used it before and generally found it frustrating to be honest.

    And that, sir, is exactly how I feel about JS.

  • I'm curious. Why not get your CORS header in the PHP file correct, get the referrer in the PHP script and just do this?

    + System: On start of layout

    -> AJAX: Request "http://www.zuzu.games/upload/our/get-content_NEW.php" (tag "partner")

    + AJAX: On "partner" completed

    -> Text: Set text to AJAX.LastData

    Seems like a lot of effort you're going through just to get a 1 or a 0 from a php file.

    Oh, and to solve your JQuery issue, I cheat. I just use this plugin:

    construct.net/en/make-games/addons/162/jquery-plugin

    That way, I don't have to mess with converting $'s.

    And here's an example I use for my CORS headers.

    //This attempts to grab the URL of the requesting domain (origin) using different methods.
    $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'];
    }
    
    //This is for testing. If no origin is found it displays a dump of the $_SERVER var to help
    //you figure out why. Once working correctly you can change the die() to provide a response showing
    //that the origin is invalid.
    if (!isset($http_origin)){
     var_dump($_SERVER);
     die("No Origin Server Error");
    }
    
    //This is also for testing purposes. It creates a small text file to list all of the incoming origins.
    //Once you verify the origins are correct, you can delete these lines.
    $myfile = fopen("origin.txt", "w") or die("Unable to open file!");
    $txt = $http_origin;
    fwrite($myfile, $txt);
    fclose($myfile);
    
    //And here's where I validate the origin against known good origins. In this case, the C3 preview
    //domain and my personal domain. You could validate this like you do in your script by comparing
    //the origin with a list from another URL. If the origin is correct, it sends the header saying
    //the origin has permission to use this script and that it can POST.
    if ($http_origin == "https://preview.construct.net" || $http_origin == "https://www.twistedvoid.com") {
     header("Access-Control-Allow-Origin: $http_origin");
     header('Access-Control-Allow-Methods: "POST"');
    }

    And thinking about it, you could just use this as your test of valid partners. If they are a partner, the Ajax request would send back no errors and the On "partner" completed request would succeed. If they aren't a partner, then you could test for the Ajax.OnError("partner") and it would be true.

  • And if I can make the games mechanics understandable just through gameplay, it’s always more preferable to a wall of text or diagram. Obviously it’s difficult and relies on

    allot

    of feedback but at the end of the day, I believe it makes a better game.

    lol, you did it again.

  • Found a potential cause of the issue. Some of your block sprites don't seem to have the collider in the right place. Here, I'm able to put a scrap behind a block.

  • Correct. However you are not using it in that context. You are using it to indicate value.

    vocabulary.com/dictionary/a%20lot

    And I'm easily able to duplicate the bug by slamming into a wall. The collect scrap vanishes.

    *edit*

    Not sure if they're going behind the wall or vanishing as intended. One suggestion is that if the vanishing is intentional that you add in an animation and sound to confirm to the user that they were destroyed. As it is now, they just disappear without explanation.

  • unless these are intentional, the grammar police will be visiting you.

    allot is not a word : a lot is correct.

    propper : proper

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Don't think you can.

    I know with Chrome they prevent that and require the user to actually click on something before going full screen.

  • Just thinking about it, there may be another option you want to explore. I'm currently working with an old php script called fusion news.

    sourceforge.net/projects/fnews

    Three things attract me to this old program.

    1. A WYSIWYG editor.

    2. The ability to display formatted news by calling a single php file.

    3. I've integrated it into a C3 project whereby with an Ajax call, it displays the news inside C3.

    It may take some work with php and html to get it the way you want, but in theory, it can display the same news on both a website and inside a Construct project.

  • There's also a way to turn on the classic editor from within Wordpress. That new Gutenberg editor is a piece of non-intuitive junk. It works, but only if you don't know what a real editor is supposed to do.