Which one to use?

Get help using Construct 2

Post » Wed Feb 08, 2017 1:16 am

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!
B
10
S
4
G
2
Posts: 47
Reputation: 1,894

Post » Wed Feb 08, 2017 1:50 am

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.
B
41
S
17
G
8
Posts: 484
Reputation: 8,261

Post » Wed Feb 08, 2017 2:09 am

Look :

Image

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
B
10
S
4
G
2
Posts: 47
Reputation: 1,894

Post » Wed Feb 08, 2017 3:12 am

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.
Mistakes were made.
B
48
S
23
G
107
Posts: 1,576
Reputation: 60,168

Post » Wed Feb 08, 2017 3:38 am

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.
B
41
S
17
G
8
Posts: 484
Reputation: 8,261

Post » Wed Feb 08, 2017 9:24 pm

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 ? :x
B
10
S
4
G
2
Posts: 47
Reputation: 1,894

Post » Mon Feb 13, 2017 9:07 pm

Up :)
B
10
S
4
G
2
Posts: 47
Reputation: 1,894

Post » Mon Feb 13, 2017 9:18 pm

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%) ;)
Last edited by GamerGon on Mon Feb 13, 2017 9:21 pm, edited 1 time in total.
Lead developer at Octeto Studios

Visit our portfolio at: http://www.octetostudios.com/ :)

Facebook || Twitter || Youtube
B
37
S
7
G
5
Posts: 217
Reputation: 5,614

Post » Mon Feb 13, 2017 9:20 pm

oosyrag wrote: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
Lead developer at Octeto Studios

Visit our portfolio at: http://www.octetostudios.com/ :)

Facebook || Twitter || Youtube
B
37
S
7
G
5
Posts: 217
Reputation: 5,614

Post » Fri Mar 03, 2017 8:59 pm

GamerGon wrote:
oosyrag wrote: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.
B
22
S
4
G
1
Posts: 100
Reputation: 2,150


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 3 guests