• Content Count

  • Joined

  • Last visited

About demiculus

  • Rank

Recent Profile Visitors

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

  1. 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
  2. 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" ""> <svg version="1.1" id="Layer_1" xmlns="" xmlns:xlink="" x="0px" y="0px" width="500px" height="500px" viewBox="0 0 500 500" enable-background="new 0 0 500 500" xml:space="preserve"> <polygon fill="#2237FF" stroke="#000B71" stroke-width="30" stroke-miterlimit="10" points="270.073,318.023 270.073,209.126 319.049,209.126 176.098,57.9 33.148,209.126 82.124,209.126 82.124,462.342 217.969,462.342 270.073,462.342 467.852,462.342 467.852,318.023 "/> </svg> In pixi.loader I add images like: PIXI.loader .add('city_blue', getImagePath('city_blue.svg'), { crossOrigin: true }) .add('city_red', getImagePath('city_red.svg'), { crossOrigin: true }) .add('city_yellow', getImagePath('city_yellow.svg'), { crossOrigin: true }) .add('city_orange', getImagePath('city_orange.svg'), { crossOrigin: true }) .add('city_green', getImagePath('city_green.svg'), { crossOrigin: true }) .add('city_gray', getImagePath('city_gray.svg'), { crossOrigin: true }) ... The polygon fill & stroke is the only parameters different in this image but my sever needs to load ALL of the images in order for this to work. So my question is how can I dynamically change a single svg images parameters so that my website loads faster?
  3. 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.
  4. @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: 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.
  5. 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.
  6. 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?
  7. 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.
  8. Bitmap Text gives much better performance for dynamically changing Text. (source) Text has more attributes and is easier to change it's style. Bitmap Text has better better performance but static when it comes to styling. From this I understand that every text should be Bitmap Text except for some edge cases which Bitmap Text doesn't help. Have I understood this correctly or am I missing a part?
  9. Nevermind, I'm a total noob. I didn't realize I had to use the .fnt & .png files at the same time. I was just using .fnt file. Also for my next problem deusprogrammer here has came across it and the same method worked for me too:
  10. I couldn't get bitmaps to work. I always got errors like `Uncaught Error: Texture Error: frame does not fit inside the base Texture dimensions: X: 54 + 0 = 54 > 1 and Y: 50 + 0 = 50 > 1` I'm using the Arial font (really simple). I'm using I tried Pack Method 1 through 7 I tried just digits, just lowercase etc. I tried different paddings I tried different fontsizes I tried different strokes I tried different canvas sizes I tried the same with bmglyph But none seem to work, what am I missing?
  11. Here: it says what is the logic behind it?
  12. function getRandomString(): string { return '?' + String(Math.floor(Math.random() * 9999999999)) } export function loadImages() { PIXI.loader .add("tile_lumber", "../images/tile_lumber.svg" + getRandomString()) .add("tile_brick", "../images/tile_brick.svg" + getRandomString()) .add("tile_wool", "../images/tile_wool.svg" + getRandomString()) .add("tile_grain", "../images/tile_grain.svg" + getRandomString()) . . . .on("progress", loadProgressHandler) .load(GameUICore.setup); } I've changed it like this and seems to be working. This is probably not the optimal solution but it works.
  13. Sorry for my late reply, I had family issues. So the things I've figured out it `cmd + shift + r `-> doesn't resolve in such a problem `cmd + r` -> resolves in such a problem The problem is something to do with cache and I couldn't decipher how. I messed around with Cache-Control as well as other things but no luck <meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate, post-check=0, pre-check=0" /> <meta http-equiv="cache-control" content="max-age=0" /> <meta http-equiv="expires" content="0" /> <meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" /> <meta http-equiv="pragma" content="no-cache" /> I'm trying to turn `cmd + r` into `cmd + shift + r`. If it is possible this'll solve the problem. I'll post when I do.
  14. @ivan.popelyshevNope it doesn't happen in firefox, but it happens in chrome & safari.
  15. @ivan.popelyshev anyway I can help by giving any other context?