Phempt

Members
  • Content Count

    197
  • Joined

  • Last visited

  • Days Won

    2

Phempt last won the day on November 18 2014

Phempt had the most liked content!

About Phempt

  • Rank
    Advanced Member

Recent Profile Visitors

1,039 profile views
  1. Phempt

    Panda.js demos

    Enpu did a great job with panda!
  2. Phempt

    Texture

    I'll try thank you
  3. Phempt

    Texture

    Any idea?
  4. Oh my god, I really hate android, this code will works: HEAD: var ua = navigator.userAgent.toLowerCase(); isAndroid = ua.indexOf("android") > -1; $(document).ready(function(){ //alert(window.orientation); if(window.orientation == -90){ orientationValue = 1; }else if(window.orientation == 90){ orientationValue = 0; } $(window).on("orientationchange",function(){ if(window.orientation == -90){ orientationValue = 1; }else if(window.orientation == 90){ orientationValue = 0; } });});player.js: if (game.accelerometer) { if (game.accelerometer.y < -0.2 || game.accelerometer.y > 0.2){ if(orientationValue === 1){ if(isAndroid) { player.velocity.x -= game.accelerometer.y * game.system.delta * 100; }else{ player.velocity.x += game.accelerometer.y * game.system.delta * 100; } }else if(orientationValue === 0){ if(isAndroid) { player.velocity.x += game.accelerometer.y * game.system.delta * 100; }else{ player.velocity.x -= game.accelerometer.y * game.system.delta * 100; } } }else { player.velocity.x = 0; } }
  5. damn that code slowdown performance on Android (works perfectly on iOS)
  6. at the moment I used jQuery: $(document).ready(function(){ $(window).on("orientationchange",function(){ if(window.orientation == -90){ orientationValue = 1; }else if(window.orientation == 90){ orientationValue = 0; } });});but if there's a pandaJS function I'll change my code.
  7. is there a way to detect if landscape mode is with home button to the right or left? Because the accelerometer effect on sprite, it change based on this difference.
  8. Phempt

    detect collision problem

    probably it depends on PandaJS version. have a great day
  9. Phempt

    detect collision problem

    Hello mirage29, first of all: Welcome in order to debug your game add ?debugdraw to the end of the url. Example: http://yourhost.com/yourgame/index.html?debugdraw Than, is it possible to see the source? Can you upload it somewhere?
  10. Phempt

    Texture

    I used this: floorSprite = new game.Sprite('env/black.png'); floorSprite.width = floorShape.width; floorSprite.height = floorShape.height; floorSprite.position.x = floorBody.position.x; floorSprite.position.y = floorBody.position.y; floorSprite.anchor.set(0.5,0.5); floorSprite.addTo(game.scene.bgContainer); game.scene.addObject(floorSprite);is there a better way? because this method stretch a sprite to fill a shape, but it's not a repeatable texture.
  11. Phempt

    Texture

    Hello guys, is it possible to color a body shape with a repeatable texture? Something like: var floorBody = new game.Body({ position: { x: game.system.width / 2, y: game.system.height - 35 }, collisionGroup: 1 }); /* GAME STANDARD SHAPES & BODIES */ var floorShape = new game.Rectangle(game.system.width, 70); floorShape.TEXTURE = new game.sprite('env/black.jpg'); //something like this floorBody.addShape(floorShape); this.world.addBody(floorBody);
  12. Can I offer you a beer? Do you have a paypal account?!
  13. Hello guys, I want to move my sprite to left/right using the gyroscope/accelerometer. Is there something on panda to do this? Edit: Unfortunately the link here: http://www.html5gamedevs.com/topic/7064-how-to-use-accelerometer/?hl=accelerometer is offline.
  14. Phempt

    3D city in progress

    Good job
  15. Phempt

    [phonegap] Memtap - memory game

    Good luck with your game