Jump to content

soylomass

Members
  • Content Count

    58
  • Joined

  • Last visited

Everything posted by soylomass

  1. I'll try that and report. Whats the use of hash by the way? Emptying it manually doesn't affect existing entities?
  2. If there is a way to solve this without reusing objects, it would be better. As every entity has a lot of properties that I'd need to reset to reuse it (much harder than directly creating a new one)
  3. I did at first, when the server was node.js and I could use p2 in both sides. But now, not only the server uses another physics engine and language, but there is a lot of logic that I programmed only in the server and not on the client, as the game became more complex. Running the same physics on the client and server now became complicated, so I decided to use the clients mostly as windows to the server now (though I left the p2 collisions on, to make lag less visible).
  4. I'm the dev of deeeep.io. I've moved most of the physics logic to the server (which is made with Java and uses gdx-box2d library for the physics, and Undertow for the websocket server). I send velocity, angle and position to the client and apply the velocity to the local object, and interpolate the angle and position when needed (to correct large differences). It can be done better, but it works great if you don't have a latency bigger than 300ms. I recommend that you don't use socket.io, but directly use js websockets. Socket.io has a bit of overhead.
  5. Yes, I've tried. The physics are decoupled from the graphics. Every object has a body property where I store a p2 body, and destroy it when I destroy the parent.
  6. The game is this one You can check the hash of the food group using chrome console: window.game.state.states[this.game.state.current].foodGroup.hash.length And compare with the children property: window.game.state.states[this.game.state.current].foodGroup.children.length Yes, I'm creating a new food for every food that is spawned nearby, and destroying them after eaten or out of the fov. Shouldn't I do this?
  7. In my game, I have some parent groups where I store other groups and/or sprites. When I destroy the children using .destroy, they are removed from the property children, but they stay in the property hash of the parent group, forever. Therefore the game's memory usage grows over time until crashing the browser. Is it normal for children not being removed from hash property? What is that property for? Thanks in advance EDIT: Found the cause. See last post.
  8. I created a site with a .io games list, most of them (except one or two that is a Flash game) are HTML5 games: http://iogames.top
×
×
  • Create New...