Node objects/modules information
So I am working on a small text based adventure game via node, I am using
the SocketStream framework. What I want to do is to load a map via xml,
parse that map, take each room from the map and store its information in a
room object. I have made a room module that has all the required functions
and variables for this.
What I am wondering is if this is the way to go about this and if it is
how can I make a global array of room objects that I can access via other
parts of the app.
Can I do the map loading, making rooms via the module and storing them in
an array in the main app.js entry part? While this be accessible from the
other parts of the app?
No comments:
Post a Comment