load some .csv data into a array ?

0 favourites
  • 4 posts
From the Asset Store
DATA+ (Addon Pack)
$18 USD
20% off
Data+ is the best Data Management solution for Construct 3. It contains 4 Addons (Plugin & Behavior).
  • Hi everyone !

    To present myself, im formerly a php developper, did some javascript / php games before, but I?m mostly an artist and I must say Construct 2 is the perfect way to save some time on the basics ! Great, great and powerfull tool . I?m still quite noob w/ construct 2 and so I?m asking myself directions to take.

    So here?s my first question.

    I?m working on a point?n?click that includes a lot of dialog.

    As a french writer, I?m doing the dialog in french. But the final version will be in english (w/ french subtitles)

    So the thing is that I need to have every text in a database, so I can have all the text in a document and have it for translation. In PHP, I would have make a excel form with 3 columns :

    A ID name ("Welcome_Text" for example),

    the french version,

    and the english version.

    Then I would have a function that will get the good version. Like

    say("welcome_text")

    In Construct 2, my first feeling is to make it with arrays, but is there a way to load something like a .csv in a array at loading ?

    What would you recommand for doing what I?m looking for ?

    I hope Im clear enough with my question.

    • - -

    my other question is : do you think that a web game such as those made w/ Construct 2 can handle all the sound clips of the voices acting ? I mean, what would be a good strategy ? If the full game weight is around 200 mo, is it a bad idea to consider it as an online app ?

    thanks to those who can help me.

    Best

    Charles

  • So with a little more thinking I find out that XML parsing and loading shouldnt be a problem.

    So im thinking about making my .csv file and a php script to XMLize it, then I would be able to load it into my game with ajax.

    scirra.com/manual/107/ajax

    scirra.com/tutorials/328/using-project-files-in-construct-2

    scirra.com/tutorials/354/xml-parsing

    Then put it into array so I can access any reference anytime.

    Any "pro" advice or alternative ways on the subject welcome however <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • my other question is : do you think that a web game such as those made w/ Construct 2 can handle all the sound clips of the voices acting ? I mean, what would be a good strategy ? If the full game weight is around 200 mo, is it a bad idea to consider it as an online app ?That's difficult to answer. Basically, all that matters is that the loading times are as short as possible. C2 does a lot to keep it short. For example, sounds are only loaded from the server when needed. But that also means, there is a delay the first time a sound is used (a delay between the action of a user and the start of the sound play). You can preload sounds, but preloading them all at once at start would make the loading of the game extremely slow (several minutes). The best compromise would be to preload sounds ahead of time, but only those that will be needed next. So you'd have to experiment at which point in your event sheets you'd use preloading orders.

    There's also another problem, that could get really nasty. All audio will be decompressed to RAM. A stereo audio uses about 10 MiB/min uncompressed. Your 200 MiB compressed audio data could well represent 1 or 2 GiB uncompressed in RAM.

    An alternative would be streaming audio, but C2 only streams files added to the 'music' folder. And of those you can only stream one at a time.

    You see, it's really hard to tell.

  • Thanks for your reply there�s nice information i didnt know.

    The preloading choice is good news, since we have the choice I can find a compromise. (Like preloading the sounds of the scene only)

    But you�re right the RAM stuff may be quite problematic so thanks for the warning. I really thought that it would play mp3 as sound clips. Voice clips may be mono (and music stereo) so I ll do some tests and, well, we�ll see. Maybe I can hope some update in the meantime ? ^^

    Regards,

    Charles

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