Category : game-physics

I tried set my path with link from web and path of PC and didn’t work, ever display this green square my screen: My game.ejs file: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <script src="//cdn.jsdelivr.net/npm/[email protected]/dist/phaser.js"></script> <script src="//cdn.jsdelivr.net/npm/[email protected]/dist/phaser.min.js"></script> <title>Document</title> </head> <body> <script> const config = { type: Phaser.AUTO, width: ..

Read more

/* Constants for bricks */ var NUM_ROWS = 8; var BRICK_TOP_OFFSET = 10; var BRICK_SPACING = 2; var NUM_BRICKS_PER_ROW = 10; var BRICK_HEIGHT = 10; var SPACE_FOR_BRICKS = getWidth() – (NUM_BRICKS_PER_ROW + 1) * BRICK_SPACING; var BRICK_WIDTH = SPACE_FOR_BRICKS / NUM_BRICKS_PER_ROW; var TOTAL_BRICKS; var CURRENT_ROW=1; var brickX = 0 + BRICK_SPACING; var brickY = 0 ..

Read more