How do I simulate Database

0 favourites
  • 8 posts
From the Asset Store
Basic Plugins for Firebase Authentication, Realtime-Database, Firestore, Cloud Storage
  • Hi,

    I am working in a sport proyect.

    I need pass to the game a lot of data (names, abilities,age,nationality, etc)

    and I wont to get this information from a easy way, is imposible put in global variables

    all of this information.

    I am thinking in a Database or something similar.

    Waiting your help

    Best regards


  • If you gonna use this for example for store information of each player, you can use instance variables.

  • Thanks for your reply.

    Yes is a good idea but, for 1000 basket players x 20 attributes, i need 20.000 instance variables, is crazy.

    Exist other way?

  • You could use an Array for this:

  • Yes, I now the Array, but I dont know how load and save to disk, can you help me?

  • Yes, I now the Array, but I dont know how load and save to disk, can you help me?

    since you have a lot of datas, I think webstorage is not the way to go (I could be wrong), but I don't know of a way to save and load file from disk (except if you are planning on using Node webkit of course)

    Maybe there is a plugin that can help, but I am not sure.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads

    if youre dealing with lots of data

    csv plugin

    or csv to array

    or json plugin (in progress but very useable)

    or combination of these

    the savedata can be alot smaller than the data you need to run your game, so i think webstorage should be ok

    edit: to load the data you would just place the data (csv or json) in the files directory and use ajax to load the data, on data loaded you get the string in ajax.lastdata, and with this you can continue, .. dont know if the plugin deals with the loading.

    you do have to be somewhat comfortable with c2, to use all of this, and large data games in general...

  • Thanks a lot.

    But Arrays

    I need to know how and where the array save the data and how load it.

    I want to load the data inside of array, ready to use.

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