Sint/level.js
Markus Scully ebee9b7931 Version 0.4.1
Added procedural level generation. Levels are now infinite pretty much.
Added death animation. Only the visible part of the level is now drawn.
Actors now drawn in front of level. Other minor changes.
2013-08-06 00:36:35 +01:00

257 lines
No EOL
10 KiB
JavaScript

function defineLevels(){
levels = [
[
'################################################'
,'################################################'
,'##..............................................'
,'##..............................................'
,'##.............................##########.....##'
,'##.............................##########.....##'
,'##...................####.....................##'
,'##...................####.....................##'
,'##...........................####.............##'
,'##...........................####.............##'
,'##............................................##'
,'##..###..##........####..............###########'
,'###########........#############################'
,'################################################'
,'################################################'
,'################################################'
,'################################################'
,'################################################'
,'################################################'
,'################################################'
],
[
'#################################################'
,'#################################################'
,'#..............................................##'
,'#..............................................##'
,'##################.............................##'
,'##################....#######..................##'
,'#.....................#######..................##'
,'#................................#####.........##'
,'#................................#####.........##'
,'#.....................########.................##'
,'#.....................########.................##'
,'#............######............................##'
,'#............######............................##'
,'#......###.....................................##'
,'#.....####.....................................##'
,'#....#####.....................................##'
,'#...######xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx##'
,'#..#######xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx##'
,'#################################################'
,'#################################################'
],
[
'..................................................................................................................'
,'..................................................................................................................'
,'..................................................................................................................'
,'..................................................................................................................'
,'..................................................................................................................'
,'..................................................................................................................'
,'..................................................................................................................'
,'..................................................................................................................'
,'........####......................................................................................................'
,'........####......................................................................................................'
,'........####......................................................................................................'
,'##..............................................................................................................##'
,'##...............###.......................#####.................................###............................##'
,'##...............###............................................................................................##'
,'##...............#######........................................................................................##'
,'##################################################xxxxx###########################################################'
,'##################################################################################################################'
,'##################################################################################################################'
,'##################################################################################################################'
,'##################################################################################################################'
]
];
levelparts = [
[
'...................'
,'...................'
,'...................'
,'##.................'
,'##.................'
,'##.................'
,'##.................'
,'##.................'
,'##.................'
,'##.................'
,'##.................'
,'##.................'
,'##.................'
,'#########..........'
,'#########..........'
,'###################'
,'###################'
,'###################'
,'###################'
,'###################'
,false, '5n', 1, 1, 0 // What type of connection it has left, right, the minimum level it appears, the maximum, and the rarity
],
[
'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'###################'
,'###################'
,'###################'
,'###################'
,'###################'
,'5n', '5n', 1, 50, 2 // What type of connection it has left, right, the minimum level it appears, the maximum, and the rarity
],
[
'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'................###'
,'................###'
,'.....########...###'
,'.....########...###'
,'.....###........###'
,'########...########'
,'########...########'
,'###################'
,'###################'
,'###################'
,'5n', '10n', 2, 10, 10
],
[
'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'................##.'
,'######..........##.'
,'######.............'
,'######....###......'
,'##........###......'
,'##.E......###......'
,'###################'
,'###################'
,'###################'
,'###################'
,'###################'
,'10n', '5n', 2, 15, 7
],
[
'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'.........E.........'
,'......#######......'
,'......#######......'
,'......#######......'
,'###################'
,'###################'
,'###################'
,'###################'
,'###################'
,'5n', '5n', 2, 15, 4
],
[
'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'....###............'
,'....#####.....###..'
,'....#####.....#####'
,'..............#####'
,'...................'
,'...................'
,'########....#######'
,'########xxxx#######'
,'###################'
,'###################'
,'###################'
,'5n', '5n', 2, 15, 5
],
[
'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'###################'
,'###################'
,'###################'
,'###################'
,'###################'
,'5n', '5n', 2, 15, 2
],
[
'......................................'
,'......................................'
,'......................................'
,'......................................'
,'......................................'
,'......................................'
,'......................................'
,'......................................'
,'......................................'
,'......................................'
,'..............#######...##############'
,'..............###...........##.......#'
,'.........########...........##.......#'
,'.........##.........#####...####..####'
,'.........##.........#####..........###'
,'###########....##########..........###'
,'###########....#######################'
,'######################################'
,'######################################'
,'######################################'
,'5n', '10n', 2, 15, 20
]
];
}