From 7a7efefdf85ff8d6b73dcbbfbd350a357bf204cf Mon Sep 17 00:00:00 2001 From: davidovski Date: Tue, 23 Apr 2024 19:27:31 +0100 Subject: add another level --- assets/vo/voice9.ogg | Bin 434014 -> 19662 bytes level.go | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++ levelgen.py | 27 ++++++++++++++---- 3 files changed, 98 insertions(+), 5 deletions(-) diff --git a/assets/vo/voice9.ogg b/assets/vo/voice9.ogg index 8fb2121..c2ee918 100644 Binary files a/assets/vo/voice9.ogg and b/assets/vo/voice9.ogg differ diff --git a/level.go b/level.go index 13937a6..aa2d700 100644 --- a/level.go +++ b/level.go @@ -405,6 +405,82 @@ func StartLevel8(g *Game) { g.QueueState(func (g *Game){ afterReversed(g) }) + g.QueueState(StartLevel9) +} + +// How about this? +func StartLevel9(g *Game) { + g.SetPlacing() + //noMoveable(g) + + g.ClearAll() + tilemap := NewTilemap([][]int{ + { +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 34, 34, 34, 34, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 53, 54, 55, 53, 54, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 34, 34, 66, 0, 0, 0, 0, +50, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 55, 53, 54, 55, 34, 34, 34, 66, +69, 70, 71, 69, 70, 71, 69, 70, 71, 69, 70, 71, 69, 70, 71, 69, 70, 71, 69, 70, 71, 69, 70, 71, 69, +37, 38, 39, 37, 38, 39, 37, 38, 39, 37, 38, 39, 37, 38, 39, 37, 38, 39, 37, 38, 39, 37, 38, 39, 37, +53, 54, 55, 53, 54, 55, 53, 54, 55, 53, 54, 55, 53, 54, 55, 53, 54, 55, 53, 54, 55, 53, 54, 55, 53, +}, +{ +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 98, 82, 82, 82, 82, 114, 0, 0, 0, 0, 0, 0, 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face() + g.player.startx = 3 * tileSize + g.player.starty = 11 * tileSize + + g.exit.startx = 11 * tileSize + g.exit.starty = 1 * tileSize + + g.ResetAll() + g.playerAi = g.playerAi[:0] + + g.QueueState(levelStart) + + //g.audioPlayer.voiceAudio[3].Play() + g.toPlace = append(g.toPlace, NewSpring(g, 0, 0)) + g.toPlace = append(g.toPlace, NewSpring(g, 0, 0)) + g.toPlace = append(g.toPlace, NewBox(g, 0, 0)) + g.toPlace = append(g.toPlace, NewBox(g, 0, 0)) + g.toPlace = append(g.toPlace, NewBox(g, 0, 0)) + + g.audioPlayer.voiceAudio[8].Play() + // after end + g.QueueState(ReverseLevel) + // after reversed + g.QueueState(afterReversed) g.QueueState(StartLevelFinal) } func StartLevelFinal(g *Game) { diff --git a/levelgen.py b/levelgen.py index a17afd8..bcf1344 100755 --- a/levelgen.py +++ b/levelgen.py @@ -3,6 +3,8 @@ array = [ " ", " ", " ", + " ###### ", + " ###### ", " ", " ", " ", @@ -10,15 +12,30 @@ array = [ " ", " ", " ", - " ###", - " ###", - "#### #####", - "#### #####", - "#### #####", + " #### ", + "#########################", + "#########################", "#########################", "#########################", ] #array = [ +# " ", +# " ", +# " ", +# " ", +# " ", +# " ", +# " ", +# " ", +# " ###", +# " ###", +# "#### #####", +# "#### #####", +# "#### #####", +# "#########################", +# "#########################", +# ] +#array = [ # "#########################", # "#########################", # "#########################", -- cgit v1.2.1