Click Me!
+
+
+| Name | |
+|--------------|------------|
+| Jeongkyu Shin | Maintainer |
+| An yo Han | Student |
+| Beomsu Kwon | Student |
+| ChangSun Park | Student |
+| Cho Seung Hyun | Student |
+| Choi Byoung Ik | Student |
+| Choi Eun Chul | Student |
+| Chonghyon Yim | Student |
+| DeokYoung Kim | Student |
+| DongHyun Goh | Student |
+| DongHyun Kim | Student |
+| DongYeon Han | Student |
+| Goeun Kim | Student |
+| Gyujin Kim | Student |
+| Hanseo An | Student |
+| Hayeong Kim | Student |
+| Hochul Hwang | Student |
+| HyeonSik Kim | Student |
+| HyeongChang Lee | Student |
+| Ikjun Oh | Student |
+| JaeHyeon Park | Student |
+| JaeSun Park | Student |
+| Jaehun Kim | Student |
+| Jang Dong gun | Student |
+| Jang Si young | Student |
+| JangYoonHo | Student |
+| JeHyun Park | Student |
+| Jeong Eun Ji | Student |
+| Jeong Hwan Lim | Student |
+| Jeongmin Han | Student |
+| Jieun Kwon | Student |
+| Jin Hyeok Park | student |
+| JinYong Kim | Student |
+| Jiseon Lee | Student |
+| Jiyeon Park | Student |
+| Jiyoon Kim | Student |
+| Jong Hwi Wang | Student |
+| Jongmin Lee | Student |
+| Jun Sun Park | Student |
+| JunHo Choi | Student |
+| Junbeom Wi | Student |
+| Junhee Choi | Student |
+| Junseop Lee | Student |
+| Junyung Park | Student |
+| Kang Dong ho | Student |
+| Kim Jun Woo | Student |
+| Kyungkin You | Student |
+| Lee Eun Ah | student |
+| Lee Hyo Jeong | Student |
+| MinJae Kim | Student |
+| Minji Kim | Student |
+| Minji Ma | Student |
+| Minju Kim | Student |
+| MyoungSoo Kim | Student |
+| Namho Kim | Student |
+| Park Hyunseo | Student |
+| Park Jae Hyeon | Student |
+| Park Ji ho | Student |
+| Park Myung Chul | Student |
+| Sa Eun Soo | Student |
+| Sangwon Park | Student |
+| Sejin Eom | Student |
+| Semyeong Lee | Student |
+| Seogwon Kim | Student |
+| Seongbin Park | Student |
+| Seoyoung Kim | Student |
+| Seungho Kim | Student |
+| Seungmin Baek | Student |
+| Seyeon Lee | Student |
+| Shim Hyeonbo | Student |
+| Sieun Hwang | Student |
+| Soonwoo Kwon | Student |
+| Suelym Moon | Student |
+| Sujeong Lee | Student |
+| Sungjae An | Student |
+| Sungju Yun | Student |
+| Sergey Tsoy | Student |
+| Wonbae Kim | Student |
+| Yelim Park | student |
+| Yerim Seok | Student |
+| Jae Hyeon Park| Student|
+
+
+
+
+## Credit
+
+Originally developed by https://github.com/dbinebrink/gradius
+
Recreating Gradius 3 for the SNES, though of course a simplified version of it in JS, using the Phaser library.
diff --git a/game-logic.js b/game-logic.js
deleted file mode 100644
index 7a163a5..0000000
--- a/game-logic.js
+++ /dev/null
@@ -1,354 +0,0 @@
-// this generates the canvas tag on index.html with width/height attributes
-var game = new Phaser.Game(900, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create, update: update, render: render });
-
-function preload() {
-
- // load all sprites
- game.load.image('bullet', 'img/bullet.png');
- game.load.image('enemyBullet', 'img/enemy-bullet.png');
- game.load.spritesheet('invader', 'img/invader32x32x4.png', 32, 32);
- game.load.spritesheet('ship', 'img/ship64x64x5.png', 64, 64, 5);
- game.load.spritesheet('kaboom', 'img/explode.png', 128, 128);
- game.load.image('starfield', 'img/starfield.png');
-
- // load all sfx and music
- game.load.audio('music1', 'audio/gradius.mp3');
- game.load.audio('sfx_enemy_die', 'audio/enemy-die.wav');
- game.load.audio('sfx_fire', 'audio/fire.wav');
- game.load.audio('sfx_player_hit', 'audio/player-hit.wav');
-}
-
-
-var player;
-var aliens;
-var bullets;
-var bulletTime = 0;
-var cursors;
-var fireButton;
-var explosions;
-var starfield;
-var score = 0;
-var scoreString = '';
-var scoreText;
-var lives;
-var enemyBullet;
-var firingTimer = 0;
-var stateText;
-var livingEnemies = [];
-var music;
-var sfx_fire;
-var sfx_enemy_die;
-
-
-function create() {
-
- game.physics.startSystem(Phaser.Physics.ARCADE);
-
- music = game.add.audio('music1');
- music.volume = 0.4;
- music.play();
-
- // Here we set-up our audio sprites
- sfx_fire = game.add.audio('sfx_fire');
- sfx_fire.allowMultiple = false;
-
- sfx_player_hit = game.add.audio('sfx_player_hit');
- sfx_player_hit.allowMultiple = true;
-
- sfx_enemy_die = game.add.audio('sfx_enemy_die');
- sfx_enemy_die.allowMultiple = true;
-
- // The scrolling starfield background
- starfield = game.add.tileSprite(0, 0, 900, 600, 'starfield');
-
- // The starship
- player = game.add.sprite(100, 200, 'ship');
- player.anchor.setTo(0.5, 0.5);
- game.physics.enable(player, Phaser.Physics.ARCADE);
-
- // Our two animations, moving up and down.
- player.animations.add('up', [3, 4], 2, false);
- player.animations.add('down', [0, 1], 2, false);
-
- // Our bullet group
- bullets = game.add.group();
- bullets.enableBody = true;
- bullets.physicsBodyType = Phaser.Physics.ARCADE;
- bullets.createMultiple(30, 'bullet');
- bullets.setAll('anchor.x', 0.5);
- bullets.setAll('anchor.y', 1);
- bullets.setAll('outOfBoundsKill', true);
- bullets.setAll('checkWorldBounds', true);
-
- // The enemy's bullets
- enemyBullets = game.add.group();
- enemyBullets.enableBody = true;
- enemyBullets.physicsBodyType = Phaser.Physics.ARCADE;
- enemyBullets.createMultiple(30, 'enemyBullet');
- enemyBullets.setAll('anchor.x', 0.5);
- enemyBullets.setAll('anchor.y', 1);
- enemyBullets.setAll('outOfBoundsKill', true);
- enemyBullets.setAll('checkWorldBounds', true);
-
- // The bad guys
- aliens = game.add.group();
- aliens.enableBody = true;
- aliens.physicsBodyType = Phaser.Physics.ARCADE;
-
- createAliens();
-
- // The score
- scoreString = 'Score: ';
- scoreText = game.add.text(10, 10, scoreString + score, { font: '124px Arial', fill: '#fff' });
-
- // Lives
- lives = game.add.group();
- game.add.text(game.world.width - 100, 10, 'Health: ', { font: '24px Arial', fill: '#fff' });
-
- // Text
- stateText = game.add.text(game.world.centerX,game.world.centerY,' ', { font: '32px Arial', fill: '#fff' });
- stateText.anchor.setTo(0.5, 0.5);
- stateText.visible = false;
-
- for (var i = 0; i < 3; i++) {
- var ship = lives.create(game.world.width - 150 + (60 * i), 60, 'ship');
- ship.anchor.setTo(0.5, 0.5);
- ship.angle = 0;
- ship.alpha = 0.4;
- }
-
- // An explosion pool
- explosions = game.add.group();
- explosions.createMultiple(30, 'kaboom');
- explosions.forEach(setupInvader, this);
-
- // And some controls to play the game with
- cursors = game.input.keyboard.createCursorKeys();
- fireButton = game.input.keyboard.addKey(Phaser.Keyboard.SPACEBAR);
-
-}
-
-function update() {
-
- // Scroll the background
- starfield.tilePosition.x -= 3;
-
- if (player.alive) {
- // Reset the player, then check for movement keys
- player.body.velocity.setTo(0, 0);
-
- if (cursors.left.isDown) {
- player.body.velocity.x = -200;
- }
- else if (cursors.right.isDown) {
- player.body.velocity.x = 200;
- }
-
- // keyboard up/down
- if (cursors.up.isDown) {
- player.body.velocity.y = -200;
- player.animations.play('up');
- }
- else if (cursors.down.isDown) {
- player.body.velocity.y = 200;
- player.animations.play('down');
- }
- else { // stand still
- player.animations.stop();
- player.frame = 2;
- }
-
-
- // Firing?
- if (fireButton.isDown) {
- fireBullet();
- }
-
- if (game.time.now > firingTimer) {
- enemyFires();
- }
-
- // Run collision
- game.physics.arcade.overlap(bullets, aliens, collisionHandler, null, this);
- game.physics.arcade.overlap(enemyBullets, player, enemyHitsPlayer, null, this);
- }
-
-}
-
-
-function createAliens() {
- for (var y = 0; y < 3; y++) {
- for (var x = 0; x < 5; x++) {
- var alien = aliens.create(x * 48, y * 50, 'invader');
- alien.anchor.setTo(0.5, 0.5);
- alien.animations.add('fly', [ 0, 1, 2, 3 ], 20, true);
- alien.play('fly');
- alien.body.moves = false;
- }
- }
-
- aliens.x = 600;
- aliens.y = 250;
-
-
- // Start the invaders moving. Notice we're moving the Group they belong to, rather than the invaders directly.
- var tween = game.add.tween(aliens).to( { x: 400 }, 2000, Phaser.Easing.Linear.None, true, 0, 1000, true);
-
- // When the tween loops it calls descend
- tween.onLoop.add(descend, this);
-}
-
-function setupInvader (invader) {
- invader.anchor.x = 0.5;
- invader.anchor.y = 0.5;
- invader.animations.add('kaboom');
-}
-
-function descend() {
- aliens.x -= 10;
-}
-
-function render() {
-
-}
-
-function fireBullet() {
- game.add.audio('sfx_fire');
- sfx_fire.volume = 0.2;
- sfx_fire.play();
-
- // To avoid them being allowed to fire too fast we set a time limit
- if (game.time.now > bulletTime) {
- // Grab the first bullet we can from the pool
- bullet = bullets.getFirstExists(false);
-
- if (bullet) {
- // And fire it
- bullet.reset(player.x+8, player.y);
- bullet.body.velocity.x = 400;
- bulletTime = game.time.now + 200;
- }
- }
-
-}
-function collisionHandler (bullet, alien) {
- // When a bullet hits an alien we kill them both
- bullet.kill();
- alien.kill();
-
- game.add.audio('sfx_enemy_die');
- sfx_enemy_die.volume = 0.6;
- sfx_enemy_die.play();
-
- // Increase the score
- score += 20;
- scoreText.text = scoreString + score;
-
- // And create an explosion :)
- var explosion = explosions.getFirstExists(false);
- explosion.reset(alien.body.x, alien.body.y);
- explosion.play('kaboom', 30, false, true);
-
- if (aliens.countLiving() == 0) {
- score += 1000;
- scoreText.text = scoreString + score;
-
- enemyBullets.callAll('kill',this);
- stateText.text = " You Won!, \n Click to restart...";
- stateText.visible = true;
- music.stop();
-
- // the "click to restart" handler
- game.input.onTap.addOnce(restart,this);
- }
-}
-
-function enemyHitsPlayer (player,bullet) {
- game.add.audio('sfx_player_hit');
- sfx_player_hit.volume = 0.6;
- sfx_player_hit.play();
-
- bullet.kill();
-
- live = lives.getFirstAlive();
-
- if (live) {
- live.kill();
- }
-
- // And create an explosion :)
- var explosion = explosions.getFirstExists(false);
- explosion.reset(player.body.x, player.body.y);
- explosion.play('kaboom', 30, false, true);
-
- // PLAYER DIES
- // When the player dies
- if (lives.countLiving() < 1) {
- player.kill();
- enemyBullets.callAll('kill');
-
- stateText.text=" Game Over! \n Click to restart...";
- stateText.visible = true;
-
- music.stop();
-
- //the "click to restart" handler
- game.input.onTap.addOnce(restart,this);
- }
-}
-
-function enemyFires() {
- // Grab the first bullet we can from the pool
- enemyBullet = enemyBullets.getFirstExists(false);
-
- livingEnemies.length = 0;
-
- aliens.forEachAlive(function(alien) {
-
- // put every living enemy in an array
- livingEnemies.push(alien);
- });
-
-
- if (enemyBullet && livingEnemies.length > 0) {
-
- var random=game.rnd.integerInRange(0,livingEnemies.length-1);
-
- // randomly select one of them
- var shooter=livingEnemies[random];
- // And fire the bullet from this enemy
- enemyBullet.reset(shooter.body.x, shooter.body.y);
-
- game.physics.arcade.moveToObject(enemyBullet,player,120);
- firingTimer = game.time.now + 2000;
- }
-
-}
-
-
-function resetBullet (bullet) {
- // Called if the bullet goes out of the screen
- bullet.kill();
-
-}
-
-function restart() {
- // A new level starts
- music.stop();
- music.play();
-
- score = 0;
- scoreText.text = scoreString + score;
-
- //resets the life count
- lives.callAll('revive');
- // And brings the aliens back from the dead :)
- aliens.removeAll();
- createAliens();
-
- //revives the player
- player.revive();
- //hides the text
- stateText.visible = false;
-
-}
diff --git a/gulpfile.js b/gulpfile.js
new file mode 100644
index 0000000..60cd725
--- /dev/null
+++ b/gulpfile.js
@@ -0,0 +1,29 @@
+var gulp = require('gulp');
+var webserver = require('gulp-webserver');
+
+var Paths = {
+ HERE: './webserver/',
+ PUBLIC : '**/*.js'
+};
+
+gulp.task('server', function() {
+ gulp.src(Paths.HERE).pipe(webserver({
+ open:'http://localhost:3000',
+ livereload:true,
+ directoryListing: false,
+ port:3000
+ }));
+});
+
+
+gulp.task('watch', function() {
+ gulp.watch(Paths.HERE + Paths.PUBLIC)
+});
+
+
+gulp.task('default',gulp.parallel([
+ 'watch',
+ 'server',
+], function () {
+ console.log('Server is On! Wait for Open App! ')
+}));
\ No newline at end of file
diff --git a/js/phaser.min.js b/js/phaser.min.js
deleted file mode 100644
index 1c5a465..0000000
--- a/js/phaser.min.js
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Phaser v2.0.1 - http://phaser.io - @photonstorm - (c) 2014 Photon Storm Ltd. */
-
-(function(){var a=this,b=b||{};b.WEBGL_RENDERER=0,b.CANVAS_RENDERER=1,b.VERSION="v1.5.0",b.blendModes={NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16},b.scaleModes={DEFAULT:0,LINEAR:0,NEAREST:1},b.INTERACTION_FREQUENCY=30,b.AUTO_PREVENT_DEFAULT=!0,b.RAD_TO_DEG=180/Math.PI,b.DEG_TO_RAD=Math.PI/180,b.Point=function(a,b){this.x=a||0,this.y=b||0},b.Point.prototype.clone=function(){return new b.Point(this.x,this.y)},b.Point.prototype.constructor=b.Point,b.Point.prototype.set=function(a,b){this.x=a||0,this.y=b||(0!==b?this.x:0)},b.Rectangle=function(a,b,c,d){this.x=a||0,this.y=b||0,this.width=c||0,this.height=d||0},b.Rectangle.prototype.clone=function(){return new b.Rectangle(this.x,this.y,this.width,this.height)},b.Rectangle.prototype.contains=function(a,b){if(this.width<=0||this.height<=0)return!1;var c=this.x;if(a>=c&&a<=c+this.width){var d=this.y;if(b>=d&&b<=d+this.height)return!0}return!1},b.Rectangle.prototype.constructor=b.Rectangle,b.EmptyRectangle=new b.Rectangle(0,0,0,0),b.Polygon=function(a){if(a instanceof Array||(a=Array.prototype.slice.call(arguments)),"number"==typeof a[0]){for(var c=[],d=0,e=a.length;e>d;d+=2)c.push(new b.Point(a[d],a[d+1]));a=c}this.points=a},b.Polygon.prototype.clone=function(){for(var a=[],c=0;c