It's time for socket.io
Posted: Fri Jul 25, 2014 1:29 am
Or I think.
I got node setup for login, character selection and pretty decent start for how I want the session data to look. I got three.js going with my "gameboard" and game objects - everything coming from the database. I actually did a refactor as well during this step, since I kind of cheesed through it the first time while I was learning three.js.
So now I'm ready to drop my player into the world, and this is where I think I should have some socket action. Tracking player movement activity, effects on the world objects etc. But in my head, I want the socket activity to run parallel to the http activity. At least as far as my session tracking, and some of the less time sensitive actions I may have in the game. Initially it didn't make sense to fire up a socket to log in and do basic account and character management, and build the world/level with three.js; but rather start it once the character is entering the scene.
Since I don't know much about sockets quite yet, I'm questioning my logic to start a socket at this point, or start over and just use sockets right from the get go. Can http and sockets work together? I'm also going to add in a redis cache (whether or not a really use it), but this seems like the point and layer that I should be firing the socket up. I hope I'm right and I don't flounder around for weeks and weeks, only to find out that I have to start over with everything I've done so far and remove the whole http / session side of things in favor of a pure socket implementation.
I got node setup for login, character selection and pretty decent start for how I want the session data to look. I got three.js going with my "gameboard" and game objects - everything coming from the database. I actually did a refactor as well during this step, since I kind of cheesed through it the first time while I was learning three.js.
So now I'm ready to drop my player into the world, and this is where I think I should have some socket action. Tracking player movement activity, effects on the world objects etc. But in my head, I want the socket activity to run parallel to the http activity. At least as far as my session tracking, and some of the less time sensitive actions I may have in the game. Initially it didn't make sense to fire up a socket to log in and do basic account and character management, and build the world/level with three.js; but rather start it once the character is entering the scene.
Since I don't know much about sockets quite yet, I'm questioning my logic to start a socket at this point, or start over and just use sockets right from the get go. Can http and sockets work together? I'm also going to add in a redis cache (whether or not a really use it), but this seems like the point and layer that I should be firing the socket up. I hope I'm right and I don't flounder around for weeks and weeks, only to find out that I have to start over with everything I've done so far and remove the whole http / session side of things in favor of a pure socket implementation.