Which one to use?

  • Hello, i've question for my game, i'm actually creating a game like Lifeline (Practically 100% textual) and until now, when we choose something the 'Text1' set on the SourceText

    So i've a lot Text around my game, and i'm here to know, if it's a best solution or if I should use Text file with Ajax ?

    PS : A lot of Text maek my game heavier ?

    Thanks for reading, good day!

  • I am not sure what your first question actually is, can you explain better?

    As for text making your game heavier, text is pretty small compared to images. Unless you have millions of lines of text, it is "light." That said, depending on how you process said text, will make a big difference. For example, a while loop that goes through millions of characters one-by-one, could take awhile.

  • Look :

    When i click on button 1 or 2, a Text (Text1, text 2 etc.) in a red circle replace my Text source and others button appear. I've a lot of text, and i know we can replace Text object by a file .txt

    For me and my game, what is better to use, for the weight of my game and me for the code ?

    If you don't understand tell me :p

  • Personal preference, but I find working with lots of text within the text object a pain. It is much easier to work with text in notepad or other word processor.

    Don't worry about weight or optimization, it doesn't make a difference.

    But I would recommend utilizing spritefonts, you will have a lot more control over the appearance.

  • wowza...why don't you load the text in JSON, CSV, or similar source? No real need for individual text for each one. You are creating a lot of work for yourself.

  • I don't know how to use it so...

    And, i want to add every text on source text (and scroll teh source text) but i think i know how to do it, but which method to use and how ?

    Thanks you guys, you help me a lot !

    *Edit* If you have time can you make me a .capx example ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Up

  • AJAX + XML:

    https://www.scirra.com/tutorials/807/ho ... -game-talk

    https://www.scirra.com/tutorials/354/xml-parsing

    I've used XML for my last game language localization. I have something like this:

    <?xml version='1.0' encoding='utf-8'?>

    <dictionary version='1.0' selected_language='eng'>

    <word key='hi'>

    <translation language='spa'>Hola</translation>

    <translation language='eng'>Hello</translation>

    </word>

    <word key='bye'>

    <translation language='spa'>Adios</translation>

    <translation language='eng'>Good bye</translation>

    </word>

    </dictionary>

    One XML with hundreds or even thousands lines will size < 1% of your exported project size (images and audio are the other 99%) <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">

  • But I would recommend utilizing spritefonts, you will have a lot more control over the appearance.

    I would not. They are a pain in the ass. Better to use webfonts:

    https://www.scirra.com/tutorials/237/ho ... -web-fonts

  • > But I would recommend utilizing spritefonts, you will have a lot more control over the appearance.

    >

    I would not. They are a pain in the ass. Better to use webfonts:

    https://www.scirra.com/tutorials/237/ho ... -web-fonts

    Webfonts work on Mobile?

    Do they work with direct export from Construct to Cordova to Phonegap?

    Tutorial shows an Xcode intermediary step.

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