Lua and C++: separation of duties

后端 未结 3 1273
青春惊慌失措
青春惊慌失措 2021-02-08 04:22

Please help to classify ways of organizing C++/Lua game code and to separate their duties. What are the most convenient ways, which one do you use?

For example, Lua can

3条回答
  •  旧巷少年郎
    2021-02-08 05:20

    Start small. Allow access to game entities so that you can perform map/level-specific scripting. Behaviour that is consistent across maps/levels probably doesn't need scripting.

    Also, only give access to the public interface of your objects.

提交回复
热议问题