beancoder

Members
  • Content Count

    6
  • Joined

  • Last visited

About beancoder

  • Rank
    Newbie
  • Birthday January 26

Contact Methods

  • Website URL
    beancoder.com
  • Twitter
    akshay2626

Profile Information

  • Gender
    Male
  • Location
    India

Recent Profile Visitors

940 profile views
  1. <!doctype html> <html> <head> <meta charset="UTF-8" /> <title>M N B</title> <script src="js/phaser.js"></script> </head> <body> <script type="text/javascript"> window.onload = function() { var width = window.screen.width; var availwidth = window.screen.availWidth; var height = window.screen.height; var availheight = window.screen.availHeight; var textStyle = { font: "20px Arial", fill: "#ffffff"}; var game = new Phaser.Game(availwidth , availheight, Phaser.AUTO, '', { preload: preload, create: create, update: update }); function preload () { //game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; game.load.image('red','assets/red.png'); game.load.image('green','assets/green.png'); } function create () { game.stage.backgroundColor = "000000"; var graphics = game.add.graphics(0,0); graphics.lineStyle(1,0xffffff,1); var box_width = (availwidth/10)-5; var box_height = (availheight/10)-5; last_start = box_width*10; last_end = box_height*10; //draw vertical lines for(var i=0;i<=last_start;i+=box_width){ graphics.moveTo(i,0); graphics.lineTo(i,last_end); } //draw horizontal lines for(var j=0;j<=last_end;j+=box_height){ graphics.moveTo(0,j); graphics.lineTo(last_start,j); } } function update(){ } }; </script> </body> </html> When I run the above code, and emulate it in Google Nexus 7 using Intel XDK, it does not show the last horizontal line (image below) On the other hand, when I emulate it in Apple Ipad (image below), it shows the complete grid perfectly (even though I need to scroll down to see the last line) Ques 1: Why is the above difference coming? Ques 2: Why is there a scrollbar coming when I am scaling the content properly? Thanks in advance.
  2. Hi, I just want to ask something. I have made a game where I have used canvas to make a string. Basically the canvas is a line which behaves as a string. So what I want to do is detect when the string(i.e. canvas) collides with coin tiles on the tilemap. how can I use game physics and collide functions between canvas and a tilemap layer? (Not a sprite and tilemap). Please help.
  3. Understanding phaser..

  4. I want to get the tile number from the user input coordinates! I want to detect the tile number from where the mouse points to.. Can I do that? Something like getTileNumber(input.x,input.y); Please help
  5. Okay thanks.. I am new to phaser so need a simpler method. Or maybe some example.
  6. I have the following code. var color = bitmap.getPixel32(Math.round(nodes.x),Math.round(nodes.y)); Now I want to implement the same thing in Tilemap instead of bitmap! I tried var color = tilemap.getPixel32(Math.round(nodes.x),Math.round(nodes.y)); but didn't work. Any idea?
  7. Hi, I want to give 20 FREE coupons to my HTML5 App Development course which costs $25 on Udemy! FREE COUPON LINK BELOW. https://www.udemy.com/build-3-web-applications-in-90-minutes/?couponCode=FREECOURSE