Jump to content

mla

Members
  • Content Count

    32
  • Joined

  • Last visited

About mla

  • Rank
    Advanced Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Is there also a way to factor in the timing it takes to make updates on the server side? For example, 3 players click on one player, but only one ball can be sent to that one player. The sending player will send that he clicked first and update the receiving player to state he is in a move. This would mean the other two players who clicked at the same time, would then receive a message stating that that player is in play.
  2. @b10b to pass the ball from one player to another, you click on the player. The structure is set up that the client will listen for a mousedown event. When a mousedown occurs, it will capture the coordinates to know where the receiving player is standing to pass the Ball over. Then the ball will be removed from the sending players hands and will animate over to the receiving player. //Listen for player passing a ball BALLS.onmousedown = function(e) { var mouseX = e.pageX - this.offsetLeft; //get clicked x coordinate var mouseY = e.pageY - this.offsetTop; //get clicked
  3. Hi, I have a multiplayer game that works, except when two players click at the exact same time. For example 6 players are in a game. The game consists of balls being sent from one player to another. The ball is animated from sender player to receiving player. Which means when the sender sends the ball, it is no longer in his/her hands. The ball is now is the hands of the receiving player. This works perfectly except if a move is made by another sending player at the exact same time. For example, 6 players are in a game. Player1 passes Player2 the ball at the same time, Player
  4. Hi, I am looking to hire a html5 game developer for a freelance project who has experience with socket.io, express and node. It would be to take an already developed game to the next level with animations and to adjust any current glitches. if interested please connect with me and provide me with your price rate and portfolio. Thank you!
  5. Hi, I'm wondering how to avoid simultaneous mousedown events. I have a canvas drawn on screen. When a player clicks events take place based on where the player clicked on the screen. If two players click the canvas at the exact same time, they should both be alerted with a message that no simultaneous moves are allowed. I used an array to capture the move, however it seems to only register the move after the check and not before. Is there a simple way to capture which clients clicked at the same time? //Listen for player click event chainlinks.onmousedown = func
  6. FIXED!!! I got it working with IIS 8, Windows 2012 server. The issue was my web.config file needed the proper rewrites. For anyone facing this issue, ensure you update the web.config correctly. It's all working now.
  7. Decided to try out the pm2. Seems the issue is that app.js is not found. A nice 404 Error!
  8. Thanks. I managed to get the iis and nodejs working and a simple test page launches great. I'm more faced with a content-security-policy issue and adjustments to my headers don't seem to make a difference. I may give your pm2 a try if I can't get past this error.
  9. Hi, I have a nodjs application that is currently saved in Windows 2012 R2 server using IISnode with IIS 8.5. I am getting a 404 File or directory not found error, however nothing is being recorded in the error logs. When I run this locally I have no issues and the game runs well. Thinking it could be a permissions issue, I decided to provide temporary read/write access, however that didn't seem to make a difference. I also confirmed that the links are all correct in terms of where files are sitting. Here is my server side code: var PORT = process.env.PORT || 8080; var ex
  10. mla

    Images disappearing

    Worked like a charm!! Pre-loaded images, created gameloop on client and no flickering. Gameloop updates and draws images perfectly! Great help!! Thanks!!
  11. mla

    Images disappearing

    Each person who joins the game, is represented by a specific avatar that is placed on the screen at specific x, y coordinates. I am attaching the screen shot that will hopefully provide a better explanation. The game works, just that the images are flickering.
  12. mla

    Images disappearing

    I have re-coded the game and now the players connect and disconnect correctly. I save the disconnected player details in an array before the disconnect to allow him/her to comeback. The issue I seem to now face, is why my avatars are flickering on screen. They work great, but the image flickers. I have an interval to loop through the players{} and draw them out. My assumption is that the requestAnimFrame function is needed here. In Server: //show all logged players setInterval(function(){ io.sockets.emit('state', PLAYER_LIST); } },1000/25); In Client:
  13. Thank you chriswa! After your first reply and then hearing from mattstyles, I decided to go forward with localStorage and not with the database. Since I'm utilizing local storage currently, I am re-coding the game entry part to recall the player id if it exists and show their last known information if the game is still in play. Since I already am using random ids, there is no worry about conflicting player logins or hijacking spots. I have a better understanding now of when to use a DB. Thanks All!!
  14. The minimum is 6 simultaneous players to a maximum of 12 simultaneous players. The game is pretty simple, and briefly explained below. Host logs in and received a gameID Between 6 - 12 players access the game using the gameID Each player is represented by a static non-moving image. When host starts the game, each player has 4 colored balls and a card showing the sequence of colored balls to complete. Each player passes balls around until the player completes their card showing the colored sequence of balls. This means that each player has 4 colore
  15. Hi, I'm creating a node js game, using javascript and socket io. I originally was not going to add a mongo DB, but now I'm thinking I should for anyone who may accidentally be disconnected from the game. What would the best game option be? To use a database or not, and the reasons behind it. Many thanks, MLA
×
×
  • Create New...