Can someone give me some script to show caption in game, please?
That’s a very generic question, for instance:
-
What is a caption?
- Are you planning to auto generate them from an audio or something?
- Are you going to provide an srt file? Or any other format?
-
How are you planning to sync the caption with the game?
-
How do you want to render it?
There is a lot of options:- Using bgui lib
- Using the bge’s native blf module
- Using a 3D TextObject in the main scene… or in an overlay scene
Generic questions will lead to generic answers that will probably not fix your problem. So I’d recommend to be a bit more specific so we can help you.
Also, if your problem is related to how to display the fonts, take a look at Moguri’s bgui:
https://github.com/Moguri/bgui