Game title special effects, title Special Effects

Source: Internet
Author: User

Game title special effects, title Special Effects

Preface:

I plan to add an article category in my blog to appreciate some simple 2d game special effects. It will be presented in gif or video, mainly in language description. After knowing the language implementation, the reader can easily use some simple APIs in the game engine.



1. 2d batch drop bounce Effect


Language description effect: Each genie moves from the top to the following position, and then returns a bounce effect. Note that they are moving at different speeds so that they can rebound at different times. The cocos2d engine has its own implementation called easebounceout. Other engines that are not implemented must be written by themselves.
Cocos2d implementation: each word is an genie. I created a class that inherits from Sprite and mainly adds one attribute and an endpoint. At the beginning, set each genie. Add them to an array. Traverse each sprite cyclically and execute move and EaseBounceOut actions. They move at different speeds and are a random number between 0.5 and 1.
const float moveMinAniTime = 0.5;    const float moveMaxAniTime = 1.0;    const float delayAniTime = 0.5;        for(TitleSprite* eachSprite : titleSprites){        auto moveAction = MoveTo::create(GameUtils::getRandomNumBetweenTwoNum(moveMinAniTime, moveMaxAniTime), eachSprite->getTargetPosition());        auto easeAction = EaseBounceOut::create(moveAction->clone());        auto seqAction = Sequence::create(DelayTime::create(delayAniTime), easeAction, NULL);        eachSprite->runAction(seqAction);    }


2. 3d batch drop bounce Effect




3d implementation will be even cooler. This is what I accidentally saw on the bus. It is very good. The principle is similar to the above 2d. It also adds the effect of "dropping down, the effect of stretching up and down is very good.

Http://www.waitingfy.com/archives/1390

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.