Jump to content

enricosapicco

Members
  • Content Count

    8
  • Joined

  • Last visited

Everything posted by enricosapicco

  1. 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?
  2. 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 hav
  3. yourText.style = {fill: 0xffffff} or yourText.style = {fill: 0xred} also @meduzo's suggestion is valid in the same way.
  4. @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!
  5. 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")
  6. 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.
  7. 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?
×
×
  • Create New...