Skip to content

Commit

Permalink
more rooms, more polish
Browse files Browse the repository at this point in the history
  • Loading branch information
Rybar committed Sep 13, 2017
1 parent eef97af commit 5db3fe1
Show file tree
Hide file tree
Showing 15 changed files with 7,371 additions and 26 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file added build/Compressed file.zip
Binary file not shown.
1,958 changes: 1,958 additions & 0 deletions build/Compressed file/assets.js

Large diffs are not rendered by default.

5,304 changes: 5,304 additions & 0 deletions build/Compressed file/concat.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions build/Compressed file/game.js

Large diffs are not rendered by default.

65 changes: 53 additions & 12 deletions build/concat.js
Original file line number Diff line number Diff line change
Expand Up @@ -536,17 +536,49 @@ world = [ // ||---start
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,05,05,05,00,00,00,00,02,16,02,18,00,00,00,00,00,00,00,00,00,00,//5
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,05,02,06,02,10,11,04,00,15,05,00,00,00,00,00,00,00,00,00,00,00,//6
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,05,02,04,00,00,17,05,00,14,00,00,00,00,00,00,00,00,00,00,00,00,//7
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,02,12,04,04,05,02,16,02,02,13,02,00,00,00,00,00,00,00,00,00,00,00,//8
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,02,12,04,04,05,02,16,08,02,13,02,00,00,00,00,00,00,00,00,00,00,00,//8
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,05,00,00,00,15,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,//9
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,07,08,04,00,14,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,//10
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,02,06,02,13,02,02,18,02,04,00,00,00,00,00,00,00,00,00,00,//36
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,02,02,02,00,00,00,00,02,07,08,00,00,00,00,00,00,00,00,00,//37
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,06,10,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,//38
09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,//39
09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09//39


];

var a_jet = {
"osc1_oct": 8,
"osc1_det": 0,
"osc1_detune": 0,
"osc1_xenv": 0,
"osc1_vol": 0,
"osc1_waveform": 0,
"osc2_oct": 8,
"osc2_det": 0,
"osc2_detune": 0,
"osc2_xenv": 0,
"osc2_vol": 0,
"osc2_waveform": 0,
"noise_fader": 255,
"env_attack": 548,
"env_sustain": 0,
"env_release": 16584,
"env_master": 192,
"fx_filter": 2,
"fx_freq": 914,
"fx_resonance": 67,
"fx_delay_time": 2,
"fx_delay_amt": 72,
"fx_pan_freq": 1,
"fx_pan_amt": 88,
"lfo_osc1_freq": 0,
"lfo_fx_freq": 0,
"lfo_freq": 2,
"lfo_amt": 51,
"lfo_waveform": 0
};

var a_title = {
"rowLen": 5513,
"endPattern": 17,
Expand Down Expand Up @@ -2908,7 +2940,7 @@ init = () => {

sounds = {};
soundsLoaded = 0;
totalSounds = 7;
totalSounds = 8;
score = 0;
fuelTimer = 0;
parts = 0;
Expand Down Expand Up @@ -3834,9 +3866,9 @@ rooms = [
0,0,0,0,0,0,0,0,0,0,0,1,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,1,1,1,0,0,0,0,
0,0,0,0,0,1,8,1,0,0,0,0,
0,0,0,1,1,1,1,1,1,0,0,0,
0,0,1,1,1,1,1,1,1,1,0,0,
0,0,0,0,0,1,0,1,0,0,0,0,
0,0,0,1,1,1,0,1,1,0,0,0,
0,0,1,1,1,1,8,1,1,1,0,0,
1,1,1,1,1,1,1,1,1,1,1,1,

],)
Expand Down Expand Up @@ -4233,6 +4265,8 @@ player = {
player.minYvel = -290;
player.xspeed = 200;
player.yspeed = 290;
fuelTimer = 1200000000;
helpSection = 3;
if (Key.isDown(Key.d) || Key.isDown(Key.RIGHT)) {
player.facingLeft = false;
player.xvel = player.xspeed;
Expand All @@ -4244,9 +4278,9 @@ player = {
if(Key.isDown(Key.w) || Key.isDown(Key.UP) || Key.isDown(Key.Z) || Key.isDown(Key.SPACE)){
if(!player.jumping){
//player.jumping = true;
player.yvel += -player.yspeed * dt;
s_jump = true;
playSound(sounds.jump, 2.5, player.x.map(0, WIDTH, -1, 1), false);
player.yvel += -player.yspeed * dt * 5;
//s_jump = true;
playSound(sounds.jet, 2.5, player.x.map(0, WIDTH, -1, 1), false);
}

}
Expand Down Expand Up @@ -4806,16 +4840,17 @@ states.game = {
],

[
'MAX ENERGY CAPACITY REACHED.',
'FIND MISSING COMPONENTS TO INCREASE CAPACITY',
'DISINTEGRATOR ONLINE. PRESS X TO USE',
'FIND MISSING COMPONENTS TO INCREASE MOBILITY',
'PRESS DOWN WHILE USING TO DIG DOWNWARD'
],

[
'FIND MORE FUEL',
'SEEK OUT REMAINING BODY COMPONENTS'
],
[
''
'THRUSTERS ONLINE. FUSION REACTOR ONLINE.'
]

],
Expand Down Expand Up @@ -4963,6 +4998,12 @@ states.loading = {
sounds.step = buffer;
soundsLoaded++;
});
var soundGen = new sonantx.SoundGenerator(a_jet);
soundGen.createAudioBuffer(130, function(buffer) {
var source = audioCtx.createBufferSource();
sounds.jet = buffer;
soundsLoaded++;
});
},

step: function(dt) {
Expand Down
2 changes: 1 addition & 1 deletion build/game.js

Large diffs are not rendered by default.

Binary file modified dist/game.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/index.html

Large diffs are not rendered by default.

36 changes: 34 additions & 2 deletions src/js/assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,49 @@ world = [ // ||---start
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,05,05,05,00,00,00,00,02,16,02,18,00,00,00,00,00,00,00,00,00,00,//5
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,05,02,06,02,10,11,04,00,15,05,00,00,00,00,00,00,00,00,00,00,00,//6
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,05,02,04,00,00,17,05,00,14,00,00,00,00,00,00,00,00,00,00,00,00,//7
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,02,12,04,04,05,02,16,02,02,13,02,00,00,00,00,00,00,00,00,00,00,00,//8
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,02,12,04,04,05,02,16,08,02,13,02,00,00,00,00,00,00,00,00,00,00,00,//8
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,05,00,00,00,15,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,//9
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,07,08,04,00,14,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,//10
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,02,06,02,13,02,02,18,02,04,00,00,00,00,00,00,00,00,00,00,//36
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,02,02,02,00,00,00,00,02,07,08,00,00,00,00,00,00,00,00,00,//37
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,06,10,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,//38
09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,//39
09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09,09//39


];

var a_jet = {
"osc1_oct": 8,
"osc1_det": 0,
"osc1_detune": 0,
"osc1_xenv": 0,
"osc1_vol": 0,
"osc1_waveform": 0,
"osc2_oct": 8,
"osc2_det": 0,
"osc2_detune": 0,
"osc2_xenv": 0,
"osc2_vol": 0,
"osc2_waveform": 0,
"noise_fader": 255,
"env_attack": 548,
"env_sustain": 0,
"env_release": 16584,
"env_master": 192,
"fx_filter": 2,
"fx_freq": 914,
"fx_resonance": 67,
"fx_delay_time": 2,
"fx_delay_amt": 72,
"fx_pan_freq": 1,
"fx_pan_amt": 88,
"lfo_osc1_freq": 0,
"lfo_fx_freq": 0,
"lfo_freq": 2,
"lfo_amt": 51,
"lfo_waveform": 0
};

var a_title = {
"rowLen": 5513,
"endPattern": 17,
Expand Down
2 changes: 1 addition & 1 deletion src/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ init = () => {

sounds = {};
soundsLoaded = 0;
totalSounds = 7;
totalSounds = 8;
score = 0;
fuelTimer = 0;
parts = 0;
Expand Down
8 changes: 5 additions & 3 deletions src/js/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,8 @@ player = {
player.minYvel = -290;
player.xspeed = 200;
player.yspeed = 290;
fuelTimer = 1200000000;
helpSection = 3;
if (Key.isDown(Key.d) || Key.isDown(Key.RIGHT)) {
player.facingLeft = false;
player.xvel = player.xspeed;
Expand All @@ -285,9 +287,9 @@ player = {
if(Key.isDown(Key.w) || Key.isDown(Key.UP) || Key.isDown(Key.Z) || Key.isDown(Key.SPACE)){
if(!player.jumping){
//player.jumping = true;
player.yvel += -player.yspeed * dt;
s_jump = true;
playSound(sounds.jump, 2.5, player.x.map(0, WIDTH, -1, 1), false);
player.yvel += -player.yspeed * dt * 5;
//s_jump = true;
playSound(sounds.jet, 2.5, player.x.map(0, WIDTH, -1, 1), false);
}

}
Expand Down
7 changes: 4 additions & 3 deletions src/js/states/gamestate.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,17 @@ states.game = {
],

[
'MAX ENERGY CAPACITY REACHED.',
'FIND MISSING COMPONENTS TO INCREASE CAPACITY',
'DISINTEGRATOR ONLINE. PRESS X TO USE',
'FIND MISSING COMPONENTS TO INCREASE MOBILITY',
'PRESS DOWN WHILE USING TO DIG DOWNWARD'
],

[
'FIND MORE FUEL',
'SEEK OUT REMAINING BODY COMPONENTS'
],
[
''
'THRUSTERS ONLINE. FUSION REACTOR ONLINE.'
]

],
Expand Down
6 changes: 6 additions & 0 deletions src/js/states/loadingstate.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ states.loading = {
sounds.step = buffer;
soundsLoaded++;
});
var soundGen = new sonantx.SoundGenerator(a_jet);
soundGen.createAudioBuffer(130, function(buffer) {
var source = audioCtx.createBufferSource();
sounds.jet = buffer;
soundsLoaded++;
});
},

step: function(dt) {
Expand Down
6 changes: 3 additions & 3 deletions src/js/world/rooms.js
Original file line number Diff line number Diff line change
Expand Up @@ -382,9 +382,9 @@ rooms = [
0,0,0,0,0,0,0,0,0,0,0,1,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,1,1,1,0,0,0,0,
0,0,0,0,0,1,8,1,0,0,0,0,
0,0,0,1,1,1,1,1,1,0,0,0,
0,0,1,1,1,1,1,1,1,1,0,0,
0,0,0,0,0,1,0,1,0,0,0,0,
0,0,0,1,1,1,0,1,1,0,0,0,
0,0,1,1,1,1,8,1,1,1,0,0,
1,1,1,1,1,1,1,1,1,1,1,1,

],)
Expand Down

0 comments on commit 5db3fe1

Please sign in to comment.