jdejean's Forum Posts

  • Hi, I´m still fighting this visual leaderboard thingy.

    Worked on dop2000 example and also on this postbut havn´t had much luck with this json file (I can make it work using mysql, or json with identifiers before the { )

    If I don´t have one, I don´t know how to gather each block information independently, any ideas that can help me here?

    Right now, every sprite gets the data of the last json block

    Thanks so much in advance :)

    This is my file today

  • lionz thank you very much, this is exactly what I was trying to understand. It makes so much sense, thanks!

  • Hello, I have been trying to figure this one out with not luck, I imagine it´s something simple, but I just can´t find how to do it.

    I have three instances of the same text with variables ID:1, ID2, and ID3

    and three intances of the same sprite with variables position:500, position:600 and position: 800 and ID:1, ID:2 and ID:3

    I´d like to set the texts over the boxes using the boxes variable. Is this possible?

    I have tried for each text, set x to boxes.position but it sends every text to the same box.

    and also, compare text id, set position to, box.position but, I cannot specify wich one.

    any ideas?

    This is my file dropbox.com/s/uwtft2szw59whgs/instance%20variables%20positions.c3p

    Thanks in advance!

  • 11 days have passed..... and I´m still not sure what am I doing.

    I got this to "work" with the suggestions made by DiegoM and dop2000, thank you so much!

    Now, seeing that Dop2000´s suggestions are on the json side, I started trying to understand dozens of posts about json and arrays... I can have my data sent it this way:

    {

    "rank": 11,

    "score": 14.0,

    "userId": 46.0,

    "userName": "Varsovia",

    },

    {

    "rank": 12,

    "score": 12.0,

    "userId": 43.0,

    "userName": "Istambul",

    },

    How can I put this into an array? is it possible to separate each score, userId, username, etc?

    Thanks so much,.

  • DiegoM Thank you very much for your answer, I´ll try to see how it goes using this method and will post results as I solve this, thanks! :) At first it seems confusing to me, but I{m sure that with time and patience I´ll have it running eventually lol

    And by the way, since we are here, I want to thank you and dop2000 for all the help you guys give here, as a low knowledge user, I usually search this forum for almost everything I do finding already answered questions, and your names are always present, so THANK YOU! Without even you knowing it, you have already answered A LOT of my questions :)

  • Try Construct 3

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

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

    This is the php Im trying to use to format mysql as json

  • dop2000 Thanks so much for your kind answer, I'm trying to figure it out yet, I'll try to give a proper answer soon :)

    I see you read the names/scores as json locally I can imagine this can be done remotely too, however I'm trying now to understand how to format my mysql data into json now but I am still lost... Not sure what path to choose, since my knowledge on any path is pretty low.

    I have tried to format mysql data as json using php, yet I havn't been able to make it work... yet :P

    Do you have any other tips or ideas on how should I see this?

    thanks so much again!

  • Maybe this helps :)

  • Hi everyone, I need some advice :)

    I´m working on a visual leaderboard that loads names and scores from a MySql database. Everything is working fine when loading a classic leaderboard.

    I am trying to make it more visual, let´s say a car race with each user being represented by a car.

    So far things are "ok", but, I´d like to place the name and score with each car, but since array data is loaded based on each instance variable, I´m having a bit of trouble with this.

    Also , as a second thing, since scores are loaded from top to bottom into the array, I always get the same visual shape (looking like: "/"), and I would like each car to keep it´s Y position. I´ve been pulling my hair with this one

    Is that possible at this point? Am I approaching this with from a good point of view? Should I try to get the cars/position from the mysql database?

    And as a third thing: Cars right now set their x position based on scores/pixels. How could I set a % based on the overall scores?

    Any opinion/help is super welcome, thanks!

    This is exported right now in: badablu.com/desarrollo/visual_leaderboards_v1

    And the c3p file is in:

    badablu.com/desarrollo/visual_leaderboards_v1/visualLeaderboards.c3p

  • winkr7 thanks so much for your message, I am not having struggle with generating random or frames, maybe (possibly) I didn´t explain myself better...

    I have random falling cards, with random falling numbers, that the user needs to drag to the correct bin before they reach the bottom of the screen.

    How can I pin the random generated text to the random generated card so user can drag both at the same time?

    If I pin the text to the card, next time a text is created it pins to that card, not the new one.

    If I set the position of the text, same happens.

    I would basically need to create both card and text, pin them together, and move them together.

  • Hi everyone, hope you are doing great,

    I am working on this game where you have to drag falling cards to a good/bad bin depending on their content.

    Right now I have 20 different images with their content already embed, and I can say if they are good/bad using an instance. (20 frames on the sprite animation, if animation.framecount is less than 10, set instance as good, if it´s more than 10 set instance as bad) on drop, it compares the instance and if matches, user gets 1 point

    This works fine, however, I would like to have more options without making dozens of cards/frames, mostly, because of the final loading times.

    I am trying to think how this should work, cards have Bullet behavour, and they are created every x seconds on the top of the layer.

    How can I attach different texts to different cards? Is this something doable, or am I overcomplicating things? Should I just go with image cards?

    If you think there´s a good workaround, where should I start looking? arrays? I´m not a complete unexperienced here, but I´m far far from being good with them

    Thanks so much in advance for any tips :D

    Have a great day!

  • Hi Newtonplays, no idea if this is a good method, but really does the trick for me. I just use CSS stile over the TextImput object on start of layout eliminating border, color, focus, set font size, color, font family, etc. and then just add my custom sprite over all.

    So far works great, I am sure there are better methods, but this one works great for me.

  • After pulling my hair with Sparsha´s amazing firebase Plugin, there are two main things that cause a black screen (had the same problem many times)

    Please notice I´m not an expert, just had the same problem many times.

    Check:

    1. Worker mode is disabled

    2. You need to tell FirebaseAuth, firebaseAuthpro, FirebaseRdBasic, etc under properties, Choose SDK Object and select FirebaseSDK

    This 2nd option it´s always a thing for me, I keep forgetting linking them

    Hope that solves your black screen, If not, I´d suggest you to ask in Sparha´s Construct Firebase Discord chanel listed with the files downloaded with your plugins.

    Everyone there is super helpful, specially sparsha, who I cannot thank enough one time I had a similar problem, he gives an amazing support :)

  • Hi everyone, thanks for all your answers, I managed to make the player have its Y position based on boolean

    This is what I did and also I`ll be leaving the c3p file in case someone finds it useful as a starting template :)

    Thanks!

    badablu.com/desarrollo/c3/runner2worlds%20templatejdejean.c3p

  • Thanks so much for your answer, Tomy

    I guess I am having a missunderstanding that goes deeper than this example... shouldn´t toggle boolean work like a switch?

    If it´s true, turn if false, and if it´s false turn it true?