Tag Info

New answers tagged

0

I finally found the solution! Draw the enemies with respect to the map's position! Just draw the map, and then the entities on top of it a certain distance away from the map's top-left corner. This way, no matter how the map's position changes, the entities will stay put because they're drawn based on where the map is. The player is drawn on top of ...


0

Most of the time, the size of the world doesn't matter as much as the number of players. For just 10 players, you can get away with a lot of things. Unless the world changes, syncing game states would be trivial. You could just have every player send their properties (i.e. position, rotation, health, etc.) to all the other players. If the world changes, ...


0

The typical way to do this is to send the new player the current state of the world / simulation, and then make sure and send any new events to them (even while they load into the map, to be processed when they are done loading) so that they are sure to be up to date. If this doesn't work for your needs for some reason though, let us know, since different ...


0

Your constrain function seems to be flipped. You call m.constrain(p); which is going to call: // stops 'obj' from leaving 'this' (except that you shouldn't be setting variables of *this*) this.constrain = function(obj) { if(this.x > obj.x) { this.x = obj.x;} if(this.y > obj.y) { this.y = obj.y;} if(this.x + this.width ...


0

Almost too many questions in one post, and a little too non-specific for stackoverflow, but I'll try to answer as best as I can: As you've correctly discerned, you'll at least need a node.js server for the wars. Additionally, that node.js server might profit from not having to do anything other than wars. In other words: Even if you choose to use nodejs ...


1

You can choose the selection tool at the top, select all the tiles you want to move then press ctrl + x to cut and press ctrl + v to paste it where you want.



Top 50 recent answers are included