Zerei's Recent Forum Activity

  • A Little bump :)

  • Hello! :)

    Here is a Link to my capx: dl.dropbox.com/u/30036346/Dragon.capx

    This is a game for research propourses. It's not even close to the final stage. The aim here is to press spacebar when the timer reaches 0. That way, you can damage the dragon. If you press it on the wrong time (when the dragon is protected by a Dark Aura) you'll get hit by it's fireball.

    I've been learning about PHP and AJAX. I read the tutorials avaliable in the FAQ Thread. But I'm not a good programmer and I can't do it properly.

    Question: I need to save this CSV file, which must register the time when the player pressed spacebar. Then it goes to another line in the CSV , and when Spacebar is pressed, the timer is registered again. This Way, I can keep track if the player improved his peformance or not.

    The data needed are:

    Name:

    Age:

    DragonTimer(which is a variable)

    Trial: (how many times the player pressed spacebar so far)

    Just like that.

    I'm trying to use this code:

    <?php

    /** Read in a username and score and save them to a file. */

    // read variables from POST data.

    $username = $HTTP_GET_VARS[name];

    $score = $HTTP_GET_VARS[score];

    // verify the username is set and not empty

    if (!isset($username) || $username == "") {

        echo "failure";

        exit;

    }

    // verify the score is set and a number

    if (!isset($score) || !is_numeric($score)) {

        echo "failure";

        exit;

    }

    // format the username and score as a comma delimited row

    $entry = $username . "," . $score . $ DragonTimer "," . "Attempts""\n";

    // append entry to the score file

    if (!file_put_contents("scores.csv", $entry, FILE_APPEND)) {

        echo "failure"; // failed to write to file

        exit;

    }

    echo "success";

    ?>

    Any help is really appreciated. But keep in mind that i'm not a programmer, i'm just a newbie in a adventure which is far beyond my professional field!

  • I Forgot to explain. I need the text to be saved inside my server. Or data be sent to me by e-mail, because people will play this game on their computer.

    Anyway, i'll check this Plugin and see if I can work with it! But I think that this isn't exactly what I need =

  • Hello everybody.

    I posted this same issue a few weeks agom but I wasn't Experienced in construct 2 as I'm now, so I couldn't explain my problem properly.

    I looked everywhere, but couldn't find info about this. Maybe I didn't search well enough, but I think it's better to open another thread for it.

    Here is my problem:

    I have, let's say, this reaction time game for research propourses. Time doesn't need to be quite precise as most reaction time need to be.

    Then, this is how i'm registering time:

    Every 0.1 Seconds > Add 1 to "TimeScore" (which is a Global Variable)

    When Spacebar is pressed, the time stops, that value is registered to another variable (Called TimeScore1, or TimeScore2, depending on the stage) and then the player is taken to another stage, there, "TimeScore" is set to 0, and the trial repeats. I need that values to be registered into a TXT or any text file inside my server, so I can later read and analyze it.

    Player Name = (name inputed by the player)

    TimeScore1 = 34

    TimeScore2 = 21

    TimeScore3 = 12

    Any ideas?

  • Thanks Dalek. It worked perfectly.

  • Up? xD

  • Hello all :D

    Anyone can help me to make this object (lets call it Guardian) who moves up and down on the screen, but randomly? Like he is trying to avoid arrows.

    For example: move up to point Y = 600 and then move down to Y = 100, then to up again to Y = 600, and this time, he goes down to Y = 250 and then to Y = 550.

    I'd like to make this behavior kinda "random". But the guardian should not pass the Y = 600 point (let's say it's the wall) and Y = 100 (the floor)

    I don't know if I explained this clearly. Please comment :)

  • Excellent answer, Arima. Thanks a lot. Is it possible that construct 2 will get a plugin wich does the same thing that construct classic does?

  • I made a post about it. So that we may not pollute your post with this discussion :)

    Edit: it's in the general section.

  • Hello, comunity .

    I'm a neuropsychologist. I study brain and cognition. A neuropsychologist's main weapon in study, are the psychological tests.

    Yes, you may have seen some psychological tests online. Forget about them. We work with precision and scientific validation. If there is no evidence, it's not worth using. And if the evidence is weak, we must polish the test.

    I chose construct 2 because it's awesome. And easy to use. But i'm very worried about one thing: The timer's precision.

    How precise is the timer in construct 2? It's known for us, psychologists, that a 2ms difference is a difference that cannot be ignored.

    So I ask you... How precise is the timer in Construct 2? Should I use it for research? Keep in mind that the precision cannot be too oscilating. I know that there are a lot of factors involved, like responsiveness of the keyboard and the computer's processor. But i'm not a programmer, so I don't know it for sure. Can you please explain it to me, or give some reference? (it VERY important for me)

    In a matter of information, there is only one scientific article showing that Flash's timer precision is reliable for research propourses, so, to make your life easier, you may tell me: Is Construct 2 more reliable than Flash in this aspect?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yeah. I'll study more.

    Because my aim is to use construct for neuropsychological (and psychological) research. So the data is extremelly important for me :)

    Also, how precise is the timer in "HTML5"? A respected psychological test needs to be accurate. That's why I must know if construct 2 is good for reaction time tests.

  • Zerei

    I'm not sure want you want.

    CSV can transfer its 2d array into string, so that it can be saved into webstorage.

    If you only need to save 3 variables, you can try hash table plugin, it can transfer data into string, too. (and more easy to use)

    I see.what I want is to keep track of that players scores through a file.

    I'll check that plugin and come with an answer by tonight. Thanks! :)

Zerei's avatar

Zerei

Member since 7 Mar, 2012

None one is following Zerei yet!

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies