Best way to have Dialog in your game?
Okay, so I was wondering what was the best way to have character speak in your game. What will be the lightest on the usage and keep project size down.
This is how I have it done now, but I have very minimal dialog and when I add more I'm sure this will make the project size blow up.
I have a text box image in my game.
I keep an attribute that tracks where the player is in the conversation.
When player advances in conversation attribute adds 1
The text box has a rule that
When convo progress is 1 "Change to image1"
When convo progress is 2 "Change to image2"
When convo progress is 3 "Change to image3"
and so on
Each image is a new image with new dialog for the conversation.
This keeps one actor for the conversation on the screen, but it uses multiple images that I make for the conversation. For now this is good because I don't have much dialog, but as I build my game further and add more it means more images for dialog. These images range in size from 4kb to 10kb depending on how much text is there.
Anyone have any suggestions on a better way to do this?
*****************************************************
This is how I have it done now, but I have very minimal dialog and when I add more I'm sure this will make the project size blow up.
I have a text box image in my game.
I keep an attribute that tracks where the player is in the conversation.
When player advances in conversation attribute adds 1
The text box has a rule that
When convo progress is 1 "Change to image1"
When convo progress is 2 "Change to image2"
When convo progress is 3 "Change to image3"
and so on
Each image is a new image with new dialog for the conversation.
This keeps one actor for the conversation on the screen, but it uses multiple images that I make for the conversation. For now this is good because I don't have much dialog, but as I build my game further and add more it means more images for dialog. These images range in size from 4kb to 10kb depending on how much text is there.
Anyone have any suggestions on a better way to do this?
*****************************************************

Comments
one or two images is not much, but when I plan on having quite a bit of dialog that could add up. Yeah it might not be much more than 1mb total, but I would like to know if there is a better method if one is out there
*****************************************************
If the attribute that regulate the dialog box is "convo progress" you should have an actor with a rule that change it right?
In that case create a boolean actor called somethingHappened and set it to false and in that actor along with the rule that change the "convo progress" attribute add a change attribute for somethingHappened to true.
Then in the dialog box actor make a rule that says:
When attribute "somethingHappened" is true
- Change attribute self.Image to "image"..convo progress..".png"
-Timer after 0.1 seconds Change attribute somethingHappened to false
That way it change every time the convo progress attribute is changed without the need to constrain any attribute. Also you will have less rules on the dialog box actor.
Hope that helped, I use this technique a lot also for scores to keep fps up.
________________________________
Icon Pack
Also, since there's a minimum file size due to the file allocation table (I think 4kb?) You could try saving a bunch of dialogue on one texture, then move the texture behind a mask to block out the unwanted dialogue.
*****************************************************