Final touches
This commit is contained in:
parent
9a99f54311
commit
b2b9b8607d
10 changed files with 30 additions and 59 deletions
Binary file not shown.
Before Width: | Height: | Size: 129 B |
|
@ -1,6 +1,4 @@
|
||||||
(function() {
|
(function() {
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var bubble = {};
|
var bubble = {};
|
||||||
|
|
||||||
var dom = document.getElementById('bubble');
|
var dom = document.getElementById('bubble');
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
(function() {
|
(function() {
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var entity = {};
|
var entity = {};
|
||||||
var allEntities = [];
|
var allEntities = [];
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
(function() {
|
(function() {
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var mouse = {};
|
var mouse = {};
|
||||||
var isEnabled = true;
|
var isEnabled = true;
|
||||||
var canvas = document.getElementById('js13k-2017');
|
var canvas = document.getElementById('js13k-2017');
|
||||||
|
|
30
src/muri.js
30
src/muri.js
|
@ -1,3 +1,6 @@
|
||||||
|
// 2017 Aaron Fischer <mail@aaron-fischer.net>
|
||||||
|
// a js13kgames entry
|
||||||
|
//
|
||||||
// Plot: You are in the dark, and you have no clue where you are
|
// Plot: You are in the dark, and you have no clue where you are
|
||||||
// and what happened. You wake up in completely dark and stumble
|
// and what happened. You wake up in completely dark and stumble
|
||||||
// around. You explore the area and you find out you are on a
|
// around. You explore the area and you find out you are on a
|
||||||
|
@ -13,33 +16,7 @@
|
||||||
// space pirates killed the crew except you. You want to fly
|
// space pirates killed the crew except you. You want to fly
|
||||||
// home, but you need to bring the ship back to life.
|
// home, but you need to bring the ship back to life.
|
||||||
|
|
||||||
// TOOLS: Aseprite (DB16 Palett)
|
|
||||||
|
|
||||||
// Ship:
|
|
||||||
// Statis capsule room
|
|
||||||
// Cargo room
|
|
||||||
// Command station
|
|
||||||
// Crew quarters
|
|
||||||
// Machine/Engine room
|
|
||||||
|
|
||||||
// Act 1: No light at all. Only player. Can walk. If the player
|
|
||||||
// hit a wall (he stands in a corridor), he can switch on the light.
|
|
||||||
// He sees the room and the stasis capsule. Explore the room,
|
|
||||||
// find out more details about your current situation (statis
|
|
||||||
// no one is here, ship don't move, warning signs everywhere).
|
|
||||||
|
|
||||||
// Act 2: Open the pressure door, find a space suite, get a map
|
|
||||||
// fix a leak in the ship.
|
|
||||||
|
|
||||||
// Act 3: Go into the command station, find out more on the
|
|
||||||
// terminals, fix some things by exploring the rest of the ship.
|
|
||||||
|
|
||||||
// Act 4: Bring the ship back to operation, find the way home,
|
|
||||||
// end.
|
|
||||||
|
|
||||||
var muri = (function() {
|
var muri = (function() {
|
||||||
'use strict';
|
|
||||||
|
|
||||||
kontra.init('js13k-2017');
|
kontra.init('js13k-2017');
|
||||||
kontra.assets.imagePath = 'assets/images';
|
kontra.assets.imagePath = 'assets/images';
|
||||||
|
|
||||||
|
@ -110,7 +87,6 @@ var muri = (function() {
|
||||||
|
|
||||||
muri.setup = function() {
|
muri.setup = function() {
|
||||||
kontra.assets.load(
|
kontra.assets.load(
|
||||||
'room_stasis_dark.png',
|
|
||||||
'room_stasis.png',
|
'room_stasis.png',
|
||||||
'room_engine.png',
|
'room_engine.png',
|
||||||
'room_hydro.png',
|
'room_hydro.png',
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
(function() {
|
(function() {
|
||||||
'use strict';
|
|
||||||
muri.rooms.push({name: 'end'});
|
muri.rooms.push({name: 'end'});
|
||||||
}());
|
}());
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
(function() {
|
(function() {
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var engine = {};
|
var engine = {};
|
||||||
|
|
||||||
var background, door, lasers = null;
|
var background, door, lasers = null;
|
||||||
var roomState = {
|
var roomState = {
|
||||||
firstVisit: true,
|
firstVisit: true,
|
||||||
engineBroken: false, //true,
|
engineBroken: true,
|
||||||
laserStates: [0, 0, 0]
|
laserStates: [0, 0, 0]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
(function() {
|
(function() {
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var hydro = {};
|
var hydro = {};
|
||||||
|
|
||||||
var background, door, keycard = null;
|
var background, door, keycard = null;
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
(function() {
|
(function() {
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var lift = {};
|
var lift = {};
|
||||||
|
|
||||||
var buttonSheet, background = null;
|
var buttonSheet, background = null;
|
||||||
|
@ -66,11 +64,24 @@
|
||||||
'Set ' + room + ' for destination',
|
'Set ' + room + ' for destination',
|
||||||
room + ', okay'
|
room + ', okay'
|
||||||
]);
|
]);
|
||||||
muri.get('bubble')
|
var noMessage = muri.ra([
|
||||||
.talk([goMessage])
|
"No, can't do that for you.",
|
||||||
.then(function() {
|
'If you say please, than maybee.',
|
||||||
muri.changeRoom(room);
|
"What? Can't hear you.",
|
||||||
});
|
'I do not take orders from anyone!!',
|
||||||
|
'You? No!',
|
||||||
|
]);
|
||||||
|
var no = Math.floor(Math.random()*10);
|
||||||
|
console.log(no);
|
||||||
|
if (no > 4) {
|
||||||
|
muri.get('bubble').talk([noMessage]);
|
||||||
|
} else {
|
||||||
|
muri.get('bubble')
|
||||||
|
.talk([goMessage])
|
||||||
|
.then(function() {
|
||||||
|
muri.changeRoom(room);
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
e.sprite.playAnimation('off');
|
e.sprite.playAnimation('off');
|
||||||
return e;
|
return e;
|
||||||
|
|
|
@ -1,15 +1,13 @@
|
||||||
(function() {
|
(function() {
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var stasis = {};
|
var stasis = {};
|
||||||
|
|
||||||
var background, backgroundDark = null;
|
var background = null;
|
||||||
var door, liftBox = null;
|
var door, liftBox = null;
|
||||||
var roomState = {
|
var roomState = {
|
||||||
isDoorOpen: false,
|
isDoorOpen: false,
|
||||||
isLightOn: true, //false
|
isLightOn: false,
|
||||||
isIntroRunning: false, //true
|
isIntroRunning: true,
|
||||||
hydroDoorBroken: false, // true
|
hydroDoorBroken: true,
|
||||||
liftSwitches: ['off', 'off', 'off', 'off', 'off']
|
liftSwitches: ['off', 'off', 'off', 'off', 'off']
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -52,8 +50,8 @@
|
||||||
if (solved) {
|
if (solved) {
|
||||||
muri.get('bubble')
|
muri.get('bubble')
|
||||||
.talk([
|
.talk([
|
||||||
'Once again, the ship shakes like crazy.',
|
'Once again, the ship shakes.',
|
||||||
'Something broke or looses inside the lift and metal scrapes against the hull.',
|
'Something broke off inside the lift and metal scrapes against the hull.',
|
||||||
'Not sure if this is a good sign ...']);
|
'Not sure if this is a good sign ...']);
|
||||||
muri.room('lift').roomState.hydroDoorBroken = false;
|
muri.room('lift').roomState.hydroDoorBroken = false;
|
||||||
roomState.hydroDoorBroken = false;
|
roomState.hydroDoorBroken = false;
|
||||||
|
@ -63,7 +61,6 @@
|
||||||
|
|
||||||
stasis.init = function() {
|
stasis.init = function() {
|
||||||
background = muri.bg('stasis');
|
background = muri.bg('stasis');
|
||||||
backgroundDark = muri.bg('stasis_dark');
|
|
||||||
|
|
||||||
muri.get('entity')
|
muri.get('entity')
|
||||||
.create('stasis.lightSwitch',
|
.create('stasis.lightSwitch',
|
||||||
|
@ -89,7 +86,7 @@
|
||||||
.story([
|
.story([
|
||||||
[['Beep', 'Bip, Bip'], [17, 15]],
|
[['Beep', 'Bip, Bip'], [17, 15]],
|
||||||
[['Urgh ... ...', 'Where I am?', 'What happened?'], [40, 35]],
|
[['Urgh ... ...', 'Where I am?', 'What happened?'], [40, 35]],
|
||||||
[['I can\'t see a thing ...', '... need to turn on the light ...'], [40, 35]]
|
[["I can't see a thing ...", '... need to turn on the light ...'], [40, 35]]
|
||||||
])
|
])
|
||||||
.then(function() {
|
.then(function() {
|
||||||
roomState.isIntroRunning = false;
|
roomState.isIntroRunning = false;
|
||||||
|
@ -110,7 +107,7 @@
|
||||||
.addCallback(function() {
|
.addCallback(function() {
|
||||||
muri.get('bubble')
|
muri.get('bubble')
|
||||||
.talk([
|
.talk([
|
||||||
'That\'s my stasis capsule.',
|
"That's my stasis capsule.",
|
||||||
'It looks like the capsule itself is intact but had a malfunction.',
|
'It looks like the capsule itself is intact but had a malfunction.',
|
||||||
'I am not an engineer, so I have noe idea whats wrong here ...'
|
'I am not an engineer, so I have noe idea whats wrong here ...'
|
||||||
]);
|
]);
|
||||||
|
@ -132,8 +129,6 @@
|
||||||
if (roomState.isLightOn) {
|
if (roomState.isLightOn) {
|
||||||
background.render();
|
background.render();
|
||||||
if (liftBox) liftBox.render();
|
if (liftBox) liftBox.render();
|
||||||
} else {
|
|
||||||
backgroundDark.render();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue