How do I get info from my website in my game?

0 favourites
  • 2 posts
From the Asset Store
five golem elements Sprites Sheet.Best for enemy or villain game characters.
  • Hello,

    I have an website system where a user can create an account and login.

    On this website i show some basic details about an user, like their user id and coins.

    This information is taken from an mysql database, wich all works fine.

    Now i want the users to be able to play the game while they are logged in on my website and i want to check in the game project wich user id is logged in so i can use that id to fetch user info inside the game about the user.

    Is there an easy way to do this?

    Because on the website, when an user is logged in, i can fetch some information like their userid through a query and show it on the page with $_SESSION['id'].

    But i cant seem to get this userid from my website in construct.

    Anybody who can help?

    Thanks for reading!

    // edit

    i only need to know wich id the user is logged in with on this website, so i can get the rest from the database.

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Now i want the users to be able to play the game while they are logged in on my website and i want to check in the game project wich user id is logged in so i can use that id to fetch user info inside the game about the user.

    Is there an easy way to do this?

    I think The user will have to connect when the game is launched, with an ajax request perhaps ?

    I don't known if is possible to do this exactly like you want

    I hope this can help you

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)