Commit c85c3b61 authored by Alexander Yakovlev's avatar Alexander Yakovlev

background audio, ES6 uglify, no tests

parent 53d61fbc
......@@ -3,7 +3,7 @@ gulp = require('gulp')
gutil = require('gulp-util')
coffee = require("gulp-coffee")
sass = require('gulp-sass')
uglify = require('gulp-uglify')
uglify = require('gulp-uglify-es').default
zip = require('gulp-zip')
concat = require('gulp-concat')
rename = require('gulp-rename')
......@@ -19,8 +19,8 @@ html = (target, debug) ->
'html/index.html'
'html/ru.html'
]
if (debug)
sources.push('html/test.html')
#if (debug)
# sources.push('html/test.html')
gulp.src(sources)
.pipe(gulp.dest(target))
#gulp.src(['game/gamepad.min.js']).pipe(gulp.dest(target+"/game"))
......
......@@ -31,6 +31,7 @@
</p>
</div>
<div id="footright">
<p>Audio: <a href="https://freesound.org/people/felix.blume/sounds/188796">felix blume — On a train in Ukraine, going to Chernobyl</a>, CC-BY license</p>
</div>
</div>
</div>
......@@ -38,10 +39,11 @@
<!-- CDN JS Libraries -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/marked/0.3.5/marked.min.js" integrity="sha384-QXBtGc4014gU26HdCwzgy8TVO+FHSSE4+EvPPiSTpdE9w0KyJy1ocfiIbBl1HLq7" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/jquery-3.1.1.min.js" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/jquery-3.2.1.min.js" crossorigin="anonymous"></script>
<script src="game/salet.min.js"></script>
<script defer src="game/main.js"></script>
<audio id="bgsound" preload="auto" loop="loop"><source src="audio/bgr.mp3" type='audio/mpeg; codecs="mp3"'></source></audio>
<!-- Piwik -->
<script type="text/javascript">
var _paq = _paq || [];
......
......@@ -20,7 +20,7 @@
<div class="container">
<div id="content_wrapper" class="row">
<div id="content" class="content">
<noscript>You need to turn on Javascript to play this game.</noscript>
<noscript>Вы должны включить Javascript для игры.</noscript>
</div>
<a name="end_of_content"></a>
</div>
......@@ -29,7 +29,7 @@
<p>
<a href="https://git.oreolek.ru/oreolek/ludumdare37" target="_blank">Исходный код игры</a>
</p>
<!-- <p>Аудио: <a href="https://freesound.org/people/felix.blume/sounds/188796">felix blume — On a train in Ukraine, going to Chernobyl</a>, лицензия CC-BY</p> -->
<p>Аудио: <a href="https://freesound.org/people/felix.blume/sounds/188796">felix blume — On a train in Ukraine, going to Chernobyl</a>, лицензия CC-BY</p>
</div>
<div id="footright">
</div>
......@@ -39,10 +39,11 @@
<!-- CDN JS Libraries -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/marked/0.3.5/marked.min.js" integrity="sha384-QXBtGc4014gU26HdCwzgy8TVO+FHSSE4+EvPPiSTpdE9w0KyJy1ocfiIbBl1HLq7" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/jquery-3.1.1.min.js" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/jquery-3.2.1.min.js" crossorigin="anonymous"></script>
<script src="game/salet.min.js"></script>
<script defer src="game/main.js"></script>
<audio id="bgsound" preload="auto" loop="loop"><source src="audio/bgr.mp3" type='audio/mpeg; codecs="mp3"'></source></audio>
<!-- Piwik -->
<script type="text/javascript">
var _paq = _paq || [];
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://code.jquery.com/qunit/qunit-2.3.3.css">
<style>#page{display: none}</style>
</head>
<body>
<div id="page">
<div class="container">
<div class="row">
<div class='ways'>
<ul class="nav nav-pills" id="ways">
</ul>
</div>
</div> <!-- End of div.tools_wrapper -->
<div id="content_wrapper">
<div id="content" class="content narrow">
<noscript>This game requires Javascript.</noscript>
</div>
<div class="sidebar">
<div class="ui">
<a href="#" id="storytab" class="tab active"></a>
<a href="inventory" id="chartab" class="tab"></a>
<a href="map" id="maptab" class="tab"></a>
</div>
<div class="action">
<div class="verb" data-verb="examine">Examine</div>
<ul class="objects" id="examinelist" data-verb="examine">
</ul>
<div class="verb" data-verb="take">Take</div>
<ul class="objects" id="takelist" data-verb="take">
</ul>
<div class="verb" data-verb="drop">Drop</div>
<ul class="objects" id="droplist" data-verb="drop">
</ul>
<div class="verb" data-verb="wear">Wear</div>
<ul class="objects" id="wearlist" data-verb="wear">
</ul>
</div>
</div>
<a name="end_of_content"></a>
</div>
</div>
</div> <!-- End of div.page -->
<div id="qunit"></div>
<div id="qunit-fixture"></div>
<!-- Dependency JS Libraries -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/marked/0.3.5/marked.min.js"></script>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/sigma.js/1.2.0/sigma.min.js"></script>
<script src="https://code.jquery.com/qunit/qunit-2.3.3.js"></script>
<script src="game/salet.min.js"></script>
<script src="game/main.js"></script>
<script defer="defer" src="test/main.js"></script>
</body>
</html>
salet.autosave = false;
salet.autoload = false;
$(document).ready(function() {
QUnit.test("The game starts okay.", function(assert) {
assert.notEqual(salet, void 0, "Salet is initialized");
return assert.equal(salet.current, "start", "Salet is in the room called 'start'");
});
QUnit.test("There are no game-breaking bugs when entering rooms.", function(assert) {
for (var key in salet.rooms) {
// skip loop if the property is from prototype
if (!salet.rooms.hasOwnProperty(key)) continue;
var room = salet.rooms[key];
assert.ok(salet.goTo(room.name), "Entered room "+room.name);
}
});
QUnit.test("There are no game-breaking bugs in all actions.", function(assert) {
for (var key in salet.rooms) {
// skip loop if the property is from prototype
if (!salet.rooms.hasOwnProperty(key)) continue;
var room = salet.rooms[key];
salet.goTo(room.name);
for (var act in room.actions) {
if (!room.actions.hasOwnProperty(act)) continue;
assert.ok(act.fcall(room), "Executed action "+act);
}
for (var act in room.writers) {
if (!room.writers.hasOwnProperty(act)) continue;
assert.ok(act.fcall(room), "Executed action "+act);
}
}
});
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment