• Content Count

  • Joined

  • Last visited

  1. ewinter

    Correct way to remove sprites / container

    Looks like when sprite.destroy() is used, it removes the sprite from parent container. Before destroying sprite, should I still remove it first?
  2. I need to find position for spawning player in 2D map. My problem is, if I generate random point on the map, there might be already player on that same position. I could loop that random until position is found without collision but it would be inefficient when map is full or would it?
  3. ewinter

    Hotkeys and Keyboard layouts

    In the keyboard event, what property would suit best for game hotkeys? I am thinking about using event.key property. It would be very convenient since no need to do number to character conversions unlike event.keyCode but is there any drawbacks I am not aware of why it would not suit well for games? I still see a lot of event.keyCode used even though its deprecated, will it be dropped? Share your thoughts? thanks
  4. ewinter

    Text Rendering question

    I got it Used BMFont to generate bitmap font of all numbers with large size to fit all my scales.
  5. ewinter

    Text Rendering question

    I need to render current score of players in the game scene. There might be bunch of those in the screen same time. I tried pooling PIXI.Text's but with many of those it wont perform really well. I looked in to https://github.com/PixelsCommander/pixi-sdf-text but it says that it's efficient way for WebGL. I still need to have canvas fallback, would it work with both or only with webgl renderer? Also I tried bitmap texts but those take sometime load if its large.
  6. Which renderer should I set as default in my game. I noticed that with WebGL renderer, when I tried with my laptop it was performing super slow. That was because chrome by default used the integrated GPU rather than the better one. That made me wonder if that happens on production environment, many players might never come back to give second try if the performance is so bad on the first try. I tried with Canvas Renderer and it works fine (+144 FPS) with "average" amount of sprites (relative to my game). Should I use forceCanvas: true by default and give users choice in settings if they want to use WebGL renderer instead if available? In what situations Canvas Renderer is better choice, does it perform better in old computers than WebGL renderer? Is it common that chrome doesn't pick the better GPU by default? My CPU: i5-4460 @ 3.20ghz Thanks!
  7. ewinter

    RenderTexture and generateTexture

    I can create texture of PIXI.Graphics with renderer.generateTexture() function. I could also create new render texture and use renderer.render() function to render the circle to that, am I right? Which one of those I should use? Is there any performance benefits?
  8. When I load image with PIXI.loader or with PIXI.Texture.fromImage(), does it reserve memory from GPU before adding the texture to actual sprites and them to stage?