Hello Guest

Author Topic: Combine text and images in subtitles - is it possible?  (Read 3922 times)

TekuStudios

  • 2D Toolkit
  • Full Member
  • *
  • Posts: 177
    • View Profile
    • Teku Studios
Combine text and images in subtitles - is it possible?
« on: January 05, 2016, 01:52:11 pm »
Hi!

I'm adding the final touches for the tutorial of our game, and I'm trying to figure out how to do some specific thing. When we teach the player about the game's controls, I'd like to combine text and images so I can have something like this:

Quote
To jump, press [JUMP BUTTON]. To run, press [RUN BUTTON]

Where [JUMP BUTTON] and [RUN BUTTON] are not text, but images (keyboard keys or controller buttons, depending on what input method you're using). It shouldn't be too difficult, but I'm not quite sure on the best approach. And the thing is that we have languages such as English, Spanish, Russian, Japanese... so the texts are completely different sometimes depending on the active language, and since I can't have a consistent text structure I need to come up with a custom solution for this.


Any ideas?
We are an Indie videogame developer located in Teruel, Spain. A small 6-people team which is currently working on the upcoming 'Candle'.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Combine text and images in subtitles - is it possible?
« Reply #1 on: January 07, 2016, 11:01:02 pm »
Hi there, it is with a bit of work.
1. Find some empty space in source font texture you're importing.
2. Insert your images into the font in image editor of your choice.
3. Modify your fnt file, using characters you don't use in your font and create entries for them. It should be pretty straightforward, and you can then import as you do with normal charcters.

TekuStudios

  • 2D Toolkit
  • Full Member
  • *
  • Posts: 177
    • View Profile
    • Teku Studios
Re: Combine text and images in subtitles - is it possible?
« Reply #2 on: January 08, 2016, 11:46:34 am »
Nice, thanks a lot!

I'll definitely try that with BMFont :)
We are an Indie videogame developer located in Teruel, Spain. A small 6-people team which is currently working on the upcoming 'Candle'.