Game architecture

Hi everyone! I look through, the application framework section and this as extended application framework.
Now I want to add some game logic to application. I think I should make some private members to class

class MyApp : public Application {

AppDelegate _appDelegate;

Type AppDelegate will be contain some game objects as interface an other instances. Should be AppDelegate inherited from Urho3D::Object, and subscribed to events E_KEYDOWN and etc, as well as MyApp class? What is typical and right application achitecture with U3D? I want to decomposite my application to interface, levels, etc. There is a typical way to do this?

You may want to check any one example first, a partial infrastructure is applied there.

This seems like a sound approach. The AppDelegate might be something to register as a subsystem with context_->RegisterSubsystem. You can do this with any Object. That way GetSubsystem<AppDelegate>() will allow any Object in the same Context to access it.

There is way to write part of logic in Lua? I want to write main game mechanics in C++, but part of program logic I want write in Lua, interface behaviour, configuring of sounds, configuring game objects start points on the screen and etc. These and other parts can be implemented in Lua and connected to main application. What is common way to do this?

You’d have to add lua bindings. I have no experience with this, but Urho’s source is full of examples.

Urho’s way to add Lua bindings might be a bit hard to do in local tree though.
I use manual bindings, but this might be a bit extreme for new users.

Could you show an example of manually Lua bindings?

I saw samples 22_LuaIntegration and 21_AngelScriptIntegration, it seems sample LuaIntegration is bit lagging but angel script not on my LG X Power