0
\$\begingroup\$

what are The Best practies To load game data that are Stored in a mysql database?

I'm using ajax request. But The async Call is a problem because i can't sync The game level with The data load. And game does Not start because the variable is not defined. If i use sync Call, The loop wait The result And all the entities are blocked on The screen.

How Can i resolve?

\$\endgroup\$
0
\$\begingroup\$

I would say sockets, TCP will work great if you don't aim to a MMO-thing.

If you just want to use AJAX calls, you can use promises to trigger the callback (the game itself) once the data has been received.

| improve this answer | |
\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.