mardoch's Forum Posts

  • I get the final answer.

    First change the php code:

    $count = 9; $page = 0; if(isset($_GET['page'])) { $page = $count * intval($_GET['page']); // $page = $count * intval(strip_tags(mysqli_real_escape_string($con, $_GET['page']))); }

    Then get the Ajax request like:

    DOMAIN_SCORES & "getscores.php?page="& CurrentPage

    Of course the CurrentPage should be a variable.

    Now you can load a lot of data without preload everything from your table!

  • I can load all my data but as I only put 29 Text object (3X3 for rank, user and score)

    This is what I got:

    I know that the rest of my data is already loaded with but how am I supposed to display it on the same Text object? like switching to the next 29 elements?

    Any idea someone?

  • Yes, I did put it on 50 just to test it. I have around 40 elements for now.

    But I realize that I was wrong about using array. My first idea was to load the entire datas from mysql in the array and then manage to show them part by part (on load display the firs 29 elements then show the next 29 ones and so on)

    But that's a problem if I load like 1000 elements. It will take hours to get all the elements into my array.

    So the idea is to prepare pages on the requested php. So I make this:

    $count = 9; $page = 0; if(isset($_GET['page'])) { $page = $count * intval(strip_tags(mysqli_real_escape_string($con, $_GET['page']))); }

    With this code I can load the first 9 row from mysql table as page 0.

    Now the idea is to use Ajax to change $page in the php so it can load the 9 next entries.

    And this is where I don't know how to do it.

    If I create a new request, it should looks like

    Ajax: send $page=+1 to URL MY_DOMAIN & "getdatas.php?page="page"

    Probably a confusion here…

  • Whoa, savvito123 your are fantastic my friend! Can't wait to test this! I did some progress on my version but I really can complete it now! Gonna post the result asap!

    Thank you so much!!

  • So this is my actual Event Sheet.

    I can load data, I even can move to the next 9 ones but I can't go back on the previous one.

    I'm really going mad on this… a solution anyone?

  • Hi there, I guess there is something I misunderstand with array.

    I can load datas with Ajax so that's great. It display now the first 10 entries but I don't know how to display the next 10 ones. I just want to navigate throw all entries.

    Do I have to reload the array each time?

    Tagged:

  • Oh my…

    Could you post your code here?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Nobody?

  • Hi, did you manage to make it run?

  • Hello there,

    So I'm back here with a very strange problem, when I put my game on Facebook instant game it seems that there is a screen size problem with a black part over the main screen (yellow selection):

    It's even worst when it's on fullscreen, like half of the screen is black.

    I think there is something with the full screen mode setting in Construct 3, because the problem is quite fixed with the letterbox integer scale but not in full screen mode :/

    The problem only remains on web page, not on phone app.

    Any idea?

  • Could be great. savvito123 I understand that time is precious, I also cannot spend much time as I work during the week. I have a bit more time actually because I work from my place but if you can manage to give me some information I would be glad to write this tutorial if I understand a bit how it works.

    I spend so much time looking for a proper example on the forum… It really deserves to do something now for every guy in the same situation.

  • Well, as I can see non-contextual Leaderboards are still available…

    In any case, I did try first to add my own leaderboard using this tutorial:

    https://www.construct.net/en/tutorials/creating-your-own-leaderboard-highscores-easy-and-free-php-mysql-1032

    It's quite good but not complete. There is no global rank, or pages and it's not using a single score per user (which is quite important for a runner, as I want only to keep the best score).

    Another thing that could be great is to have the possibility to use facebook ID to connect to this leaderboard. I'm quite sure that it's possible.

    Maybe if I get some help I could be able to make this kind of leaderboard and post it as a tutorial for all the people (non-dev) who are just in the same situation.

  • Hi everyone,

    I was searching for hours now how to implement a Leaderboard on my FB Instant Game. It's a very simple runner, so I just need to display the player's rank, ID and score. Everything is done on the facebook for dev page, I can even play my game.

    But, that's crazy, I can find a proper example capx file on the forum or either on the tutorial page.

    I found those topics:

    construct.net/en/forum/construct-3/general-discussion-7/fb-instant-games-leaderboard-133334

    construct.net/en/forum/construct-3/general-discussion-7/fb-instant-games-leaderboard-149192

    But .capx links are broken or there is no example attached.

    I'm not a dev, just a game designer that's why I love to create on Construct but I feel very helpless with this.

    Please if anyone has a file to share I would be very thankful. 🙏

  • Yeah! That's working!

    Thanks so much —!!

    So I have to deal with the instance to make the animations works fine! Gotta check that closer…

    About the ghosts, I know that they look pretty much like dead KKK guys …I also have to fix that!

    Thanks again!

  • Thanks —, but the issue still persist. Even with your last update…

    When the player object is in the range (or the line of sight as you used) of the both enemies in the same time, only one is playing the right animation. The other one stay in "sleep" animation. Even if it's moving to the player's direction.

    Is there a way to activate the animation trigger for all of the enemies object?

    I thought the problem can be solved with the "for each" condition cause it's working fine with the collision box… but there is something strange with the animation. The condition is only working for only one object per time…

    Any idea?