Skip to content

Commit

Permalink
includes the new text for game
Browse files Browse the repository at this point in the history
  • Loading branch information
agar3s committed Sep 13, 2018
1 parent 4a4f2da commit 203b965
Show file tree
Hide file tree
Showing 8 changed files with 126 additions and 24 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -64,3 +64,5 @@ typings/
dist
package-lock.json
target*
*.exe
*.ini
19 changes: 18 additions & 1 deletion assets/fonts.sprite
Expand Up @@ -728,5 +728,22 @@ ________________
________________
________________
________________
//new Frame
________________
________________
________________
________________
________________
_____MM_________
_____MM_________
_____M__________
____M___________
________________
________________
________________
________________
________________
________________
________________
Animation:
0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42
0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43
1 change: 1 addition & 0 deletions scripts/concat.sh
Expand Up @@ -33,6 +33,7 @@ cat lib/keyboardController.js

# game
cat src/generatedSprites.js
cat src/theScript.js
cat src/spriteLoader.js
cat src/gameObject.js
cat src/fighter.js
Expand Down
2 changes: 1 addition & 1 deletion src/font.js
@@ -1,6 +1,6 @@
// src/font.js

var fontLetters = 'abcdefghijklmnopqrstuvwxyz0123456789!?# :,.';
var fontLetters = 'abcdefghijklmnopqrstuvwxyz0123456789!?# :,.';
var indexOfFontFrame = 0;

function parseText(text) {
Expand Down
37 changes: 16 additions & 21 deletions src/gameSetup.js
Expand Up @@ -24,7 +24,7 @@ mainScene.create = function(){
this.lastCheckPoint = 0;

var map = [0];
for (var i = 1; i < 180; i++) {
for (var i = 1; i < 150; i++) {
var tile = 4;
if(i%15==0){
map[i-1] = 3;
Expand All @@ -45,49 +45,41 @@ mainScene.create = function(){

this.sections = [
// 0
[32*15,[],[],[['neo: operator?', 2], ['',0.6],['neo: i need an exit', 2],['',0.6],['neo: now!',2], ['',1],['operator: there is an exit at the end.', 2], ['', 0.6], ['operator: .', 0.4], ['operator: ..', 0.4], ['operator: ...', 1], ['', 0.6], ['operator: let me guide you.', 2]]],
[32*15,[],[], matrixScript[0]],
[32*15,[[32*10, 0]],[[0,0],[0,0],[1]]],
// 1
[32*30,[],[]],
[32*30,[[32*25, 1], [32*27, 1]],[[1],[1,1],[],[2]]],

// 2
[32*45,[],[]],
[32*45,[[32*40, 4]],[],[['...', 0.2],['mr. smith: mr anderson', 2], ['mr. smith: you can not escape', 2], ['',2], ['operator: run!', 3]]],
[32*45,[[32*40, 4]],[],matrixScript[1]],
// 3
[32*60,[],[],[['operator: i cant believe it!', 2]]],
[32*60,[[32*58, 2]],[[1,1],[0,0],[1,1],[],[3]]],
// 4
[32*75,[],[]],
[32*75,[[32*69,0],[32*71,0],[32*73, 3]],[[],[],[0,1,0,0,1,0]]],
[32*75,[[32*69,0],[32*71,0],[32*73, 3]],[[0,1],[0,0],[1,0]]],
// 5
[32*90,[],[]],
[32*90,[[32*85, 5]],[[3,3]]],
[32*90,[[32*85, 5]],[], matrixScript[2]],
// 6
[32*105,[],[]],
[32*105,[],[[4],[2,1,1],[0,0],[0,0],[0,0,0]]],

[32*105,[],[], matrixScript[3]],
[32*105,[],[[0,0],[1,1],[0,0,0],[1,1,1],[],[],[0,0,1,1],[1,0,0,1],[],[],[],[2]]],
// 7
[32*120,[],[]],
[32*120,[[32*115, 6]],[]],
[32*120,[],[], [['trinity: hurry, neo!', 2]]],
[32*120,[],[[5, 6]], matrixScript[4]],
// 8
[32*135,[],[]],
[32*135,[],[[0,0],[1,1],[0,0,0],[1,1,1],[],[],[0,0,1,1],[1,0,0,1],[],[],[],[2]]],

[32*135,[[32*130, 7]], [], matrixScript[5]],
// 9
[32*150,[],[]],
[32*150,[],[[5, 6]]],
// 10
[32*165,[],[]],
[32*165,[[32*175, 7]],[]],

[32*180,[],[]],
[32*180,[],[]]
[32*150,[],[]]
];
mainScene.limit = [0, 320];
this.loadSection(0);
//this.loadSection(0);

this.loadCheckPoint(1*2);
this.loadCheckPoint(0*2);
};

mainScene.loadCheckPoint = function(point) {
Expand Down Expand Up @@ -142,6 +134,9 @@ mainScene.loadSection = function(index) {
if(index>=this.sections.length) {
return;
}
if(hudScene && this.currentSectionIndex>5){
hudScene.setDialoguePipeline([]);
}
this.currentSectionIndex = index;
var section = JSON.parse(JSON.stringify(this.sections[this.currentSectionIndex]));
mainScene.moveToLimit(this.limit[1]-320, section[0]);
Expand Down
2 changes: 1 addition & 1 deletion src/generatedSprites.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/sounds.js
Expand Up @@ -15,3 +15,5 @@ var punchSounds = mutates(basePunchSound, 3);
var baseHitSound = [3,0.0016,0.1344,,0.1768,0.559,0.0332,-0.4474,-0.0545,0.0188,,-0.0954,,0.1008,-0.0342,,-0.0528,0.0403,0.9406,0.0121,,0.3799,0.0431,0.4];
var hitSound = mutates(baseHitSound, 3);
var jumpSound = audio([0,0.1,0.15,,0.29,0.11,0.04,0.1,0.1,0.25,,0.2199,0.1,0.36,0.26,0.08,0.06,,0.99,0.02,0.16,0.15,-0.72,0.29]);
var powerup = audio([1,,0.3504,,0.3541,0.385,,0.2852,,,,,,,,0.6757,,,1,,,,,0.5]);

85 changes: 85 additions & 0 deletions src/theScript.js
@@ -0,0 +1,85 @@

var matrixScript = [
// 0
[['tank: operator', 2],
['',0.6],
['neo: tank, i need an exit', 2],
['',0.6],
['neo: now!',2],
['',1],
['operator: .', 0.4],
['operator: ..', 0.4],
['operator: ...', 1],
['operator: got one ready', 2],
['', 0.6],
['operator: subway station, state and balboa.', 2]
],
// 1
[['...', 0.2],
['agent smith: mr. anderson', 2],
['',0.6],
['agent smith: we meet again', 2],
['',2],
['trinity: run, neo. run! what is he doing?', 3],
['',0.6],
['morpheus: he’s beginning to believe.', 2]
],
// 2
[['agent smith: i’m going to enjoy...', 1.5],
['agent smith: watching you die,', 1.5],
['agent smith: mr. anderson.', 1.5],
['',0.6],
['neo: my name is..', 1.2],
['',0.6],
['neo: n', 0.4],
['neo: ne', 0.4],
['neo: neo', 0.4],
['neo: neo!', 0.2],
['neo: neo!!', 0.2],
['neo: neo!!!', 0.2],
['neo: neo!!!!', 1]
],
// 3
[['neo: mr. wizard...', 2],
['neo: get me the hell out of here.', 3],
['',0.6],
['tank: got a patch on an old exit...', 2],
['tank: wabash and lake.', 2]
],
// 4
[['',0.6],
['.',0.6],
['..',0.6],
['...',1],
['',1],
['neo: oh shit...', 1.5],
['neo: help.', 1.5],
['neo: need a little help.', 1.5]
],
//5
[['',0.6],
['agent smith: i’m going to be honest', 3],
['agent smith: i hate this place,', 3],
['',0.6],
['agent smith: this zoo', 2],
['agent smith: this prison', 2],
['agent smith: this reality', 2],
['agent smith: whatever you want to call it', 3],
['agent smith: i can’t stand it any longer.', 3],
['',1],
['agent smith: it’s the smell', 3],
['agent smith: if there is such a thing', 3],
['agent smith: i feel.', 0.6],
['agent smith: i feel..', 0.6],
['agent smith: i feel...', 1.8],
['agent smith: saturated by it', 2],
['',0.6],
['agent smith: i can taste your stink', 2],
['agent smith: and every time i do', 2],
['agent smith: i feel i have somehow been...', 3],
['agent smith: infected by it', 2],
['agent smith: it’s repulsive', 2],
['agent smith: ', 2],
['agent smith: i must get out of here', 2]
]
];

0 comments on commit 203b965

Please sign in to comment.