0 Favourites

How do I read card-based data?

  • I have a project that needs to load long strings of text in. They are passages of books, but I want to allow users to upload their own packs and download them in the game, so I need there to be an open way of loading up long strings of text in arrays. For example:

    TITLE \ TEXT \ CATEGORY 1 \ CATEGORY 2

    I need to allow for multiple sets of these, all downloaded and stored for offline use. Each column of data has to be separate from the other columns. Anyone have any suggestions?

    I've tried using CSV files but I cannot seem to get anything to load in correctly into an array using Rex Rainbow's CSV2Array plugin. Also, my data has commas, colons, and semicolons galore which makes for impossible delineation. Any help would be greatly appreciated.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • What is the likelihood they would use this ~ or this ^?

  • With the fact that there will be multiple categories, then it is better to use xml or json.

    Commas, quotations etc. shouldn't really be a problem, they just need to be escaped.

    If you are going to allow public contributions, you should write a script that will take the raw data and format it properly into xml/json or even csv. Then you can use it yourself to add your data and escape special characters properly, and allow users to run the script (eg in html frontend) and generate data that is structured correctly.

  • What is the likelihood they would use this ~ or this ^?

    Very low; good point, I can try to use this. I also like IndieKiwi's suggestion for xml or json. I will look into those, too. Thanks, guys. (Or gals).

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
300 118,413
blackhornet's avatar
blackhornet
Unread hot topic
99 10,127
karshinkoff's avatar
karshinkoff
Unread hot topic
78 10,771
Josek5494's avatar
Josek5494