Hi,
I'm developing a multiplayer game using Socket.io.
Because the amount of players and other game objects can potentially be a
lot, I want to be able to select the game objects from an area (x and y
coordinate) of the game.
A simplified version of how the gameObjects are stored inside node.js is
below:
var gameObjects = {
"0": {x: 0, y: 32, name: "lol"},
"1": {x: 0, y: 32, name: "lol2"},
"11": {x: 0, y: 32, name: "lol3"}
}
There can be thousands of game objects at the same time..
Should I create a multidimensional array (x and y) to hold references to
the game objects? Should I just filter the gameObjects or??
What would you think as the best practice?
--
Job board: http://jobs.nodejs.org/
New group rules:
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/nodejs/97c67f0f-8f46-4a85-a29b-c22f46fa4649%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.