diff --git a/src/assets/images/room_stasis_dark.png b/src/assets/images/room_stasis_dark.png deleted file mode 100644 index f8c77ef..0000000 Binary files a/src/assets/images/room_stasis_dark.png and /dev/null differ diff --git a/src/bubble.js b/src/bubble.js index 8286e87..370daf4 100644 --- a/src/bubble.js +++ b/src/bubble.js @@ -1,6 +1,4 @@ (function() { - 'use strict'; - var bubble = {}; var dom = document.getElementById('bubble'); diff --git a/src/entity.js b/src/entity.js index d0fb874..8a47909 100644 --- a/src/entity.js +++ b/src/entity.js @@ -1,6 +1,4 @@ (function() { - 'use strict'; - var entity = {}; var allEntities = []; diff --git a/src/mouse.js b/src/mouse.js index 6641a9b..972f7f6 100644 --- a/src/mouse.js +++ b/src/mouse.js @@ -1,6 +1,4 @@ (function() { - 'use strict'; - var mouse = {}; var isEnabled = true; var canvas = document.getElementById('js13k-2017'); diff --git a/src/muri.js b/src/muri.js index cb105b1..cd6af79 100644 --- a/src/muri.js +++ b/src/muri.js @@ -1,3 +1,6 @@ +// 2017 Aaron Fischer +// a js13kgames entry +// // 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 // 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 // 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() { - 'use strict'; - kontra.init('js13k-2017'); kontra.assets.imagePath = 'assets/images'; @@ -110,7 +87,6 @@ var muri = (function() { muri.setup = function() { kontra.assets.load( - 'room_stasis_dark.png', 'room_stasis.png', 'room_engine.png', 'room_hydro.png', diff --git a/src/room_end.js b/src/room_end.js index d94d3cb..1395498 100644 --- a/src/room_end.js +++ b/src/room_end.js @@ -1,4 +1,3 @@ (function() { - 'use strict'; muri.rooms.push({name: 'end'}); }()); diff --git a/src/room_engine.js b/src/room_engine.js index 16eca5c..a91dfce 100644 --- a/src/room_engine.js +++ b/src/room_engine.js @@ -1,12 +1,10 @@ (function() { - 'use strict'; - var engine = {}; var background, door, lasers = null; var roomState = { firstVisit: true, - engineBroken: false, //true, + engineBroken: true, laserStates: [0, 0, 0] }; diff --git a/src/room_hydro.js b/src/room_hydro.js index 2e5f4f8..0146409 100644 --- a/src/room_hydro.js +++ b/src/room_hydro.js @@ -1,6 +1,4 @@ (function() { - 'use strict'; - var hydro = {}; var background, door, keycard = null; diff --git a/src/room_lift.js b/src/room_lift.js index 39c0450..80e59bc 100644 --- a/src/room_lift.js +++ b/src/room_lift.js @@ -1,6 +1,4 @@ (function() { - 'use strict'; - var lift = {}; var buttonSheet, background = null; @@ -66,11 +64,24 @@ 'Set ' + room + ' for destination', room + ', okay' ]); - muri.get('bubble') - .talk([goMessage]) - .then(function() { - muri.changeRoom(room); - }); + var noMessage = muri.ra([ + "No, can't do that for you.", + 'If you say please, than maybee.', + "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'); return e; diff --git a/src/room_stasis.js b/src/room_stasis.js index 691523e..ad8887d 100644 --- a/src/room_stasis.js +++ b/src/room_stasis.js @@ -1,15 +1,13 @@ (function() { - 'use strict'; - var stasis = {}; - var background, backgroundDark = null; + var background = null; var door, liftBox = null; var roomState = { isDoorOpen: false, - isLightOn: true, //false - isIntroRunning: false, //true - hydroDoorBroken: false, // true + isLightOn: false, + isIntroRunning: true, + hydroDoorBroken: true, liftSwitches: ['off', 'off', 'off', 'off', 'off'] }; @@ -52,8 +50,8 @@ if (solved) { muri.get('bubble') .talk([ - 'Once again, the ship shakes like crazy.', - 'Something broke or looses inside the lift and metal scrapes against the hull.', + 'Once again, the ship shakes.', + 'Something broke off inside the lift and metal scrapes against the hull.', 'Not sure if this is a good sign ...']); muri.room('lift').roomState.hydroDoorBroken = false; roomState.hydroDoorBroken = false; @@ -63,7 +61,6 @@ stasis.init = function() { background = muri.bg('stasis'); - backgroundDark = muri.bg('stasis_dark'); muri.get('entity') .create('stasis.lightSwitch', @@ -89,7 +86,7 @@ .story([ [['Beep', 'Bip, Bip'], [17, 15]], [['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() { roomState.isIntroRunning = false; @@ -110,7 +107,7 @@ .addCallback(function() { muri.get('bubble') .talk([ - 'That\'s my stasis capsule.', + "That's my stasis capsule.", '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 ...' ]); @@ -132,8 +129,6 @@ if (roomState.isLightOn) { background.render(); if (liftBox) liftBox.render(); - } else { - backgroundDark.render(); } };