Off-topic: The meaning of Lua scripting language existence

Source: Internet
Author: User
Tags lua

Purely personal insights.
Broadly speaking:
The high efficiency of the C + + implementation, some of the performance-sensitive complex calculations in the game need to be implemented in C + + to prevent game lag and low frame rate. These complex calculations include battle logic, complex AI, coordinate calculations for bone animation skinning bone points, and more.
However, C + + is a relatively complex programming language with low development efficiency. Well, but this is not the main problem, for the commercial hand-tour project only in C + + development, is fatal. This is specified behind Lua.

Lua is a scripting language that performs less efficiently than C + + and is often used to implement performance-insensitive game logic, such as window interfaces and so on. In addition, LUA syntax is simple, the development of high efficiency, no programming background of planning to spend energy can also be mastered, part of the planning of the commercial end of the project is the need to use LUA to implement some simple window functions.
As a scripting language, LUA also has a very important feature: Support for dynamic updates!
A full-C + + implementation of the release on the Apple AppStore on the Hand tour project, if you encounter a bug, or need to add new game features, you need to submit a game pack waiting for Apple Audit, need to wait a week or more time. If it's an emergency game bug (it's almost impossible to avoid bugs completely during game development), this week's time can be a huge loss.
My own project, a weekly content update, completely in C + + development projects are not possible.
In addition, Lua's features can be done such as non-stop service to complete the server-side code updates and so on.

Therefore, the solution to the usual hand-tour project is to use C + + to implement some of the underlying, performance-sensitive modules that do not need to be updated frequently. Use LUA to implement game logic that needs to be updated frequently.

Off-topic: The meaning of Lua scripting language existence

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.