• Content count

  • Joined

  • Last visited

About bubamara

  • Rank
    Advanced Member

Contact Methods

  • Website URL
  • Twitter

Profile Information

  • Gender
    Not Telling
  • Location

Recent Profile Visitors

836 profile views
  1. one or two layers of tiling sprites could do the trick. you can move background layer slowly than the layer above it -> nice parallax effect
  2. use the damn brim it does everything for you
  3. minimal-ui viewport property isn't there since iOS8 don't know what the game you linked is using, but there is : https://github.com/gajus/brim which you can use
  4. there is an extension for chrome WebGL inspector: https://chrome.google.com/webstore/detail/webgl-inspector/ogkcjmbhnfmlnielkjhedpcjomeaghda?hl=en it can show you used textures, buffers, programs and also draw calls
  5. Glad you didn't give up, fingers crossed!
  6. try increase filter.padding = 10;
  7. no, children are positioned above their parent. wrap gun & bunny into container var app = new PIXI.Application(800, 600, {backgroundColor : 0x1099bb}); document.body.appendChild(app.view); var bunnyContainer = new PIXI.Container(); bunnyContainer.x = app.renderer.width / 2; bunnyContainer.y = app.renderer.height / 2; app.stage.addChild(bunnyContainer); // gun var gun = PIXI.Sprite.fromImage('required/assets/basics/bunny.png') gun.tint = 0xFF0000; bunnyContainer.addChild(gun); // create a new Sprite from an image path var bunny = PIXI.Sprite.fromImage('required/assets/basics/bunny.png') bunny.anchor.set(0.5); bunnyContainer.addChild(bunny); // Listen for animate update app.ticker.add(function(delta) { bunnyContainer.rotation += 0.03 * delta; // just for fun, let's rotate mr rabbit a little // delta is 1 if running at 100% performance // creates frame-independent tranformation });
  8. I'm satisfied with Howler, using it in production - https://github.com/goldfire/howler.js/
  9. Maybe you can look at Chat Mapper. It's not free, but it's perfect for the job. If you'll be happy with their built-in HTML player, no coding is required at all. Or you can make story and dialogs in Chat Mapper (it exports json file) and use Pixi/Phaser for some visual effects.
  10. which format are you using? sparrow/starling is the correct one
  11. - you want to preload as much resources as possible before game starts (keep in mind that there are some memory limits). Not only because you can push already loaded assets to gpu mem and thus avoid lags but often you need to place one sprites next to each other based on their sizes. And you can not determine sprite size until it's texture has loaded - as mentioned above, you should be packing textures into atlases (TexturePacker is in my opinion the best one to use but there are alternatives you can check : ShoeBox and I'm sure you can google tons of others). Loading texture atlas is 2 http requests (json file and corresponding png file) comparing to X requests when loading textures separately. What's more important it's more performant way to show them on screen. - makes no sense to group assets to categories for loader, it will just help you with code readability. You should be grouping them into atlases by appereance on screen. If your game will be having followig layers : - background - player + enemies - UI elements group your textures accordingly. Ideally into single texture atlas and if that's not possible group them by layers so PIXI can make less draw calls. Remember that different devices can handle only certain texture resolution, see : http://webglstats.com/webgl/parameter/MAX_TEXTURE_SIZE 2048x2048 texture resolution is safe bet. Also using POT textures helps a lot in terms of performance - GPU's love them and mipmaps
  12. - yes, you need texture first. In your example you are assuming that texture already exists in PIXI.utils.TextureCache (that it has been previously loaded) PIXI.Application has been added to PIXI for simplicity reasons and it saves you some time while quick testing stuff. It does few things automatically for you, see http://pixijs.download/release/docs/PIXI.Application.html Example on how to create PIXI application, load an texture (see the notes in code), assign it to sprite and show it on the screen : https://jsfiddle.net/EneaEntertainment/9tfx8sq2/ Other approach without using built-in PIXI.Application is here : https://jsfiddle.net/EneaEntertainment/2rpuxbg0/ - not when using PIXI.Application - yes. First you need to feed loader with assets you want to load, then run it by calling load() - no, main purpose of loader is to load assets for you and as an addition it will create textures from them Usually you want to preload your assets before using them in scene and that's when loader steps in. Using the loader - https://jsfiddle.net/EneaEntertainment/5x6c3h4s/
  13. there has been change in resource loader recently, which isn't using event emitter anymore, but signals you need to change your code a little loader.onComplete.once(changeLookOnComplete);
  14. try this var desiredFPS = 25; var now; var then = Date.now(); var elapsed; var interval = 1000 / desiredFPS; updateLoop(); function updateLoop() { requestAnimationFrame(updateLoop); now = Date.now(); elapsed = now - then; if (elapsed > interval) { then = now - (elapsed % interval); updatePlayerPos(); renderer.render(rootStage); } }
  15. pixi-extra-filters

    increase filter.padding to give filter some extra space var f = new PIXI.filters.OutlineFilter(2, 0xFFFFFF); f.padding = 20; this.filters = [f]; https://jsfiddle.net/kt663amu/1/