I am doing a server side game with socketIO and I plan on having to games on the same script using the room function socketIO has. However is there a way for me to include each room in its own script. At the moment I am doing gameType_Function etc... Just so it doesn't get confusing. So I was wondering if I could have them in there own script and include them kind of like phps include() feature.
If there is, would I need to define socketio in them or would that happen on the include?
require()
. – jfriend00 Jul 7 at 21:30