Archived

This topic is now archived and is closed to further replies.

WebsiteWill

LUA Question

Recommended Posts

Right now I am working on a network module that will be used in my game. The module requires that packets be wrapped inside of a certain class type and each packet has virtual overridden functions for handling the data specific to the type of packet. As of now, to add a new packet type I have to load up the desired .cpp file, add the new packet class and then recompile. I''m thinking that there may be a way to allow me to enter new packets via a script. Also I am thinking that it might make things easier to edit (like if I decide variable x can be a short instead of an int). Have this scripted would make this easier and would guarantee not having to recompile when i want to add or change such things. OTOH, this code is pretty much a one time deal except for tweaking. Adding new packets is something that will occurr rarely except for cases like if I want to expand the game in some way at a later time. Another option would be to place all of the packet specifications into a .dll. That way if I need to add or change specific packets then all I''ll have to recompile is the dll itself and the overall game would not need recompilation. Right now I;m leaning more towards the .dll option. I''ll be using scripts later on but not sure if I need to do it for this. Any thoughts? Thanks, Webby

Share this post


Link to post
Share on other sites