Jump to content

Igor Georgiev

  • Content Count

  • Joined

  • Last visited

About Igor Georgiev

  • Rank
    Advanced Member
  • Birthday 12/22/1988

Profile Information

  • Gender
  • Location
    Sofia, Bulgaria

Recent Profile Visitors

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

  1. How about a script like this: var fs = require("fs"); var list = fs.readdirSync("game/static/assets/audio"); var dynamicAssets = "{\n \"paths\":\n ["; for (var i = 0; i < list.length; i++) { dynamicAssets += "\n \"/assets/audio/" + list[i] + "\","; } dynamicAssets = dynamicAssets.substr(0, dynamicAssets.length - 1) + "\n ]\n}"; fs.open('build/dynamicAssets.json', 'wx', (err, fd) => { if (err) { if (err.code === 'EEXIST') { console.log('dynamicAssets.json already exists'); return;
  2. Guys, after having a lot of troubles to load ttf/otf font in Phaser when using mozzila and edge (they were displaying properly in Chrome, btw), I found a workarround. just use this in the CSS: @font-face { font-family: 'fontname'; src: url("../assets/fonts/font.ttf") format("truetype") local('fontname'); } Then you just use this in the preload function: this.loadFontTF = new Phaser.Text(this.game, 0, 0, 'zzzzzzz', { font: "5px fontName" , fill:"#ea88e7"}); this.game.world.add(this.loadFontTF); this.loadFontTF.alpha = 0.01; this.loadFontTF = null
  3. Phaser is indeed a bit slugish with older devices, but it offers the complete package and that is normal. If you want something faster on old devices - use pixi and write everything you need yourself. Then you would have a tailored app for your needs.
  4. Hello again I managed to do it the following way: in index.html <body> <div id="content"> <div id="overlay"></div> </div> <script src="scripts/game.js"></script> <script src="scripts/pixi-particles.js"></script> </body> in main.css html { width: 100%; height: 110%; margin: 0px; } body { height: inherit; width: inherit; margin: 0px; display: flex; justify-content: center; align-items: center; background-color: #000000; } #overlay{ position: fixed; width: 100%; height: 2000px;
  5. It is not a meta tag, I think it is something more complicated. But I will investigate. Thank you, that seems to be a decent solution. Definitely worth the try. Although I was looking for a more plain JS solution, but if it works, why not. Interesting.... so if I have an overlaying div that is bigger and scroll-able and when scrolling the address bar shrinks, how do I know when to stop the scroll? Would it be a lot of trouble for you to provide a simple example? I kinda see your point, but I am wondering how I would know when to remove this div and how to keep the actual game d
  6. Hello guys. I am struggling with having my game to run on minimal-ui on iOS safari. That is where the address bar becomes smaller when you scroll. I have found a game that does that, but how the hell they do it? CLICK Does anyone know how to achieve this?
  7. Hello guys I am not sure if it is already mentioned, but I'd love to see integrated Scale 9 (9 patch) images support. Like the one in Starling framework There is a plugin like that, but it is not perfected. It is really useful for multi-resolution UI construction using small assets. I can try and translate the one from Starling if necessary.
  8. Looking for the same thing. I tried adding image to the game and then using that image, but it doesn't work.
  9. I understand now. Thank you for clarifying this for me
  10. does this method this.game.physics.arcade.overlap has to be in the update? Isn't it internally going through the update? It does not work if it is outside the update, so I guess this is the way to go.
  11. It is strange that it works during update. I don't think it is a good idea to set background color 60 times a sec. As for the game.physics.overlap, weird as well that it doesn't work for me as well, but I don't think it should be in the update method as well..... weird.
  12. Hey guys, I have made some scaling of the game via CSS so I can have my game always the proper size in the browser window. However, I lose my onInputDown because for some reason the game container overflows but visually is okay.... here is my CSS styling (visually it looks perfect): html { height: 100%; margin: 0; padding: 0; } body { height: 100%; margin: 0; padding: 0; } #content { height: 100%; } #content > canvas { margin: 0 auto; height: auto !important; width: auto !important; max-height: 100%; max-width: 100%; position: relative;
  • Create New...