"Stage3D Study Notes" True 3D World (vi): Space war

Source: Internet
Author: User

This is the final effect of the book, a complete Space war game:

Click to view Source code

There is not a lot of new knowledge, the things involved more is the game development optimization and skills, below we all look together:

Ship:

Similar particle effects in the particle creation method, our game ship also need the same creation mechanism to create, you can click to view the source code:

Gameactor

Gameactorpool

Additional explanation is the addition of a mechanism for collision detection, which writes the collision detection based on the spherical distance (simple and efficient) and the collision detection based on the Aabb box, but the collision detection of the AABB box is not used in the actual game.

Added a bit of optimization, that is, the physical object and camera distance to judge, if too far to render.

Level:

Still have to admire the author's ingenuity, the level is generally required an editor, the most incompetent will be manually filled with similar XML configuration files, and the author used two bitmaps as the level of data, one is a key bitmap, this bitmap is a 1xn rectangular picture, the first pixel represents the empty, The subsequent pixels and the incoming array in the program one by one correspond to a corresponding entity, can be a meteorite can also be an enemy and other physical objects;

Another image is our level picture, where each pixel can find the corresponding data in the key bitmap, indicating the position of an entity;

So the editing level becomes unusually simple, and of course the parse bitmap is not complicated;

Summarize:

At present Stage3D market is not very good, do not say the loss of the mobile side, page tour u3d strength also not to be underestimated, but can learn from the bottom is always good, another three-dimensional world is not only these technologies, and I think I just just get started, and then I will see some u3d aspects of things, Of course Stage3D will not put down like this, let ' s keep moving!

"Stage3D Study Notes" True 3D World (vi): Space war

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.