FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Storing Lists





polly-gone
I am making a browser-based medieval strategy game, and one feature will be route plotting. When you send out an attack, you will be able to choose it's specific route. The route will be laid out using AJAX, but I want to know the best way to store it. Each main town is going to have it's center set at a (#,#) integer coordinate, but paths might deviate from towns as much as (#.1,#.1). I need a way to store my route in a Database. Would using Longtext and just having the route in as a list ([0.0,0.0],[0.5,0.5]) be an effective method? Any other ways of storing it?

Thanks,

-Nick Smile Smile Smile
LukeakaDanish
I recommend storing it as JSON...that way it will be easily accessible when you need to read it with AJAX again...
polly-gone
I'm sorry.... JSON? I'm not familiar.

-Nick Smile Smile Smile
Star Wars Fanatic
polly-gone wrote:
I'm sorry.... JSON? I'm not familiar.

-Nick Smile Smile Smile


C'mon bud, you don't need him to explain it:
http://www.google.com/search?q=JSON
First hit:
http://www.json.org/
sonam
If you are using Ajax then you can use any type of DB. I am prefer MySql and PHP but I don't know is it faster or better then JSON.

Sonam
LukeakaDanish
sonam wrote:
If you are using Ajax then you can use any type of DB. I am prefer MySql and PHP but I don't know is it faster or better then JSON.

Sonam


JSON isn't a database system. Its a way he could store javascript information in a database field so its easy to access again.

SO it would be used in conjunction with ajax, php and mysql
sonam
LukeakaDanish wrote:
sonam wrote:
If you are using Ajax then you can use any type of DB. I am prefer MySql and PHP but I don't know is it faster or better then JSON.

Sonam


JSON isn't a database system. Its a way he could store javascript information in a database field so its easy to access again.

SO it would be used in conjunction with ajax, php and mysql


Aaaaaaaaaaaahhhh, sorry, my mistake. Embarassed I didn't know.

Sonam
Related topics
Lists of Modding site..
How to get backup from server to my computer
Listspedia - Share your favourite Lists
nifty corners with inline lists
My new SonyEricsson W810i
Waiting Lists
Storing minutes and seconds in a database
Dynamic Pick Lists in HTML
Storing IPs in mysql
I could use some help with dropdown lists in php
Storing Images
Java 2D ArrayLists
Lists in HTML
searching unsorted lists in Python
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.