Posts by Pika

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.

    Try using the example MFA that comes with SDL Joystick - it should say which buttons are being pressed. Modify it to load the game controller map file first, if you need to.

    It registering every input is most of the battle, though.

    I tried it with and without map. Nothing changed. Buttons numbers are always the same.

    I found out that the GUID is not in the map.
    Is very similar to this:

    Quote

    030000005e040000ff02000000000000,Wired Xbox One Controller


    with the last numbers being different (7200 instead of 0000).
    So i tried to add it to the map copying the line, but nothin happens. Still the same button numbers... :(

    Nope. Only the first four buttons (0-3) are the same.
    Everything else is mixed up. So i think the loaded map isn't working.

    I can make the d-pad working with "hat value" (for xbox one) and button pressed (for PS4), but this is a workaround.

    Ok buttons works as expected. Numbers are the same for PS4 and XBOX one controllers.

    The d-pad is tricky.
    For XBOX is a "Hat value", while for the PS4 is a button value (11-14), the same that i found before loading the map.

    I'll try to make some "or" statements...

    Create a new mfa, add a counter, press a button and make notes of what button that is...
    The controller mappings is just so it's consistent, so you don't have to worry about other controllers being completely different.

    Oh ok thanks.
    This is what i did in first place, but for the PS4 pad only, without loading the map.

    Thanks again.

    Please login to see this link.
    Add controller mappings

    Thanks fnkycoldmadeanr,

    i did it a moment ago
    start of frame > load map from file > Apppath$ + "gamecontrollersdb.txt"

    but i don't understand how to call the buttons.

    the lines in the map file are like this one:
    030000004c050000c405000000010000,PS4

    Quote

    Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,

    Since in SDL buttons are numbers, i don't understand how to target each button, nor i can't find a guide about it. >:)

    I'm sorry for my ignorance...

    Ok name and GUID works.
    Once i've got the name i have to go through this approach for every model?

    if name = PS4 dualshock (or GUID=)
    button 1 is pressed
    or
    if name = Xbox One for Windows (or GUID=)
    button 4 is pressed


    I bet there's an easier way...

    I got another user to test - they having no issues on Bluetooth or wired.
    What sort of issues are you having, and what specific Xbox controller are you using?
    What Windows version, Windows 10?
    Does it work with other programs on your PC?

    The issue is simple: joypad doesn't work. The only button is "select" button that acts as the "start" button. It's a wireless series S (but i'm using it wired).
    I'm on Windows 10.
    The joypad works well with other programs.


    Get device name/GUID might tell you. I don't know if SDL exposes a unique joystick identifier, Please login to see this link., so if you have two controllers of the same type, and start unplugging and plugging back in, you might confuse things. I don't have two controllers to test scenarios like that.

    I tried it, but returns empty string. Same with GUID.


    Every controller should show up and provide input.
    The mapping file converts various brands of game controllers to have consistent input, much like Steam does with their steam controller setup tool. For example, if a controller has four direction buttons, and another uses ABXY in the same location on the controller, a mapping will change the input from one to the other before it reaches your program, so your program only has to deal with one controller, so to speak.
    It might be useful to offer mapping file loading to the user, but most users won't need it. If you're tempted to support all off-brand controllers anyway, there's a Please login to see this link. (you want to load the gamecontrollerdb.txt file).

    I'm confused right now.
    I just installed (and updated) your version of SDL Joystick and i simply went this way:
    button 0 is pressed > do some stuff
    button 1 is pressed > do some other stuff

    I thought this was meant to work with every joypad. I'm missing something for sure.

    Thanks for the update Phil.

    Now i have a question that will sounds stupid for sure, but i'm missing a lot i think.

    Tested with ps4 dualshock and everything is good.
    Xbox controller doesn't work tho. Dunno about others.

    There's a way to tell wich joypad is connected? Shoul i (how?) use the map file feature? X)

    Ok solved my problems with 2 workarounds.


    I'm reporting here, maybe someone else will find this little guide useful.


    Problem 1: First record (position) doesn't appear in the ingame hiscore table


    1. Create a fake line in the db


    Go the database and manually create a new line with score value as high as possible (2147483647 in my case). Name and other fields doesn't matter since the order is score based. This fake line will be the first one and won't be shown in the game hiscore table. The second record will be now shown as the first one.


    2. Fix hiscore entries number in the ingame hiscore table


    Ingame hiscore table will now report an extra record (the fake one) so we need to tell that number of rows = row - 1


    send_data.php


    change this line from:


    $num_row = mysqli_num_rows($res0);


    to


    $num_row = mysqli_num_rows($res0) - 1;


    New problem occurs: fake line appears in the web hiscore table


    3. Hide the fake line in the hiscore web page via css


    index.php


    add this line in the <head> section to hide the second row of the table (first one is the header with icons):


    <style>table tr:nth-child(2) { display: none !important; }</style>


    4. Fix hiscore entries number in the web hiscore table


    index.php


    change this line from:


    <div id="container_number_score"><i class="fa fa-star fa-lg" aria-hidden="true">&nbsp;</i><?php echo $num_row ?> High Scores</div>


    To:


    <div id="container_number_score"><i class="fa fa-star fa-lg" aria-hidden="true">&nbsp;</i><?php echo $num_row - 1 ?> High Scores</div>


    New problem occurs: gold trophy disappear


    5. Fix trophies assignment


    index.php


    fix trophies assignment increasing the position value by one, so the gold one will be correctly assigned to the second row (first is now hidden) and so on.


    if ($position == 2){
    $trophy = "<img src='./img/trophy1.png'>";
    }
    if ($position == 3){
    $trophy = "<img src='./img/trophy2.png'>";
    }
    if ($position >= 4){
    $trophy = "<img src='./img/trophy3.png'>";
    }


    Problem 2: input a special characters will report a blank name (empty field)


    This is not a real solution, because it got rid of the special characters rather than fix the db.
    I messed with utf-8 encoding stuff on the db (general-ci, unicode-ci), but no way to fix it.
    This won’t return a blank name, at least:


    Solution 1 (Universal)


    Make the input field read only and use a custom entry system to write the name as in the old arcades or with a custom keyboard so you can exclude special characters.
    Then using variables you can make the text of the input field = characters pressed.


    Solution 2 (Windows only)


    Make the input field read only and use the Substring Replace Object to replace any special characters with its standard character (eg.: replace è with e)


    A tedious job, nonetheless, but I have a working online score system now.


    EXTRA: show the position number


    By default this solution doesn't show the position number. If you want to show it both in game and on the web:


    Ingame


    send_data.php


    After


    while (NULL !== ($check = $res0->fetch_array(MYSQLI_BOTH)) )
    {


    Add this


    $position = $position+1;
    echo $position;


    Webpage



    index.php


    1. Add the position th to the table (first line in black with the hashtag icon)


    echo"<table>
    <tr>
    <th><i class='fa fa-hashtag fa-2x' aria-hidden='true' ></i>&nbsp;</th>
    <th><i class='fa fa-trophy fa-2x' aria-hidden='true' ></i>&nbsp;</th>
    <th><i class='fa fa-list fa-2x' aria-hidden='true'></i>&nbsp;
    </th>
    <th><i class='fa fa-user-circle-o fa-2x' aria-hidden='true'></i></th>
    <th><i class='fa fa-calendar fa-2x'aria-hidden='true'></i></th>
    <th><i class='fa fa-clock-o fa-2x' aria-hidden='true'></i></th>
    </tr>";



    (WITH the above fix for the first line missing applied - go to the next red title if you don't have the first line missing problem)


    2. Add this line before the line $position = $position+1;


    $realposition = $position;


    3. Add the position td to the html table (first line in black)


    echo "
    <tr>
    <td>".$realposition."</td>
    <td>".$trophy."</td>
    <td>".$check['score']."</td>
    <td><span>".$check['player_name']."</span></td>
    <td>".$check['date_upload']."</td>
    <td>".$check['heure_upload']."</td>
    </tr>
    ";


    (WITHOUT the above fix for the missing first line applied - hiscore table is ok by default)


    If you doesn’t experience the problem of the first line missing, but want to add the position number:


    index.php


    2. Add the position td to the html table (first line in black)


    echo "
    <tr>
    <td>".$position."</td>
    <td>".$trophy."</td>
    <td>".$check['score']."</td>
    <td><span>".$check['player_name']."</span></td>
    <td>".$check['date_upload']."</td>
    <td>".$check['heure_upload']."</td>
    </tr>
    ";


    Hi everyone,

    i've just purchased the Please login to see this link. by Hardsoft Project and i'm facing a problem.

    I'm using the example game provided and just changed the parameters to see it in action on my website and the scores are online, so submission is working as expected.
    The problem is getting the high scores list in game: the list shown starts from 2nd position, the 1st one is missing.

    There's this line of code in the List object:

    Code
    Add line listGetAt$( "String Parser", LoopIndex("list") + 2 )

    I thought that changing that number would do the job, but weird things happen when i change it.

    In author's contact page there's no email, so i'm stuck with a broken product on the clickstore.

    Is anyone willing to help me, please?
    If i can't find a solution, i think i have the rights to ask a refund.


    Thanks in advance.

    First of all, thank you so much for the extension.

    I'm using Dark Edif variant (build 8) and while ps4 joypad works flawlessly, i'm experiencing some sort of lag with keyboard.
    If i use joypad for one player and keyboard for the other ones, sometimes both key is pressed and (negate) key is pressed didn't trigger at all.

    is there something that i could check?
    Thanks again.