Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by demiculus

  1. Here is the full question https://stackoverflow.com/questions/66646134/checking-if-members-are-initiated-yet-in-constructor I have a class that extends `PIXI.Text` which overrides the default `this.text` with something like so: ``` set text(newText: string) { super.text = newText this.updateToolTipText(newText) } ``` The problem is that: 1. `set text` gets called during the construction of the class 2. and `this.udpateToolTipText()` uses `this.width` to adjust the container size BUT when called during the construction of the
  2. Damn seems like a lot of work, thanks for the info though.
  3. What I want is a way to develop my game like Notch does in this video: or what playcanvas offers What is a way for me to do this?
  4. Colonist.io is a web game alternative to the top selling board game Settlers of Catan. Every part of the game is made by pixi except Lobby & Chat.
  5. Any other reason? Also what are the major differences between phaser renderer & pixi renderer?
  6. @Milton when I use webGL on my computer it works at 50+ FPS, when I do `forceCanvas: true` it works at 8FPS why is it so slow? Everything starts lagging on canvas while using pixi.js-legacy
  7. Result: 1. I've removed the masks changing the code below from import * as PIXI from 'pixi.js-legacy' export class RoundedBgView extends PIXI.Container { private readonly sprite: PIXI.Sprite private readonly roundMask: PIXI.Graphics constructor(w: number, h: number, container: PIXI.Container, texture: PIXI.Texture) { super() container.addChildAt(this, 0) this.sprite = new PIXI.Sprite() this.sprite.width = w this.sprite.height = h this.sprite.texture = texture this.addChild(this.sprite) const round = 5
  8. I'm using pixi.js-legacy and when I do forceCanvas: true everything slows down. I know the game is simple and shouldn't need webGL but pixi is built for that I guess
  9. I'm using pixi v5, not sure why but everything works very slow when I just use canvas..
  10. Its v5 1. Why remove all cacheAsBitmap? 2. Spector.js looks cool but I can't make sense of whats going on, my understanding of all those calls and stuff aren't enough. Any resource you can recommend that'll increase my understanding of how things work and how I can debug to find where to optimize?
  11. I'm putting all the tiles & ports to the same container then using `cacheAsBitmap = true` on the container but the resolution goes south why is that? How can I fix it? Before resolution: https://prnt.sc/qppdw4 After resolution: https://prnt.sc/qppdzh
  12. Also I'm using PIXI.Text for most texts. Each time I use it, it creates a different canvas. Is this a good practice? When the views are removed are the canvas removed as well or are they still kept in the memory? If they are kept in the memory how can I remove the canvases from the memory? https://prnt.sc/qponiq
  13. When my game is played (colonist.io) it heats up the computer. Does it draw everything on the page every tick? For example I have a lot of tiles https://prnt.sc/qpc4l6 after drawing them all once would it increase the performance if I made them cacheAsABitmap? Could this be the reason why it is using a lot of resources or is it something small? There are around 110 sprites on the map (tile, dice, port etc.) and these do not change throughout the game. Are these using a lot of resources just staying the way they are. If I cache them as bitmap would the game use less resources?
  14. Hello, I'm creator of colonist.io The game is heating up the computer in macs and lagging. I've looked everywhere (at the best of my skills) and couldn't find the bottlenecks which causing this. Here is some of our players complaining to give you a better idea about the problem: https://colonist.featureupvote.com/suggestions/55589/cpugpu-usage-optimisation Once you play for 3 minutes you'll hear your mac fan. If you're using windows you should see the animation lagging. This is our testing server: https://hexs.io/ you can see the code in non minimized version. I've done a
  15. I'm using pixi v5. On my PIXI.Text I can set "resolution = 2" But that doesn't exist on PIXI.BitmapText. So how should I set resolution for PIXI.BitmapText? Thanks
  16. Hello developers, I'm one of the devs of colonist.io. I coded the UI and I can't say I've done a great job. I'm looking for someone to find the bottlenecks (cases which use a lot of resources) and help me fix them. I'm using Pixi.js for the game and plain HTML/CSS for the other elements, and writing them in typescript. Reach out here or colonist.jobs@gmail.com
  17. Ctrl + Shift + R Apparently I updated the css but it was still using the css from cache so you need a full refresh in order to fix it. I'm going to make the new css also include the version number. file.css?v=23 Also I'm curious how you found this forum for support, we have an email for such questions. After the update we got this questions from all over the place. Sorry it spread here as well. Feel free to delete Vakuus post & the ones which were related to keep the forum cleaner.
  18. Damn, I've been trying to figure out where SVGResource is for the past 2 hours (also trying other stuff) now realized it was for v5 I'm afraid to upgrade 😰 should I? or wait? 🤔 I'll dig deeper tomorrow
  19. I have many svg files that look alike with a few things different in each of them. Here is an example one. <?xml version="1.0" encoding="utf-8"?> <!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="500px" height="500px" viewBox="0 0 500 500" enable-background="new 0 0 500 500" xml:space="
  20. After a lot of googling I've fixed the problem with adding crossOrigin: true .add('tile_lumber', getImagePath('tile_lumber.svg'), { crossOrigin: true }) I have no idea what crossOrigin does or how it works but it seems to have solved the problem. I got the answer from If the problem occurs again, I'll post here.
  21. @ivan.popelyshev I had removed caching thus fixed the problem (sort of) But now I wanted my game to be faster thus I'm trying to cache everything. This problem is back. I'm digging deeper into what is going on, so far what I have found is - This bug happens only on chromium browsers (chrome, brave etc..) - This bug happens only when using webGL rendering not canvas: https://youtu.be/9oTXm5ejWWY I'm looking deeper into how renderers work but I lack a lot of knowledge. I might create a standalone project which reproduces the bug. I'll post here if I do.
  22. The game has come a long way since 2 months ago. Our latest version patch notes is as below. Full patch notes can be seen here. Any feedback is appreciated.
  23. I added Amazon Associates to my game then they banned me saying my content wasn't enough. I later added Adsense but Amazon seems to have better returns. I'm curious if they have approved any game?
  24. As I remember someone posted something like this: `using bitmap text is your solution 99% of the time` here. But later someone deleted that post. So I was wondering if that is the reason my computer heats up when I play my game.
  • Create New...