• 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. demiculus

    Refreshing page distorts textures

    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.
  2. demiculus

    Refreshing page distorts textures

    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.
  3. demiculus

    Refreshing page distorts textures

    @ivan.popelyshevNope it doesn't happen in firefox, but it happens in chrome & safari.
  4. demiculus

    Refreshing page distorts textures

    @ivan.popelyshev anyway I can help by giving any other context?
  5. demiculus

    Refreshing page distorts textures

    When it is the first time I open the game and play everything is fine after a couple of moves, players get new turns, some cards fly around(players get resources, trade etc) and then when I hit page refresh to start a new game some of the cards are smaller: Note that this happens to only to cards. The thing that is common with all cards is that they animate. The cards animate when player receives a new resource. So maybe I thought some old code was continuing to run on the background even when the player refreshed the page, so I made sure all the old animations stopped when the player hit refresh. This didn't solve the problem. Another thing that was interesting was, the cards on the left bottom and the cards in the bank are totally different sprites. They have nothing in common except for their texture (bank cards don't even animate). So I'm guessing the texture pack didn't load right specifically for the 2 types of cards shown in this image. Note that each game different cards are smaller, but once a certain texture is smaller 'ALL' of the sprites that use that texture becomes smaller. How can I fix this? My loading function is as below export function loadImages() { PIXI.loader .add("tile_lumber", "../images/tile_lumber.svg") .add("tile_brick", "../images/tile_brick.svg") .add("tile_wool", "../images/tile_wool.svg") .add("tile_grain", "../images/tile_grain.svg") .add("tile_ore", "../images/tile_ore.svg") .add("tile_desert", "../images/tile_desert.svg") . . . .on("progress", loadProgressHandler) .load(GameUICore.setup); } export function setup() { assetsLoaded = true createContainers() GameUICards.setCardProps() //The cards on left bottom created here GameUIActions.createActions() GameUIPlayers.createPlayers() //The cards in bank created here createTimer() createKeyboardActions() app.ticker.add(function (delta) { animateObjects() }); } function animateObjects() { for (let view of animatingViews) { view.animate() } for (let line of animatingLines) { line.animate() } for (let text of animatingTexts) { text.animate() } removeObjectsWhoseAnimationFinished() } You can try to reproduce the problem:
  6. demiculus


    Hey all, I've finished creating a game with pixi.js I've asked a couple questions here the past few weeks and the game finally is working so I wanted to share it with you guys. Before, I had made the game with canvas & html/css. But now the whole game screen is with pixijs except for the chatbox. There may be some bugs left, but in 1-2 weeks it will work magnificently. Hop on to play some games Btw we're doing weekly updates to the game. So if you want to subscribe be my guest: Lastly I want to ask how can I make the resolution better without heating up the computer. Normal resolution: 2x resolution: The 2x resolution has width & height increased 2x resulting in 4x more drawing surface. While playing heats up my mac. But it looks much better, so I want to ask is there any other way I can increase the resolution? My images are all .svg so I thought maybe turning them to .png might work but even the Pixi.text's have low resolution.
  7. demiculus

    How to decrease heating up computer.

    I don't have many animations & most of my game UI is static(its a board game). So correct me if my understanding is wrong. Even when nothing moves on the screen PIXI draws everything on the canvas constantly, right? So it means every second PIXI draws everything 60 times. I have implemented this solution but my computer still heats up when I'm playing the game: What optimizations can I do?
  8. demiculus

    Libraries to use on Pixijs

    Note that kitty said not to use hexi, so I've decided to go just pixi.
  9. I posted on stackoverflow cause it is the default location where I ask programming issues. I thought I'd also post here. If that goes against the rules or something I'll be happy to be notified about it.
  10. demiculus

    Libraries to use on Pixijs

    @ivan.popelyshev my concern is that most of these libraries haven't been updated in the past year. I'm planing on using hexi and it has been updated on march and just some comments (nothing significant): Should I be worried that these frameworks aren't being updated?
  11. demiculus

    Libraries to use on Pixijs

    Hey guys, I've decided to use pixijs for my game. I've chosen it because I'm going to be making 2D boardgame and I like working with lower level codes instead of magic functions. My other option was phaser but it seems more magic and I want to be able to edit the frameworks I'm using. Anyhow I've ran across and played around with hexi( and liked it. I'm also aware of the 3 other engines here: I just wanted to make sure I'm not missing anything. Let me know what you think and which libraries I should use to make my boardgame. Thanks :)