• Content count

  • Joined

  • Last visited

1 Follower

About bubamara

  • Rank
    Advanced Member

Contact Methods

  • Website URL
  • Twitter

Profile Information

  • Gender
    Not Telling
  • Location

Recent Profile Visitors

939 profile views
  1. Strange Text Outlines? - Trying To Polish Beta1...

    http://pixijs.download/release/docs/PIXI.TextStyle.html The lineJoin property sets the type of corner created, it can resolve spiked text issues. Default is 'miter' (creates a sharp corner). try 'round'
  2. Drag from point which was clicked

    agree, examples should be more friendly to newcomers
  3. Drag from point which was clicked

    the reason why bunny pops to cursor position is bunny's anchor point. You need to store offset and use it while dragging bunny function onDragStart(event) { // store a reference to the data // the reason for this is because of multitouch // we want to track the movement of this particular touch this.data = event.data; this.alpha = 0.5; this.dragging = true; this.offX = this.x - this.data.getLocalPosition(this.parent).x; this.offY = this.y - this.data.getLocalPosition(this.parent).y; } function onDragMove() { if (this.dragging) { var newPosition = this.data.getLocalPosition(this.parent); this.x = newPosition.x + this.offX; this.y = newPosition.y + this.offY; } }
  4. Confused About Pre-Loading PNG Image Sprites...

    it comes from PIXI.loader : http://pixijs.download/dev/docs/PIXI.loaders.Loader.html PIXI.loader .add("images/treasureHunter.json") .load(setup); function setup(loader, resources) { var id = resources["images/treasureHunter.json"].textures; // object with generated textures (dungeon.png, door.png, ..) console.log(id); }
  5. Procedural Generated 2D Starfield

    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
  6. iOS soft fullscreen. How?

    use the damn brim it does everything for you
  7. iOS soft fullscreen. How?

    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
  8. Number of draw call

    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
  9. I'm starting a new documented journey in the world of games.

    Glad you didn't give up, fingers crossed!
  10. Strange Sprite Outline Filter Artifact

    try increase filter.padding = 10;
  11. Pixi Sprite children z-index

    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 });
  12. Sound Libs - SoundJS vs ?

    I'm satisfied with Howler, using it in production - https://github.com/goldfire/howler.js/
  13. Help a noob!

    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.
  14. How to win at PIXI.extras.BitmapText ?

    which format are you using? sparrow/starling is the correct one
  15. How Does Asset Loading Work With Pixi.js?

    - 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