diff --git a/harkka2/phaser3-tutorial/part10.html b/harkka2/phaser-game-1.html similarity index 100% rename from harkka2/phaser3-tutorial/part10.html rename to harkka2/phaser-game-1.html diff --git a/harkka2/phaser3-tutorial/assets/bomb.png b/harkka2/phaser3-tutorial/assets/bomb.png deleted file mode 100644 index 28a0fbbddc37fd0a6872bbd170cbebdc81e7f597..0000000000000000000000000000000000000000 Binary files a/harkka2/phaser3-tutorial/assets/bomb.png and /dev/null differ diff --git a/harkka2/phaser3-tutorial/assets/dude.png b/harkka2/phaser3-tutorial/assets/dude.png deleted file mode 100644 index 6b35f4b4b1b00e757700e0852b8527200e82c538..0000000000000000000000000000000000000000 Binary files a/harkka2/phaser3-tutorial/assets/dude.png and /dev/null differ diff --git a/harkka2/phaser3-tutorial/assets/platform.png b/harkka2/phaser3-tutorial/assets/platform.png deleted file mode 100644 index 1e4a3f86d7311592c4fdd257daaf21db4176dd21..0000000000000000000000000000000000000000 Binary files a/harkka2/phaser3-tutorial/assets/platform.png and /dev/null differ diff --git a/harkka2/phaser3-tutorial/assets/sky.png b/harkka2/phaser3-tutorial/assets/sky.png deleted file mode 100644 index 5972639f229c7362edac856b42b86b93811ef3f2..0000000000000000000000000000000000000000 Binary files a/harkka2/phaser3-tutorial/assets/sky.png and /dev/null differ diff --git a/harkka2/phaser3-tutorial/assets/star.png b/harkka2/phaser3-tutorial/assets/star.png deleted file mode 100644 index bfc2d298426648f2a31e48db711b84a9962af703..0000000000000000000000000000000000000000 Binary files a/harkka2/phaser3-tutorial/assets/star.png and /dev/null differ diff --git a/harkka2/phaser3-tutorial/part1.html b/harkka2/phaser3-tutorial/part1.html deleted file mode 100644 index 3a7aaccc90bd19043555e4a91d38e96fc7ea0f5e..0000000000000000000000000000000000000000 --- a/harkka2/phaser3-tutorial/part1.html +++ /dev/null @@ -1,45 +0,0 @@ -<!doctype html> -<html lang="en"> -<head> - <meta charset="UTF-8" /> - <title>Making your first Phaser 3 Game - Part 1</title> - <script src="//cdn.jsdelivr.net/npm/phaser@3.11.0/dist/phaser.js"></script> - <style type="text/css"> - body { - margin: 0; - } - </style> -</head> -<body> - -<script type="text/javascript"> - - var config = { - type: Phaser.AUTO, - width: 800, - height: 600, - scene: { - preload: preload, - create: create, - update: update - } - }; - - var game = new Phaser.Game(config); - - function preload () - { - } - - function create () - { - } - - function update () - { - } - -</script> - -</body> -</html> \ No newline at end of file diff --git a/harkka2/phaser3-tutorial/part2.html b/harkka2/phaser3-tutorial/part2.html deleted file mode 100644 index 115d3784e854855ea88d737b475a68215b9e9bef..0000000000000000000000000000000000000000 --- a/harkka2/phaser3-tutorial/part2.html +++ /dev/null @@ -1,50 +0,0 @@ -<!doctype html> -<html lang="en"> -<head> - <meta charset="UTF-8" /> - <title>Making your first Phaser 3 Game - Part 2</title> - <script src="//cdn.jsdelivr.net/npm/phaser@3.11.0/dist/phaser.js"></script> - <style type="text/css"> - body { - margin: 0; - } - </style> -</head> -<body> - -<script type="text/javascript"> - - var config = { - type: Phaser.AUTO, - width: 800, - height: 600, - scene: { - preload: preload, - create: create, - update: update - } - }; - - var game = new Phaser.Game(config); - - function preload () - { - this.load.image('sky', 'assets/sky.png'); - this.load.image('ground', 'assets/platform.png'); - this.load.image('star', 'assets/star.png'); - this.load.image('bomb', 'assets/bomb.png'); - this.load.spritesheet('dude', 'assets/dude.png', { frameWidth: 32, frameHeight: 48 }); - } - - function create () - { - } - - function update () - { - } - -</script> - -</body> -</html> \ No newline at end of file diff --git a/harkka2/phaser3-tutorial/part3.html b/harkka2/phaser3-tutorial/part3.html deleted file mode 100644 index 0f884330feb282734d0e95beaf0b70bd73b48056..0000000000000000000000000000000000000000 --- a/harkka2/phaser3-tutorial/part3.html +++ /dev/null @@ -1,51 +0,0 @@ -<!doctype html> -<html lang="en"> -<head> - <meta charset="UTF-8" /> - <title>Making your first Phaser 3 Game - Part 3</title> - <script src="//cdn.jsdelivr.net/npm/phaser@3.11.0/dist/phaser.js"></script> - <style type="text/css"> - body { - margin: 0; - } - </style> -</head> -<body> - -<script type="text/javascript"> - - var config = { - type: Phaser.AUTO, - width: 800, - height: 600, - scene: { - preload: preload, - create: create, - update: update - } - }; - - var game = new Phaser.Game(config); - - function preload () - { - this.load.image('sky', 'assets/sky.png'); - this.load.image('ground', 'assets/platform.png'); - this.load.image('star', 'assets/star.png'); - this.load.image('bomb', 'assets/bomb.png'); - this.load.spritesheet('dude', 'assets/dude.png', { frameWidth: 32, frameHeight: 48 }); - } - - function create () - { - this.add.image(400, 300, 'sky'); - } - - function update () - { - } - -</script> - -</body> -</html> \ No newline at end of file diff --git a/harkka2/phaser3-tutorial/part4.html b/harkka2/phaser3-tutorial/part4.html deleted file mode 100644 index 3cc10e857318fc5d2785ca6afb09d16b1884034a..0000000000000000000000000000000000000000 --- a/harkka2/phaser3-tutorial/part4.html +++ /dev/null @@ -1,70 +0,0 @@ -<!doctype html> -<html lang="en"> -<head> - <meta charset="UTF-8" /> - <title>Making your first Phaser 3 Game - Part 4</title> - <script src="//cdn.jsdelivr.net/npm/phaser@3.11.0/dist/phaser.js"></script> - <style type="text/css"> - body { - margin: 0; - } - </style> -</head> -<body> - -<script type="text/javascript"> - - var config = { - type: Phaser.AUTO, - width: 800, - height: 600, - physics: { - default: 'arcade', - arcade: { - gravity: { y: 300 }, - debug: false - } - }, - scene: { - preload: preload, - create: create, - update: update - } - }; - - var platforms; - - var game = new Phaser.Game(config); - - function preload () - { - this.load.image('sky', 'assets/sky.png'); - this.load.image('ground', 'assets/platform.png'); - this.load.image('star', 'assets/star.png'); - this.load.image('bomb', 'assets/bomb.png'); - this.load.spritesheet('dude', 'assets/dude.png', { frameWidth: 32, frameHeight: 48 }); - } - - var platforms; - - function create () - { - this.add.image(400, 300, 'sky'); - - platforms = this.physics.add.staticGroup(); - - platforms.create(400, 568, 'ground').setScale(2).refreshBody(); - - platforms.create(600, 400, 'ground'); - platforms.create(50, 250, 'ground'); - platforms.create(750, 220, 'ground'); - } - - function update () - { - } - -</script> - -</body> -</html> \ No newline at end of file diff --git a/harkka2/phaser3-tutorial/part5.html b/harkka2/phaser3-tutorial/part5.html deleted file mode 100644 index 10b8fa707ac754d729aa777e78a3840f9af1c012..0000000000000000000000000000000000000000 --- a/harkka2/phaser3-tutorial/part5.html +++ /dev/null @@ -1,94 +0,0 @@ -<!doctype html> -<html lang="en"> -<head> - <meta charset="UTF-8" /> - <title>Making your first Phaser 3 Game - Part 5</title> - <script src="//cdn.jsdelivr.net/npm/phaser@3.11.0/dist/phaser.js"></script> - <style type="text/css"> - body { - margin: 0; - } - </style> -</head> -<body> - -<script type="text/javascript"> - - var config = { - type: Phaser.AUTO, - width: 800, - height: 600, - physics: { - default: 'arcade', - arcade: { - gravity: { y: 300 }, - debug: false - } - }, - scene: { - preload: preload, - create: create, - update: update - } - }; - - var player; - var platforms; - - var game = new Phaser.Game(config); - - function preload () - { - this.load.image('sky', 'assets/sky.png'); - this.load.image('ground', 'assets/platform.png'); - this.load.image('star', 'assets/star.png'); - this.load.image('bomb', 'assets/bomb.png'); - this.load.spritesheet('dude', 'assets/dude.png', { frameWidth: 32, frameHeight: 48 }); - } - - function create () - { - this.add.image(400, 300, 'sky'); - - platforms = this.physics.add.staticGroup(); - - platforms.create(400, 568, 'ground').setScale(2).refreshBody(); - - platforms.create(600, 400, 'ground'); - platforms.create(50, 250, 'ground'); - platforms.create(750, 220, 'ground'); - - player = this.physics.add.sprite(100, 450, 'dude'); - - player.setBounce(0.2); - player.setCollideWorldBounds(true); - - this.anims.create({ - key: 'left', - frames: this.anims.generateFrameNumbers('dude', { start: 0, end: 3 }), - frameRate: 10, - repeat: -1 - }); - - this.anims.create({ - key: 'turn', - frames: [ { key: 'dude', frame: 4 } ], - frameRate: 20 - }); - - this.anims.create({ - key: 'right', - frames: this.anims.generateFrameNumbers('dude', { start: 5, end: 8 }), - frameRate: 10, - repeat: -1 - }); - } - - function update () - { - } - -</script> - -</body> -</html> \ No newline at end of file diff --git a/harkka2/phaser3-tutorial/part6.html b/harkka2/phaser3-tutorial/part6.html deleted file mode 100644 index fad2192711eeeb4a3acbcf7f54738723c6f460be..0000000000000000000000000000000000000000 --- a/harkka2/phaser3-tutorial/part6.html +++ /dev/null @@ -1,96 +0,0 @@ -<!doctype html> -<html lang="en"> -<head> - <meta charset="UTF-8" /> - <title>Making your first Phaser 3 Game - Part 6</title> - <script src="//cdn.jsdelivr.net/npm/phaser@3.11.0/dist/phaser.js"></script> - <style type="text/css"> - body { - margin: 0; - } - </style> -</head> -<body> - -<script type="text/javascript"> - - var config = { - type: Phaser.AUTO, - width: 800, - height: 600, - physics: { - default: 'arcade', - arcade: { - gravity: { y: 300 }, - debug: false - } - }, - scene: { - preload: preload, - create: create, - update: update - } - }; - - var player; - var platforms; - - var game = new Phaser.Game(config); - - function preload () - { - this.load.image('sky', 'assets/sky.png'); - this.load.image('ground', 'assets/platform.png'); - this.load.image('star', 'assets/star.png'); - this.load.image('bomb', 'assets/bomb.png'); - this.load.spritesheet('dude', 'assets/dude.png', { frameWidth: 32, frameHeight: 48 }); - } - - function create () - { - this.add.image(400, 300, 'sky'); - - platforms = this.physics.add.staticGroup(); - - platforms.create(400, 568, 'ground').setScale(2).refreshBody(); - - platforms.create(600, 400, 'ground'); - platforms.create(50, 250, 'ground'); - platforms.create(750, 220, 'ground'); - - player = this.physics.add.sprite(100, 450, 'dude'); - - player.setBounce(0.2); - player.setCollideWorldBounds(true); - - this.anims.create({ - key: 'left', - frames: this.anims.generateFrameNumbers('dude', { start: 0, end: 3 }), - frameRate: 10, - repeat: -1 - }); - - this.anims.create({ - key: 'turn', - frames: [ { key: 'dude', frame: 4 } ], - frameRate: 20 - }); - - this.anims.create({ - key: 'right', - frames: this.anims.generateFrameNumbers('dude', { start: 5, end: 8 }), - frameRate: 10, - repeat: -1 - }); - - this.physics.add.collider(player, platforms); - } - - function update () - { - } - -</script> - -</body> -</html> \ No newline at end of file diff --git a/harkka2/phaser3-tutorial/part7.html b/harkka2/phaser3-tutorial/part7.html deleted file mode 100644 index 4e1d6cdc65177892d44a6840aba9c785db41fb3e..0000000000000000000000000000000000000000 --- a/harkka2/phaser3-tutorial/part7.html +++ /dev/null @@ -1,122 +0,0 @@ -<!doctype html> -<html lang="en"> -<head> - <meta charset="UTF-8" /> - <title>Making your first Phaser 3 Game - Part 7</title> - <script src="//cdn.jsdelivr.net/npm/phaser@3.11.0/dist/phaser.js"></script> - <style type="text/css"> - body { - margin: 0; - } - </style> -</head> -<body> - -<script type="text/javascript"> - - var config = { - type: Phaser.AUTO, - width: 800, - height: 600, - physics: { - default: 'arcade', - arcade: { - gravity: { y: 300 }, - debug: false - } - }, - scene: { - preload: preload, - create: create, - update: update - } - }; - - var player; - var platforms; - var cursors; - - var game = new Phaser.Game(config); - - function preload () - { - this.load.image('sky', 'assets/sky.png'); - this.load.image('ground', 'assets/platform.png'); - this.load.image('star', 'assets/star.png'); - this.load.image('bomb', 'assets/bomb.png'); - this.load.spritesheet('dude', 'assets/dude.png', { frameWidth: 32, frameHeight: 48 }); - } - - function create () - { - this.add.image(400, 300, 'sky'); - - platforms = this.physics.add.staticGroup(); - - platforms.create(400, 568, 'ground').setScale(2).refreshBody(); - - platforms.create(600, 400, 'ground'); - platforms.create(50, 250, 'ground'); - platforms.create(750, 220, 'ground'); - - player = this.physics.add.sprite(100, 450, 'dude'); - - player.setBounce(0.2); - player.setCollideWorldBounds(true); - - this.anims.create({ - key: 'left', - frames: this.anims.generateFrameNumbers('dude', { start: 0, end: 3 }), - frameRate: 10, - repeat: -1 - }); - - this.anims.create({ - key: 'turn', - frames: [ { key: 'dude', frame: 4 } ], - frameRate: 20 - }); - - this.anims.create({ - key: 'right', - frames: this.anims.generateFrameNumbers('dude', { start: 5, end: 8 }), - frameRate: 10, - repeat: -1 - }); - - cursors = this.input.keyboard.createCursorKeys(); - - this.physics.add.collider(player, platforms); - } - - function update () - { - if (cursors.left.isDown) - { - player.setVelocityX(-160); - - player.anims.play('left', true); - } - else if (cursors.right.isDown) - { - player.setVelocityX(160); - - player.anims.play('right', true); - } - else - { - player.setVelocityX(0); - - player.anims.play('turn'); - } - - if (cursors.up.isDown && player.body.touching.down) - { - player.setVelocityY(-330); - } - } - -</script> - -</body> -</html> \ No newline at end of file diff --git a/harkka2/phaser3-tutorial/part8.html b/harkka2/phaser3-tutorial/part8.html deleted file mode 100644 index 75bf1fec1458deea54d76003e851ee08e98b9954..0000000000000000000000000000000000000000 --- a/harkka2/phaser3-tutorial/part8.html +++ /dev/null @@ -1,143 +0,0 @@ -<!doctype html> -<html lang="en"> -<head> - <meta charset="UTF-8" /> - <title>Making your first Phaser 3 Game - Part 8</title> - <script src="//cdn.jsdelivr.net/npm/phaser@3.11.0/dist/phaser.js"></script> - <style type="text/css"> - body { - margin: 0; - } - </style> -</head> -<body> - -<script type="text/javascript"> - - var config = { - type: Phaser.AUTO, - width: 800, - height: 600, - physics: { - default: 'arcade', - arcade: { - gravity: { y: 300 }, - debug: false - } - }, - scene: { - preload: preload, - create: create, - update: update - } - }; - - var player; - var stars; - var platforms; - var cursors; - - var game = new Phaser.Game(config); - - function preload () - { - this.load.image('sky', 'assets/sky.png'); - this.load.image('ground', 'assets/platform.png'); - this.load.image('star', 'assets/star.png'); - this.load.image('bomb', 'assets/bomb.png'); - this.load.spritesheet('dude', 'assets/dude.png', { frameWidth: 32, frameHeight: 48 }); - } - - function create () - { - this.add.image(400, 300, 'sky'); - - platforms = this.physics.add.staticGroup(); - - platforms.create(400, 568, 'ground').setScale(2).refreshBody(); - - platforms.create(600, 400, 'ground'); - platforms.create(50, 250, 'ground'); - platforms.create(750, 220, 'ground'); - - player = this.physics.add.sprite(100, 450, 'dude'); - - player.setBounce(0.2); - player.setCollideWorldBounds(true); - - this.anims.create({ - key: 'left', - frames: this.anims.generateFrameNumbers('dude', { start: 0, end: 3 }), - frameRate: 10, - repeat: -1 - }); - - this.anims.create({ - key: 'turn', - frames: [ { key: 'dude', frame: 4 } ], - frameRate: 20 - }); - - this.anims.create({ - key: 'right', - frames: this.anims.generateFrameNumbers('dude', { start: 5, end: 8 }), - frameRate: 10, - repeat: -1 - }); - - cursors = this.input.keyboard.createCursorKeys(); - - stars = this.physics.add.group({ - key: 'star', - repeat: 11, - setXY: { x: 12, y: 0, stepX: 70 } - }); - - stars.children.iterate(function (child) { - - child.setBounceY(Phaser.Math.FloatBetween(0.4, 0.8)); - - }); - - this.physics.add.collider(player, platforms); - this.physics.add.collider(stars, platforms); - - this.physics.add.overlap(player, stars, collectStar, null, this); - } - - function update () - { - if (cursors.left.isDown) - { - player.setVelocityX(-160); - - player.anims.play('left', true); - } - else if (cursors.right.isDown) - { - player.setVelocityX(160); - - player.anims.play('right', true); - } - else - { - player.setVelocityX(0); - - player.anims.play('turn'); - } - - if (cursors.up.isDown && player.body.touching.down) - { - player.setVelocityY(-330); - } - } - - function collectStar (player, star) - { - star.disableBody(true, true); - } - -</script> - -</body> -</html> \ No newline at end of file diff --git a/harkka2/phaser3-tutorial/part9.html b/harkka2/phaser3-tutorial/part9.html deleted file mode 100644 index fb9b4581ab2c9bad990919d36c1723b93ba3cfe7..0000000000000000000000000000000000000000 --- a/harkka2/phaser3-tutorial/part9.html +++ /dev/null @@ -1,150 +0,0 @@ -<!doctype html> -<html lang="en"> -<head> - <meta charset="UTF-8" /> - <title>Making your first Phaser 3 Game - Part 9</title> - <script src="//cdn.jsdelivr.net/npm/phaser@3.11.0/dist/phaser.js"></script> - <style type="text/css"> - body { - margin: 0; - } - </style> -</head> -<body> - -<script type="text/javascript"> - - var config = { - type: Phaser.AUTO, - width: 800, - height: 600, - physics: { - default: 'arcade', - arcade: { - gravity: { y: 300 }, - debug: false - } - }, - scene: { - preload: preload, - create: create, - update: update - } - }; - - var player; - var stars; - var platforms; - var cursors; - var score = 0; - var scoreText; - - var game = new Phaser.Game(config); - - function preload () - { - this.load.image('sky', 'assets/sky.png'); - this.load.image('ground', 'assets/platform.png'); - this.load.image('star', 'assets/star.png'); - this.load.image('bomb', 'assets/bomb.png'); - this.load.spritesheet('dude', 'assets/dude.png', { frameWidth: 32, frameHeight: 48 }); - } - - function create () - { - this.add.image(400, 300, 'sky'); - - platforms = this.physics.add.staticGroup(); - - platforms.create(400, 568, 'ground').setScale(2).refreshBody(); - - platforms.create(600, 400, 'ground'); - platforms.create(50, 250, 'ground'); - platforms.create(750, 220, 'ground'); - - player = this.physics.add.sprite(100, 450, 'dude'); - - player.setBounce(0.2); - player.setCollideWorldBounds(true); - - this.anims.create({ - key: 'left', - frames: this.anims.generateFrameNumbers('dude', { start: 0, end: 3 }), - frameRate: 10, - repeat: -1 - }); - - this.anims.create({ - key: 'turn', - frames: [ { key: 'dude', frame: 4 } ], - frameRate: 20 - }); - - this.anims.create({ - key: 'right', - frames: this.anims.generateFrameNumbers('dude', { start: 5, end: 8 }), - frameRate: 10, - repeat: -1 - }); - - cursors = this.input.keyboard.createCursorKeys(); - - stars = this.physics.add.group({ - key: 'star', - repeat: 11, - setXY: { x: 12, y: 0, stepX: 70 } - }); - - stars.children.iterate(function (child) { - - child.setBounceY(Phaser.Math.FloatBetween(0.4, 0.8)); - - }); - - scoreText = this.add.text(16, 16, 'score: 0', { fontSize: '32px', fill: '#000' }); - - this.physics.add.collider(player, platforms); - this.physics.add.collider(stars, platforms); - - this.physics.add.overlap(player, stars, collectStar, null, this); - } - - function update () - { - if (cursors.left.isDown) - { - player.setVelocityX(-160); - - player.anims.play('left', true); - } - else if (cursors.right.isDown) - { - player.setVelocityX(160); - - player.anims.play('right', true); - } - else - { - player.setVelocityX(0); - - player.anims.play('turn'); - } - - if (cursors.up.isDown && player.body.touching.down) - { - player.setVelocityY(-330); - } - } - - function collectStar (player, star) - { - star.disableBody(true, true); - - score += 10; - scoreText.setText('Score: ' + score); - } - -</script> - -</body> -</html> \ No newline at end of file