• Content Count

  • Joined

  • Last visited

About GodsVictory

  • Rank

Recent Profile Visitors

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

  1. I'd like to destroy the texture completely. I was hoping that loading a Sprite from an image (in this case a URL) would create a new instance of the same texture. Does destroying a texture with the true option cause all other sprites using the texture to be destroyed, even if it was loaded using .fromImage (I'm not using a loader to load images, I'm simply using PIXI.Sprite.fromImage for every Sprite, even if it's the same image)?
  2. Ok, so I figured it out doing the method I explained above (it's not pretty, but it works). I've got a new problem though. I have ~175 different images I need to load. I'm currently using PIXI.Sprite.fromImage(), but I'm quickly using up memory since the textures aren't released from memory. So I added in a sprite.destroy(true) into my ticker once certain criteria is met and started getting this error: pixi.min.js:14 Uncaught TypeError: Cannot read property 'width' of null at e.calculateVertices (pixi.min.js:14) at e._renderWebGL (pixi.min.js:14) at e.renderWebGL (pixi.min.js:10) at e.renderWebGL (pixi.min.js:10) at e.renderWebGL (pixi.min.js:10) at e.renderWebGL (pixi.min.js:10) at e.render (pixi.min.js:13) at t.render (pixi.min.js:10) at t.emit (pixi.min.js:16) at t.update (pixi.min.js:16) I assume this is because pixi is trying to access a destroyed sprite, but I'm unsure of how to correct the issue. Link to code: https://github.com/GodsVictory/BlabrBox Link to error: https://godsvictory.github.io/BlabrBox/?c=simulateChat
  3. Is it possible to insert images into text entities? Example: text="I invented Pixi.js Kappa" should end up inserting the well known "Kappa" emote in place of the text "Kappa" My current idea is to use a container and parse each word of the text individually, creating PIXI.Text for each and adding them to the container. Is there an easier approach? This get's difficult when word wrapping is needed.
  4. I ended up fixing the desync issues. I wasn't reapplying inputs that were made after the last server update. A new issue has arose out of this, all normal driving is perfectly smooth, but boosting seems to cause desync. you can see the boost desync here: https://superonroad-wip.herokuapp.com/ At the end of every boost, you'll get rubber banding (WASD to move, space to boost) code: https://github.com/GodsVictory/SuperOnRoad/tree/wip
  5. What am I doing wrong here. Normal movement is fine, but when boost is applied, there is rubber banding at the end. I'm using client/server model to implement movement. pseudo code: Client sends inputs to server Client process inputs and displays locally Server receives inputs and calculates where client should be Server emit client coordinates Client receives update and applies coordinates Client reapply all inputs made after the last server update Player class: https://github.com/GodsVictory/SuperOnRoad/blob/wip/public/js/player.js Server code: https://github.com/GodsVictory/SuperOnRoad/blob/wip/server.js
  6. I am lerping instead of simply overriding. I was just wanting the calculations to be more accurate between the server and client. The more you lerp, the less responsive the controls feel, but the less you lerp, the more choppy movement is.
  7. Currently, when a client moves, the inputs are processed on both the client and the server which use the same calculation to process the movement. When the client receives an update from the server, the servers position will override the clients position. I would hope that the client and the server would calculate the same positions, but that is not the case. I believe timing is the culprit. What is the best practice when syncing movement? Current flow: Source: https://github.com/GodsVictory/SuperOnRoad