Skip to content
Open
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.env
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Changelog

Based on KeepAChangelog.
Generated by **Documatic.**

## Unreleased

### Added

* Animation for movement of ship
* Ui improvements and displayed stats
* Game over state and replay button
* Background music
* Animation for bonus collected
* Description of game in readme.md

### Changed

* Readme.md
44 changes: 44 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!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">
<title>Rush!</title>
<link rel="stylesheet" href="src/styles/index.css">
<script src="src/vendors/three.min.js"></script>
<script src="src/vendors/howler.min.js"></script>

<script src="src/scripts/audio-manager.js"></script>
<script src="src/scripts/lerp.js"></script>
<script src="src/scripts/game.js"></script>
<script src="src/scripts/main.js"></script>
</head>
<body>
<div id="info">
<div id="title">Captain's log</div>
<div class="divider"></div>
<div id="score-row">Score: <div id="score"></div></div>
<div id="distance-row">Distance: <div id="distance"></div></div>
<div class="divider"></div>
<div>Ship's Integrity:</div>
<input id="health" type="range" min="0" max="100" disabled>
</div>

<div id="intro-panel">
<div id="intro-column">
<div id="intro-title">Rush!</div>
<button id="start-button">Start</button>
</div>
</div>

<div id="game-over-panel">
<div id="game-over-column">
<div id="game-over-title">Game over!</div>
<div id="game-over-score-row">Score: <div id="game-over-score"></div></div>
<div id="game-over-distance-row">Distance: <div id="game-over-distance"></div></div>
<button id="replay-button">Replay</button>
</div>
</div>
</body>
</html>
5 changes: 4 additions & 1 deletion src/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
<!-- Your project description--->
# Rush!
this is a 3D infinite game set in space. the goal is to collect the colored circles(bonuses) and avoid the rectangles(obstacles). Enjoy the game with added background music.

Created for Documatic Hackathon.
Binary file added src/assets/music.mp3
Binary file not shown.
13 changes: 13 additions & 0 deletions src/scripts/audio-manager.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
function setupAudio() {

// background music
const musicAudio = new Howl({
src: ['src/assets/music.mp3'],
autoplay: true,
loop: true,
});

const musicId = musicAudio.play();
musicAudio.fade(0, 1, 4000, musicId);

}
Loading