• Content count

  • Joined

  • Last visited

  1. I needed the zoom as well today and came across this post. I copied in your code above and the plan didn't really work right away....simple quick fix for me was to use a constant value of 1.02 for zoom out and .98 for zoom in. Seems like, from the partial code above, your idea is to keep a scale variable which you are incrementing and then applying. Which doesnt seem correct becuase [viewport.currentTransform.scale( ] doesn't set a scale value it just multiplies the current values in the transform matrix. Hopefully that helps....maybe not.
  2. Perfect! Thanks!
  3. First off....everything is working correctly. But I have a question about how the render update is working. See.....I am testing across two open browser sessions in chrome; each are receiving socket messages to update the position of the players in the the picture below.... Both of the open browsers are showing receipt of messages the whole time....But I have to actually be engaging with a window for that specific window to redraw the page. Bottom line...I cant seem to see the updates from screen 1 effecting screen 2 in real time....I have to go click on screen 2 at which point screen 2 immediately draws it correctly. Is there a quick way to explain what the rendering is doing? Im hoping that it would be pretty enlightening for me to understand this....maybe its simple, but I cant seem to figure whats happening.
  4. Thanks for the feedback Jay....the collection of links in the "rabbit hole" are pretty tremendous. And nope, Ive never made a multiplayer game at all. As for melonJS...the framework is really tremendous so far....Ive got a contra map from tiles I cut off old images on the web, plus sprites. Then coded up my entities , and already have a pretty decent looking and working Contra game. So Big High5 to the melonJS devs. Now im wading into the multiplayer....Ive got websocket messaging flowing between client and a server. So easy part done. I suppose from what I read .... the correct approach includes... 1. Server acts as master system of record 2. Clients see the other users as they were in the very slight past and interpolate the gaps. 3. Implement lag compensation on server calculations which kinda reverses that interpolation from step 2. But it seems to me the implementation of that will be a bit bizarre in a game like Contra....because the bullets are moving so slow! But maybe it makes easier, who knows? Its an interesting problem area for sure. Thanks again!
  5. Thanks for the quick reply agmcleod.... Im going to give melon a go I think. I just worked through the Platformal tutorial and it was very easy to get the thing stood up and a game working. So far so good.
  6. This post is from a first time melonJS user. I would love guidance and advice from strong members of the community. Let me know if this is sounds like a good/interesting idea. Is this something melonJS will do well? Game Summary Massive Multiplayer Team Contra (looking exactly like NES contra) Hook: Its a neverending multiplayer Game session. As a player joins the session they are auto-teamed up with 1 random new player . These teams compete to get to top of leaderboard (so kinda similar to in many respects) Rules: Exactly like contra...1 bullet takes a life. Each player starts with three lives. As a team is killed off, the team is removed from the game and leaderboard. New teams are always being added to the game. If your teammate is killed are alone, but will have opportunity to join another player Why Im Posting This Ive never made a game for browser, after looking around Im almost settled on using melonJs. Im a very experienced server side developer and will also be building a multiplayer micro-server specifically for the game. This server will be responsible for coordination between players (lobby and in-game). It will also do some of the heavy in-game calculation lifting. It will service the clients via websockets and REST. The browser is where Im unsure. Ive done Javascript when I needed it, but Im no expert. Here is what I need melonJS to do for me. Render the game (of course). Do physics / collision detection for the player. (not all players .... just the main player for that browser instance) As new players are added the map will possibly grow. With some upper limit. Take instruction from the server on the game state (other entities and they're actions) Use RX-JS for this interaction with the server (I specifically want to learn RX-JS). So this will require Observable streams to be processed alongside the game loops. Thanks for any feedback! -chris