Jump to content

HTML5 game and SQL


Arrowbaz
 Share

Recommended Posts

Hi !

 

I'm making a game with JSON file for data, I use node-webkit for distribute the game, but I would like to update data without re-download the app. 

 

 

What's is the best way for the app to communicate with a database, AJAX call, Socket.io, or ? 

(it's not about which database management systems and system on server, it's how to communicate between the server and the app)

 

 

How do you make ? Make you one request for update the game, store response in localStorage, or one request each time you need data ? How millisecondes do you have between request and response ?

 



Informations :
I can choose your best way for your solution, big data one time, many small requests, or moderate frequency and size requests.


 

Regards,

Arrowbaz

Link to comment
Share on other sites

Yes I'm still on MySQL.
 
It's not for massive frequency update like player's x,y , it's for example when a player enter in an area, get the "action" he can does here with a select.
 
SELECT action FROM actions WHERE area = player_area
 
and I get response like :
 
{    actions: [{        action1: {            id: 1,            name: "hello"        }    }, {        action2: {            id: 2,            name: "world"        }    }]}
 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...