-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from kuri-team/v0.1-alpha-development
V0.1 alpha development
- Loading branch information
Showing
36 changed files
with
1,149 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
@font-face { | ||
font-family: "Kenney Blocks"; | ||
src: url("../assets/font/Kenney Blocks.ttf") format("truetype"); | ||
} | ||
|
||
@font-face { | ||
font-family: "Kenney Future"; | ||
src: url("../assets/font/Kenney Future.ttf") format("truetype"); | ||
} | ||
|
||
@font-face { | ||
font-family: "Kenney Future Narrow"; | ||
src: url("../assets/font/Kenney Future Narrow.ttf") format("truetype"); | ||
} | ||
|
||
@font-face { | ||
font-family: "Kenney High"; | ||
src: url("../assets/font/Kenney High.ttf") format("truetype"); | ||
} | ||
|
||
@font-face { | ||
font-family: "Kenney High Square"; | ||
src: url("../assets/font/Kenney High Square.ttf") format("truetype"); | ||
} | ||
|
||
@font-face { | ||
font-family: "Kenney Mini"; | ||
src: url("../assets/font/Kenney Mini.ttf") format("truetype"); | ||
} | ||
|
||
@font-face { | ||
font-family: "Kenney Mini Square"; | ||
src: url("../assets/font/Kenney Mini Square.ttf") format("truetype"); | ||
} | ||
|
||
@font-face { | ||
font-family: "Kenney Pixel"; | ||
src: url("../assets/font/Kenney Pixel.ttf") format("truetype"); | ||
} | ||
|
||
@font-face { | ||
font-family: "Kenney Pixel Square"; | ||
src: url("../assets/font/Kenney Pixel Square.ttf") format("truetype"); | ||
} | ||
|
||
@font-face { | ||
font-family: "Kenney Rocket"; | ||
src: url("../assets/font/Kenney Rocket.ttf") format("truetype"); | ||
} | ||
|
||
@font-face { | ||
font-family: "Kenney Rocket Square"; | ||
src: url("../assets/font/Kenney Rocket Square.ttf") format("truetype"); | ||
} | ||
|
||
body { | ||
margin: 0; | ||
padding: 0; | ||
background-color: #000000; | ||
} | ||
|
||
footer { | ||
padding-bottom: 5rem; | ||
} | ||
|
||
p { | ||
color: white; | ||
font-family: "Kenney Future", sans-serif; | ||
text-align: center; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Game</title> | ||
<meta name="viewport" content="width=device-width,initial-scale=1"> | ||
<link rel="stylesheet" href="css/styles.css"> | ||
|
||
<script type="text/javascript" src="src/lib/phaser.min.js"></script> | ||
</head> | ||
|
||
|
||
<body> | ||
<div id="game-wrapper"> | ||
<script class="game" type="module" src="src/game.js"></script> | ||
</div> | ||
<p>Version 0.1 Alpha</p> | ||
<p>Powered with <a href="https://phaser.io">Phaser 3</a></p> | ||
</body> | ||
|
||
<footer> | ||
<p>Copyright Mike Vo & Team Kuri <script>document.write(new Date().getFullYear());</script> All rights reserved</p> | ||
</footer> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import GAMESETTINGS from "./settings.js"; | ||
import PreloadGame from "./scenes/PreloadGame.js"; | ||
import RunGame from "./scenes/RunGame.js"; | ||
import GameOver from "./scenes/GameOver.js"; | ||
|
||
|
||
let debug = false; | ||
if (GAMESETTINGS.debug) { | ||
debug = { | ||
showVelocity: true, | ||
showCollisions: true | ||
} | ||
} | ||
|
||
|
||
let customFonts = [ | ||
'Kenney Blocks', | ||
'Kenney Future', | ||
'Kenney Future Narrow', | ||
'Kenney High', | ||
'Kenney High Square', | ||
'Kenney Mini', | ||
'Kenney Mini Square', | ||
'Kenney Pixel', | ||
'Kenney Pixel Square', | ||
'Kenney Rocket', | ||
'Kenney Rocket Square' | ||
]; | ||
|
||
|
||
let config = { | ||
backgroundColor: GAMESETTINGS.backgroundColor, | ||
pixelArt: true, | ||
type: Phaser.AUTO, | ||
scale: { | ||
parent: 'game-wrapper', | ||
mode: Phaser.Scale.FIT, | ||
autoCenter: Phaser.Scale.CENTER_HORIZONTALLY, | ||
width: GAMESETTINGS.nativeWidth * GAMESETTINGS.scaleFactor, | ||
height: GAMESETTINGS.nativeHeight * GAMESETTINGS.scaleFactor | ||
}, | ||
physics: { | ||
default: "matter", | ||
matter: { | ||
gravity: { x: GAMESETTINGS.gravity.x * GAMESETTINGS.scaleFactor, y: GAMESETTINGS.gravity.y * GAMESETTINGS.scaleFactor }, | ||
debug: debug | ||
} | ||
}, | ||
scene: [ | ||
PreloadGame, RunGame, GameOver | ||
] | ||
}; | ||
|
||
let game = new Phaser.Game(config); | ||
|
||
|
||
export default { | ||
game, | ||
config, | ||
customFonts | ||
}; |
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import GAMESETTINGS from "../settings.js"; | ||
import game from "../game.js"; | ||
|
||
|
||
/*** | ||
* Game Over screen | ||
*/ | ||
export default class GameOver extends Phaser.Scene { | ||
constructor() { | ||
super("gameOver"); | ||
} | ||
|
||
/** @type {Phaser.GameObjects.Text} **/ | ||
restart; | ||
|
||
/*** | ||
* | ||
* @param {Object} data | ||
*/ | ||
create(data) { | ||
let clickSFX = this.sound.add('shoot-sfx'); | ||
this.sound.add('game-over-audio').play(); | ||
|
||
WebFont.load({ | ||
custom: { | ||
families: game.customFonts | ||
}, | ||
active: () => { | ||
this.add.text(6.25 * GAMESETTINGS.scaleFactor, 2.5 * GAMESETTINGS.scaleFactor, `Game Over\nScore: ${data.score}`, { | ||
fontSize: 15 * GAMESETTINGS.scaleFactor, fontFamily: 'Kenney High Square, Arial, sans-serif', color: '#000', fontStyle: 'bold' | ||
}); | ||
this.restart = this.add.text(6.25 * GAMESETTINGS.scaleFactor, this.game.scale.height - 20 * GAMESETTINGS.scaleFactor, 'Restart', { | ||
fontSize: 15 * GAMESETTINGS.scaleFactor, fontFamily: 'Kenney High Square, Arial, sans-serif', backgroundColor: '#000', fontStyle: 'bold', padding: { | ||
left: 2.5 * GAMESETTINGS.scaleFactor, | ||
right: 1.25 * GAMESETTINGS.scaleFactor, | ||
top: 0, | ||
bottom: 1.25 * GAMESETTINGS.scaleFactor | ||
} | ||
}).setInteractive(); | ||
} | ||
}); | ||
|
||
this.add.sprite( | ||
GAMESETTINGS.nativeWidth / 2 * GAMESETTINGS.scaleFactor, | ||
GAMESETTINGS.nativeHeight / 2 * GAMESETTINGS.scaleFactor, | ||
'vignette') | ||
.setScale(GAMESETTINGS.scaleFactor) | ||
.setAlpha(0.05) | ||
.setBlendMode(Phaser.BlendModes.ADD) | ||
.setScrollFactor(0, 0) | ||
.play('vignette-anim'); | ||
|
||
this.input.on('gameobjectdown', () => { | ||
clickSFX.play(); | ||
this.scene.start('runGame') | ||
}, this); | ||
} | ||
} |
Oops, something went wrong.