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.
This commit is contained in:
Markus Scully 2013-08-06 00:36:35 +01:00
parent 20bd7ea249
commit ebee9b7931
2 changed files with 162 additions and 32 deletions

102
level.js
View file

@ -57,10 +57,10 @@ function defineLevels(){
,'........####......................................................................................................'
,'........####......................................................................................................'
,'##..............................................................................................................##'
,'##...............###.............................................................###............................##'
,'##...............###.......................#####.................................###............................##'
,'##...............###............................................................................................##'
,'##...............#######........................................................................................##'
,'##################################################.....###########################################################'
,'##################################################xxxxx###########################################################'
,'##################################################################################################################'
,'##################################################################################################################'
,'##################################################################################################################'
@ -69,6 +69,29 @@ function defineLevels(){
];
levelparts = [
[
'...................'
,'...................'
,'...................'
,'##.................'
,'##.................'
,'##.................'
,'##.................'
,'##.................'
,'##.................'
,'##.................'
,'##.................'
,'##.................'
,'##.................'
,'#########..........'
,'#########..........'
,'###################'
,'###################'
,'###################'
,'###################'
,'###################'
,false, '5n', 1, 1, 0 // What type of connection it has left, right, the minimum level it appears, the maximum, and the rarity
],
[
'...................'
,'...................'
@ -125,8 +148,8 @@ function defineLevels(){
,'...................'
,'...................'
,'...................'
,'...................'
,'######.............'
,'................##.'
,'######..........##.'
,'######.............'
,'######....###......'
,'##........###......'
@ -149,7 +172,7 @@ function defineLevels(){
,'...................'
,'...................'
,'...................'
,'....................'
,'...................'
,'.........E.........'
,'......#######......'
,'......#######......'
@ -160,6 +183,75 @@ function defineLevels(){
,'###################'
,'###################'
,'5n', '5n', 2, 15, 4
],
[
'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'....###............'
,'....#####.....###..'
,'....#####.....#####'
,'..............#####'
,'...................'
,'...................'
,'########....#######'
,'########xxxx#######'
,'###################'
,'###################'
,'###################'
,'5n', '5n', 2, 15, 5
],
[
'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'...................'
,'###################'
,'###################'
,'###################'
,'###################'
,'###################'
,'5n', '5n', 2, 15, 2
],
[
'......................................'
,'......................................'
,'......................................'
,'......................................'
,'......................................'
,'......................................'
,'......................................'
,'......................................'
,'......................................'
,'......................................'
,'..............#######...##############'
,'..............###...........##.......#'
,'.........########...........##.......#'
,'.........##.........#####...####..####'
,'.........##.........#####..........###'
,'###########....##########..........###'
,'###########....#######################'
,'######################################'
,'######################################'
,'######################################'
,'5n', '10n', 2, 15, 20
]
];
}