Stephan

Members
  • Content Count

    146
  • Joined

  • Last visited

  • Days Won

    1

Stephan last won the day on October 15 2014

Stephan had the most liked content!

2 Followers

About Stephan

  • Rank
    Advanced Member

Recent Profile Visitors

2233 profile views
  1. Hi, I would like to add to propose the following small update to the joystick plugin in order to make it compatible with hires scaling: var radius = this.bg.shapes[0].shape.radius / 2; must become: var radius = this.bg.shapes[0].shape.radius / 2 / game.scale; could you update this @enpu? Thanks!
  2. quick fix for the time being: you can change the spine version in spine settings => Version =>to 3.7.x (dropdown) and it should work again.
  3. Yep, I also see a change in the spine.json file in my own spine.json files that include skins. This should definitely be fixed soon!
  4. Hi @enpu I have a small request for the Spine plugin. In the previous version of Panda there used to be a property animationSpeed that could be used to alter the speed of the spine animation. I noticed that this prop is lacking in the current version of tne plugin. It was easy enough to add myself but since the plugin is not open source, I cannot create a pull request for you. Could you add the following code to the plugin? spine.js game.createClass('Spine', 'Container', { ... animationSpeed: 1, ... updateTransform: function() { this.state.update(game.delta * this.animationSpeed); ... } }) Thanx, Stephan
  5. Great! Glad I could help you. 😊
  6. hi, Have you set up the code in Mainscene correctly? It should look something like this: add world this.world = new game.Physics({ gravity: [0, 1], }); //add eventhandler collision this.world.on("beginContact",function(event){ if(typeof event.bodyA.collide !== 'undefined'){ event.bodyA.collide(event.bodyB); } if(typeof event.bodyB.collide !== 'undefined'){ event.bodyB.collide(event.bodyA); } });
  7. Hi @enpu, I just encountered en fixed a small bug in the p2 pulgin. Since it is not open source, I cannot create a pull request so I decided to post it here instead: p2.js line 13876: context.rect( -shape.width / 2 * body.world.ratio, -shape.height / 2 * body.world.ratio, shape.width * body.world.ratio * game.scale, shape.height * body.world.ratio * game.scale ); should be: context.rect( -shape.width / 2 * body.world.ratio * game.scale, -shape.height / 2 * body.world.ratio * game.scale, shape.width * body.world.ratio * game.scale, shape.height * body.world.ratio * game.scale ); Hope this is helpful. Stephan
  8. I just had another look at the problem and I think it is a small bug in the engine. I just posted a pull request for the develop branch to fix the problem.
  9. Hi, I just came across a small hires problem when drawing graphics. settings: game.config = { name: '', system: { width: 150, height: 100, scale: false, center: true, resize: false, hires: 1 }, mobile: { } }; the code: var grap = new game.Graphics().addTo(this.stage); //red shape with bezier curve grap.fillColor = '#ff0000'; grap.drawPolygon([ {x: 0, y: 0}, [50, 0, 50, 0, 50, 20], //this is a bezier curve! {x: 50, y: 40}, {x: 0, y: 40}, {x: 0, y: 0}, ]); //white shape to show the intended outline points grap.fillColor = '#99cc99'; grap.fillAlpha = 0; grap.lineColor = '#ffffff' grap.lineWidth = 2; grap.drawPolygon([ {x: 0, y: 0}, {x: 50, y: 20}, {x: 50, y: 40}, {x: 0, y: 40}, {x: 0, y: 0}, ]); This is the shape @ hires=1x (as it should be drawn): And here is with hires=4: Am I doing anything silly here or might this be a bug? It appears that the coordinated are not translated to the hires scale... Thanx, Stephan
  10. thank you so much again for this quick update! It works perfectly now. 😃
  11. oh, sure. Forgot about that... Here it is attached. example.zip
  12. hi @enpu, It looks like I found another small problem with TilingSprites when hires is enabled. config file: game.config = { system: { width: 320, height: 320, scale: false, center: true, resize: false, hires: 2 } }; This is the code. (I added panda@2x.png to the media folder) game.module( 'game.main' ) .body(function() { game.addAsset('panda.png') game.createScene('Main', { init: function() { this.sprite = new game.TilingSprite('panda.png', game.width, game.height).addTo(this.stage); }, update: function() { this.sprite.tilePosition.x -= 100 * game.delta; } }); }); The background now has a gap when it is moved to the left. (This gap is sequential).
  13. Thanks for your quick response. It works perfectly!
  14. Hi @enpu, I just encountered a bug in the TimingSprite class. It appears when you try to add multiple tiles to the game.: game.module( 'game.main' ) .body(function() { game.addAsset('panda.png') game.addAsset('cloud1.png') game.createScene('Main', { init: function() { this.sprite = new game.TilingSprite('panda.png', game.width, game.height).addTo(this.stage); //this semi-transparent tile replaces the texture of the first tile! this.sprite2 = new game.TilingSprite('cloud1.png', game.width, game.height).addTo(this.stage); //this however does work //this.sprite2 = new game.Sprite('cloud1.png').addTo(this.stage); }, }); }); I added an example project as attachment so you can reproduce the problem easily 😊 example.zip