Original Post
So, I'm getting into Lua for the first time, but I've found that it requires a bit more work than my previous C++ framework. I'm still using C++ for various system managers (video, audio, logfiles, etc.), and I'm writing the game logic in Lua. The problem is that in my previous system, the CSystem class contained a polymorphic std::list >, with classes for CGameStateMenu, CGameStateField, CGameStateMap, etc. implementing IGameState. Now that I've chosen to implement game logic in Lua, I don't know how to reorganize my state classes. Is it possible for Lua tables/classes to inherit from "real" C++ classes and still support a polymorphic list? What solutions have any of you used when mixing C++ and scripting code? Do I even need state classes, or is there a more elegant solution I'm not aware of? Thanks in advance, TW