-
JETeranLikes 0Problem Description
Hello guys.
I want to tell you that I have been working really hard thanks to your video tutorials, once again, thanks for making them!
I am about to develop a small video game with some friends, and guess what? I convinced them to use Cocos2d-x instead other engines (mainly Unity)
This game is going to be a text-based game, where we want to present the text while the character are speaking it.
Have somewhere to start? With the knowledge that I have at the moment I am unable to make it, but if you give me a push, I am sure I can do it
Thanks for your time guys!
-
Sonar Systems adminLikes 0
What are you struggling with?
-
JETeranLikes 0
Hey, we want to re-do a game we did for a Game Jolt Game Jam. You can play it here:
http://gamejolt.com/games/guilty-episode-one/124571
And you can see it here:
The game is about taking decisions. You will be asked many questions and, based on the “correct” (in a logic way) answer, you will be judged.
We want to have a background where the text will appear on top, with different animations based on the ‘tone’ of the words.
We wanted the text to appear with different animations, but we didn’t do it at the end. Let’s say some letters coming from above, or the classic typewriter effect.
Any hint to where to start?
Thanks once again!
-
Sonar Systems adminLikes 0
When you say some letter, do you mean some letter from a box or the entire set of letters from a certain box.
-
JETeranLikes 0
We are trying to do an entire set of letters from a certain box, with different types of animation.
Here is a perfect example (go to 3:35):
What do you think? Thank you!
-
JETeranLikes 0
Update:
I was running the Cocos2d-x Test which shows all the features of the engine.
One of them is called New Label + Bitmap Font. Testing run action on the specific character
It appears a rotating B a jumping F and a fading A.
It is in the 31:Node: Label – New API, in the Test app.
I am going to try to understand the code.
Thank you.
-
JETeranLikes 0
Update:
Hello guys. I have been researching about using animated letters. So far I found this:
auto label = Label::createWithBMFont("fonts/bitmapFontTest.fnt", "Bitmap Font Atlas"); addChild(label);
First create a label and then add it to the scene.
auto BChar = (Sprite*) label->getLetter(0); auto FChar = (Sprite*) label->getLetter(7); auto AChar = (Sprite*) label->getLetter(13);
This will store the letter B in Bchar, F in FChar and A in AChar, so far so good.
auto jump = JumpBy::create(0.5f, Vec2::ZERO, 60, 1); auto jump_4ever = RepeatForever::create(jump);
We create an action, and then we apply the action:
FChar->runAction(jump_4ever);
Now, I believe that I will need a scheduler and a for (?) to go through each letter, so we can have the animation of each letter.
Update. For what I can see and with my limited knowledge, each letter is transformed in a sprite, this means that I only can do it if the text is converted to a sprite? We will have tons of lines of dialog, do you have around another way to do it?
Thank you.
-
Sonar Systems adminLikes 0
There is no easy way of doing this.
I would sugest for the initial release of your product use a simpler but still effective animation like fading.
-
JETeranLikes 0
Thanks for your reply.
Yes you are right. We are going then continue with fading animation.
You have a good way to do it? Or do you think the one I show you is ok?
Thanks once again!
-
Sonar Systems adminLikes 0
Just use the built in face actions from Cocos2d-x
Login to reply