sysads's Forum Posts

  • Are you using PHP and AJAX to send the request? Whatever you echo out should get sent back to C3 so you can tell if the results were "Sorry..." or "Your account..."

    Thanks for the reply. I just figured it out using AJAX.LastData then I am now able to compare the strings.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi I am currently setting up my SQL for my leaderboard. I have been able to configure setup mysql to check for existing record when a new user tries to create a new username.

    Manually testing it, I am able to create a new user and also when I try to create another user with same name, it echos the message as expected on the browser.

    The challenge I have now is with Construct 3, I am able to create a new user but when I try to create same user, on SQL side nothing changes but on Construct 3 side, it still thinks it went OK.

    How can I get Construct 3 to get the echo message from mysql so it knows there was an error?

    if (mysqli_num_rows($res_u) > 0) { $name_error = "Sorry... username already taken"; echo 'Sorry... username already taken'; }else{ $sql = "INSERT INTO $db_name.$db_table (name, score) VALUES ('$name','$score')"; $results = mysqli_query($con, $sql); echo 'Your account has been created!'; }

    Tagged:

  • I have decided to do my own leaderboard using SQL and so far it works fine for me with a few exceptions which I am now working my way through to fixing them. That includes:

    - Checking and ensuring no duplicate players names

    - Lock down hackers from been able to inject data into the database (sql injection) hence avoiding scores been altered. TBH it will be foolish for a hacker to spend his time doing that on a leaderboard. Only reason why I would want to fix this is to avoid a virus spamming my database

    - Display a dialog for player to enter name if he wants score to be submitted if first time but subsequent time only high score should be saved straight without any prompt since player already registered

    - Add a column to insert random images per players. This eliminates forcing players to register

    - Ability to display players current rank if outside the top 10 or 20 etc

  • I have been in your shoes for years now and what I have learnt is you need to find a way to tell people about your game. I learnt from the owner of Color Switch some time ago when I was also using Buildbox and before his game came out and became a hit, I asked him about it and what he said was he was waiting on a friend he mentioned his game to who apparently pitched that game to a cousin of his who apparently was an American music artist.

    The artist as at then had almost 8 million followers on facebook. So he posted it on his page and that was the beginning of his break-through.

    So this is why the Chinese guys do so well because they help one another promoting it to their friends.

    So what do I do?

    OK you will be surprised to hear that there are many many badly written games in the store that have over 1M downloads and you wonder HOW DID THEY DO IT? Familiar with that phrase?

    Since Flappy Bird came out, everybody now became a developer including Taxi driver. So the market is over saturated hence reason why App stores pay more attention to games that are getting lots of downloads as soon as its released.

    IF YOU DO NOT HAVE BUDGET TO ADVERTISE, THEN TRY THIS

    1) Avoid cloning another game. Take inspiration from existing games doing well and make changes to it. Maybe add features or so.

    2) Build a very simple original game that is less complex BUT fun to play. May be a game with less retention but you only need a game that will give you an initial boost so you have small funds to do something much better

    3) Make good use of social media by integrating the likes of facebook for sharing

    4) Port your game to facebook instant games. Reason why i mentioned this is because I have seen lots of funny games been played by lots of people on that platform. Add ability to recommend the game to your facebook friends does help a lot. If people love it, they will naturally try and look for the game in app store.

    I really can't think of anything else for now but I am looking to try these methods since I have decided to try out Construct 3 since I left it over 3 years ago while struggling to understand the platform.

    Thanks to this lock-down, I have been able to come up with 2 games of sleepless nights and looking forward to publishing them.

  • Hi, anyone able to provide me with link on how to setup Google Play leaderboard on C3 step by step. Thanks

  • Hi thanks. Actually I just found an easy way out with json since I was finding it hard to convert my csv to json due to the number of commas I have in each text line since I have over a thousand lines of texts.

    I just created an array file in C3 and copied and pasted all the text into it and downloaded the file and uploaded it online since that already generates the json version hence saving me from doing complex conversion.

    Now I just need to try and read each data as needed.

  • Hi I am creating a devotional app and I have the data stored online in both csv & json format.

    I am wondering if its possible with C3 to read the data from the files online.

    I have searched forum and could only find a plugin which does not seem to work.

    Thanks

  • It's hard to say what's happening without seeing your event sheet or debug output - are you using two separate array objects, one for each array file?

    In C3 you can load multiple arrays from files in sequence as follows:

    On start (or function, or whatever):

    >AJAX: Request array1.json tag "array1"

    >System: Wait for previous actions to complete

    >Array1: Load from JSON string AJAX.LastData

    >AJAX: Request array2.json tag "array2"

    >System: Wait for previous actions to complete

    >Array2: Load from JSON string AJAX.LastData

    Thanks for this, it just resolved an issue for me while trying to load multiple json data files into separate arrays.

  • Ah never mind, just cracked it now. Had to use pick from individual buttons and do the check rather than from the family and that works now.

  • In my quiz game, I have 4 buttons each representing an answer. All 4 are in a family.

    When I click the correct answer, it changes frame for that clicked button. Same happens when you click wrong answer and it shows different frame.

    Now I am trying to also switch frame for the correct answer when you click on the wrong answer at same time but have not been able to crack it.

    Tried using the pick from family and comparing the family ID variable against the correct answer ID variable but it does not work as I think it only picks the ID of the clicked button.

  • Hi yes I have been adding text and making changes and exporting. Was hoping for a much easier way around.

    Also I have clear storage multiple times and its always fine with browser and not phone.

    Just checking how quick my datas are stored and read.

  • For the past 24hrs I have been trying to figure out why my Quiz app which is finished is messing up my datas stored in array and local storage on my mobile phone but not when previewed on browser.

    In my quiz app, the level layout has datas showing percentage of correctly answered questions per level and total questions answered so far.

    When previewed on browser, the level 1 data is fine and when I start level 2 and navigate back, the level 1 data is still there.

    But when I export as is to my phone, its the opposite. The level 1 data resets when I navigate back from level 2.

    So trying to figure out how I can monitor my local storage, array and variable datas on my phone if possible.

    Thanks

  • OK the only way I was able to fix this is using the block pin to an image point - release r195

    So means I have to wait then.

  • Posted in wrong group. This is for Construct 3

  • Hi

    I have 100 level based buttons manually created and lined up. using a for each statement, I set the level number for the text attached to the first level button as a container.

    When tested this automatically generates the rest of the level labels but the issue is only the first label text is in the position set while the rest are all set by default to the center point of the level button.

    I added a second image point to the level button and added an event to position the label text to label button at image point 1 but it ignores that and still uses the default image point.

    How can i work around this?

    https://snipboard.io/wajBRO.jpg