Best way to display bulk text?

Greetings fellows,

I am making an rpg game for android that is based on point and click. Whenever the game protagonist taps an object on screen, a text menu appears with description and “options” on how he can interact with the object.

Now I read the other day that corona treats text as a rendered image and since my game would have loads of text, I see the game size growing very fast. 

Any idea I could make this game with a reasonable size. And since all options lead to different outcomes, what I am currently doing is having tap listeners for all options. Is there any better way to do it?

a sample of one of the text display

Bear: I can help you only if you find my son

Choose one option:

A- Yes I will help you

B- Get lost

Thank you!

I wouldn’t worry about space, text objects don’t take up much memory. I make a text-based management sim and have no problems in that area. I do use bitmap fonts to speed up rendering though.

You shouldn’t need multiple listeners. Just give each object an ID, and then within the listener decide what to do depending on the ID of the tapped object. 

Ideally you should be using tables to store the text for each object depending on the game/object state. For example tapping on the same character will generate different text depending on where you are in the story and how you have interacted with him before. It will get complicated very quickly if this is done with a series of if > then > else statements. 

Do a lorem ipsum test with the amount of text you think you’ll have, then double it.

See how it feels and how much memory is used.

Dont’ optimize as a first step.

If you are ever planning to localise then allow for at least 150% growth on strings.

Just to clarify. Yes Corona’s display.newText() produces an image. However If you’re going to be popping up a box with text like you have, You would probably have three to five objects: The text, and an object per choice (so You can identify which choice was tapped on). But once you’re done with that prompt, you would probably either destroy the objects or keep them around and just change their value using the .text attribute, so you’re not using a large number of objects to show the text.

Rob

I wouldn’t worry about space, text objects don’t take up much memory. I make a text-based management sim and have no problems in that area. I do use bitmap fonts to speed up rendering though.

You shouldn’t need multiple listeners. Just give each object an ID, and then within the listener decide what to do depending on the ID of the tapped object. 

Ideally you should be using tables to store the text for each object depending on the game/object state. For example tapping on the same character will generate different text depending on where you are in the story and how you have interacted with him before. It will get complicated very quickly if this is done with a series of if > then > else statements. 

Do a lorem ipsum test with the amount of text you think you’ll have, then double it.

See how it feels and how much memory is used.

Dont’ optimize as a first step.

If you are ever planning to localise then allow for at least 150% growth on strings.

Just to clarify. Yes Corona’s display.newText() produces an image. However If you’re going to be popping up a box with text like you have, You would probably have three to five objects: The text, and an object per choice (so You can identify which choice was tapped on). But once you’re done with that prompt, you would probably either destroy the objects or keep them around and just change their value using the .text attribute, so you’re not using a large number of objects to show the text.

Rob