Original Post
I have this MUD server, and I'm planing it to be scripted so I will be able to use it with different games, stories and all, just by scripting it different. In a MUD, I think it's ok, but in some point in future, I'm planing to do a MMORPG, like many people do. A mmorpg is a little bit more demanding then a mud server. How much performance I will be losing by using lua? Oh, my server is coded in c++ using completion ports. I've think in two different ways to script. 1) Expose everything to lua: There is a class to encapsulate an IOCP server,CIocpServer. But, this class needs a pointer to a function, this function is the one that actually does the logic work, what to do with messages and all that stuff. I was planning to Expose this class CIocpServer to lua (luaBind) and left the rest to a lua script. This way gives me maximum freedom. 1) Expose Key functions to lua: Do all the logic in functions(a function to accept connections), a function to send data to a specific client, a function to save data in a database, and expose those functions to lua. This way, Lua will just coordinate when to call those functions, instead of implement then directly as lua functions. This way there is less lua involved. What do you think? Should I implement lua scripts and it's freedom? In which manner should I implement it? thanks