demiculus

Members
  • Content Count

    37
  • Joined

  • Last visited

About demiculus

  • Rank
    Advanced Member

Recent Profile Visitors

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

  1. 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.
  2. Any other reason? Also what are the major differences between phaser renderer & pixi renderer?
  3. @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
  4. 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 this.roundMask = new PIXI.Graphics() this.roundMask.beginFill(0x000000) this.roundMask.drawRoundedRect(0, 0, this.width, this.height, round) this.addChildAt(this.roundMask, 1) this.sprite.mask = this.roundMask } isSameBg(texture: PIXI.Texture): boolean { if(texture == this.sprite.texture) return true return false } } to import * as PIXI from 'pixi.js-legacy' export class RoundedBgView extends PIXI.Graphics { private readonly texture: PIXI.Texture constructor(w: number, h: number, container: PIXI.Container, texture: PIXI.Texture) { super() this.texture = texture const matrix = new PIXI.Matrix() matrix.scale(w/texture.width, h/texture.height) this.beginTextureFill(texture, 0xFFFFFF, 1, matrix) this.drawRoundedRect(0,0, w, h,5) this.endFill() container.addChildAt(this, 0) } isSameBg(texture: PIXI.Texture): boolean { return texture == this.texture } } 2. I've made default powerPreference low-power this.app = new PIXI.Application({ antialias: antialias, // default value is window.devicePixelRatio * window.innerWidth <= 2000 resolution: resolution, // default value is window.devicePixelRatio backgroundColor: GameColor.getColorHexValue(GameColor.Color.Sea), powerPreference: powerPref, // default value is 'low-power' }) 3. I've added buttons for antialias, resolution & powerPreference, so players can change it: https://prnt.sc/qqoc4k The game seems to be more optimized. But it still heats up my mac while playing. The problem is most other games also heat it up. I think macs have an internal problem with webGL. Plain HTML games never heat it up. I also checked "two videoadapters" things and my mac only has one. I hope after this update windows users won't have any problems and mac users will be okay with it. 15% of our players are from mac. Lets see how the community reacts to it.
  5. 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
  6. I'm using pixi v5, not sure why but everything works very slow when I just use canvas..
  7. 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?
  8. 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
  9. 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
  10. 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? How can I track the resources they use?
  11. 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 few performance improvements so Once you figure out the bottleneck which is causing all the lag you can email us the solution on colonist.jobs@gmail.com or post here. I will post here who has received the bounty once someone solves the issue. Let me know if there is anything else. Best of luck
  12. 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
  13. 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
  14. 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.