enricosapicco

Members
  • Content Count

    8
  • Joined

  • Last visited

About enricosapicco

  • Rank
    Newbie

Recent Profile Visitors

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

  1. enricosapicco

    Font is not Rendered on Safari

    4.8.2
  2. enricosapicco

    Font is not Rendered on Safari

    I use a variation of Open Sans in the game. It works perfectly OK on Firefox and Chrome but Safari uses some default font instead of the font I use. Does anyone have any idea or had similar experience?
  3. Hey people; I have been developing a framework. I want to publish it as an npm package. I bundle my code with webpack on framework project and I am using bundled js file inside the game project which is bundled via browserify. I wanted to test it with different bundlers. My case is; On framework; the folder hieararchy is; -src --index.js -release --index.js Webpack bundles ./src/index.js to ./release/indes.js in ./src/index.js I have simplest code snippet as follows; module.exports = 'tattaratatta'; on game project that I use framework, I have app.js and bundle.js. on app.js inside the game project I have the following code; var fr = require('./../framework/release/index.js'); console.log(fr); this logs out an empty object. but when I change it to; var fr = require('./../framework/src/index.js'); console.log(fr); it logs out tattaratatta correctly. I watched some tutorials on youtube, read some tutorials online but can't find out what I am doing wrong. Appearently, I can't seem to require te module from the bundled file. Any idea?
  4. enricosapicco

    How on earth do I change the color of text?

    yourText.style = {fill: 0xffffff} or yourText.style = {fill: 0xred} also @meduzo's suggestion is valid in the same way.
  5. enricosapicco

    Loader.once('complete'... responds only after all asset are loaded

    @xerver first of all, thanks. Shortly after I posted this when I was browsing more on resource-loader code, I realized what you mentioned above. I realized that I didn't get the working logic of the loader correct. I changed it to something similar what you suggested above and it worked. Thanks a lot anyway!
  6. I have been trying to add a loading screen to my game. I know that I need to use .on('progress') and .once('complete') handlers. I run following code for loading an asset batch; assetManager.loadImageBatch = function(args, callback){ var ctr = 0; var toLoad = args.assets.length; args.assets.forEach(elm=>{ loadFile(elm.name, args.pathPrefix + elm.path); }) function loadFile(name, path){ assetManager.loader.add(name, path); assetManager.loader.once('complete', loadCallback); assetManager.loader.load(); } function loadCallback(){ console.log("loading"); ctr++; if(ctr == toLoad) callback(); } } it runs ok, loads all assets but as it has to log "loading" after loading each asset, it logs it after loading the whole asset batch. I tested it on both local and on my website. It results the same, nothing to do with download speed or whatsoever. I googled about loading screen usage on pixi but I wasn't able to find anything useful. Any thoughts?
  7. enricosapicco

    RenderTexture for Tile-Maps - Any Downsides?

    I am using renderTexture for tilingSprite for slot game reels. The performance is good enough so far. Each tilingSprite contains 20 textures combined on 144*144 resolution, it masks out the area for 3 sprites. It runs smooth even when the spin speed is on top. I haven't experienced any kind of latency. Considering there are 5 reels, the performance is satisfying.
  8. I am making a slot game and used tiling sprite for reels. It works fine but when I spin the slot and switch the tab on chrome, it doesn't keep running. When I switch it back to the game tab, it continues from the previous state before tab change. I assume framework or webGL is doing it just to enhance performance and not to use resources when the tab is inactive. But players may want to play with autoplay and switch the tab during it. So is there any known way to keep it running when the tab is passive?