diff options
-rw-r--r-- | assets/vo/voice2.ogg | bin | 80802 -> 109846 bytes | |||
-rw-r--r-- | assets/vo/voice3.ogg | bin | 76444 -> 39167 bytes | |||
-rw-r--r-- | level.go | 144 | ||||
-rwxr-xr-x | levelgen.py | 76 | ||||
-rw-r--r-- | main.go | 11 |
5 files changed, 120 insertions, 111 deletions
diff --git a/assets/vo/voice2.ogg b/assets/vo/voice2.ogg Binary files differindex ade567b..eeca273 100644 --- a/assets/vo/voice2.ogg +++ b/assets/vo/voice2.ogg diff --git a/assets/vo/voice3.ogg b/assets/vo/voice3.ogg Binary files differindex 9fe3436..a309d6d 100644 --- a/assets/vo/voice3.ogg +++ b/assets/vo/voice3.ogg @@ -308,7 +308,6 @@ func StartLevel6(g *Game) { g.QueueState(afterReversed) g.QueueState(StartLevel7) } - // How about this? func StartLevel7(g *Game) { g.SetPlacing() @@ -320,27 +319,27 @@ func StartLevel7(g *Game) { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 50, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 66, 0, 0, 0, 0, 0, -0, 70, 71, 69, 70, 71, 69, 70, 71, 69, 70, 71, 69, 70, 71, 69, 70, 71, 69, 70, 0, 0, 0, 0, 0, -0, 38, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -0, 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, 70, 71, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -0, 38, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -0, 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, 70, 71, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -0, 38, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -0, 54, 55, 34, 34, 34, 34, 34, 66, 0, 0, 0, 0, 0, 0, 0, 0, 50, 34, 34, 34, 34, 34, 66, 0, -0, 70, 71, 69, 70, 71, 69, 70, 71, 0, 0, 0, 0, 0, 0, 0, 50, 71, 69, 70, 71, 69, 70, 71, 0, -0, 38, 39, 37, 38, 39, 37, 38, 39, 0, 0, 0, 0, 0, 0, 0, 38, 39, 37, 38, 39, 37, 38, 39, 0, -0, 54, 55, 53, 54, 55, 53, 54, 55, 0, 0, 0, 0, 0, 0, 0, 54, 55, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, @@ -359,11 +358,11 @@ func StartLevel7(g *Game) { g.tilemap = &tilemap g.tilemap.UpdateSurface() - g.player.startx = 5 * tileSize + g.player.startx = 3 * tileSize g.player.starty = 11 * tileSize - g.exit.startx = 20 * tileSize - g.exit.starty = 11 * tileSize + g.exit.startx = 11 * tileSize + g.exit.starty = 1 * tileSize g.ResetAll() g.playerAi = g.playerAi[:0] @@ -371,12 +370,13 @@ func StartLevel7(g *Game) { 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.toPlace = append(g.toPlace, NewRightSideSpring(g, 0, 0)) - g.toPlace = append(g.toPlace, NewSpring(g, 0, 0)) - g.audioPlayer.voiceAudio[6].Play() + g.audioPlayer.voiceAudio[8].Play() // after end g.QueueState(ReverseLevel) // after reversed @@ -384,32 +384,8 @@ func StartLevel7(g *Game) { g.QueueState(StartLevel8) } -func StartLevel8(g *Game) { - g.SetPlacing() - noMoveable(g) - g.toPlace = append(g.toPlace, NewVPlatform(g, 0, 0)) - g.toPlace = append(g.toPlace, NewBox(g, 0, 0)) - g.toPlace = append(g.toPlace, NewSpring(g, 0, 0)) - g.toPlace = append(g.toPlace, NewSpike(g, 0, 0)) - - g.exit.startx = 5 * tileSize - g.exit.starty = 1 * tileSize - g.exit.x = 5 * tileSize - g.exit.y = 1 * tileSize - - g.audioPlayer.voiceAudio[7].Play() - // after end - g.QueueState(ReverseLevel) - - // after reversed - g.QueueState(func (g *Game){ - afterReversed(g) - }) - g.QueueState(StartLevel9) -} - // How about this? -func StartLev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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, 50, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 66, 0, 0, 0, 0, 0, +0, 70, 71, 69, 70, 71, 69, 70, 71, 69, 70, 71, 69, 70, 71, 69, 70, 71, 69, 70, 0, 0, 0, 0, 0, +0, 38, 39, 37, 38, 39, 37, 38, 39, 37, 38, 39, 37, 38, 39, 37, 38, 39, 37, 38, 0, 0, 0, 0, 0, +0, 54, 55, 53, 54, 55, 53, 54, 55, 53, 54, 55, 53, 54, 55, 53, 54, 55, 53, 54, 0, 0, 0, 0, 0, +0, 70, 71, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 38, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 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, 70, 71, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 38, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 54, 55, 34, 34, 34, 34, 34, 66, 0, 0, 0, 0, 0, 0, 0, 0, 50, 34, 34, 34, 34, 34, 66, 0, +0, 70, 71, 69, 70, 71, 69, 70, 71, 0, 0, 0, 0, 0, 0, 0, 50, 71, 69, 70, 71, 69, 70, 71, 0, +0, 38, 39, 37, 38, 39, 37, 38, 39, 0, 0, 0, 0, 0, 0, 0, 38, 39, 37, 38, 39, 37, 38, 39, 0, +0, 54, 55, 53, 54, 55, 53, 54, 55, 0, 0, 0, 0, 0, 0, 0, 54, 55, 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, 98, 82, 82, 82, 82, 114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -447,22 +423,21 @@ func StartLevel9(g *Game) { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 114, 0, 0, 0, 0, -98, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 0, 0, 0, 0, 82, 82, 82, 114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 82, 82, 82, 82, 82, 114, 0, 0, 0, 0, 0, 0, 0, 0, 98, 82, 82, 82, 82, 82, 114, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 98, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, - }, 25) g.tilemap = &tilemap g.tilemap.UpdateSurface() - g.player.startx = 3 * tileSize + g.player.startx = 5 * tileSize g.player.starty = 11 * tileSize - g.exit.startx = 11 * tileSize - g.exit.starty = 1 * tileSize + g.exit.startx = 20 * tileSize + g.exit.starty = 11 * tileSize g.ResetAll() g.playerAi = g.playerAi[:0] @@ -470,19 +445,44 @@ func StartLevel9(g *Game) { 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.toPlace = append(g.toPlace, NewRightSideSpring(g, 0, 0)) + g.toPlace = append(g.toPlace, NewSpring(g, 0, 0)) - g.audioPlayer.voiceAudio[8].Play() + g.audioPlayer.voiceAudio[6].Play() // after end g.QueueState(ReverseLevel) // after reversed g.QueueState(afterReversed) + g.QueueState(StartLevel9) +} + +func StartLevel9(g *Game) { + g.SetPlacing() + noMoveable(g) + g.toPlace = append(g.toPlace, NewVPlatform(g, 0, 0)) + g.toPlace = append(g.toPlace, NewBox(g, 0, 0)) + g.toPlace = append(g.toPlace, NewSpring(g, 0, 0)) + g.toPlace = append(g.toPlace, NewSpike(g, 0, 0)) + + g.exit.startx = 5 * tileSize + g.exit.starty = 1 * tileSize + g.exit.x = 5 * tileSize + g.exit.y = 1 * tileSize + + g.audioPlayer.voiceAudio[7].Play() + // after end + g.QueueState(ReverseLevel) + + // after reversed + g.QueueState(func (g *Game){ + afterReversed(g) + }) g.QueueState(StartLevelFinal) } + + func StartLevelFinal(g *Game) { g.SetPlacing() //noMoveable(g) diff --git a/levelgen.py b/levelgen.py index bcf1344..500bbab 100755 --- a/levelgen.py +++ b/levelgen.py @@ -1,23 +1,23 @@ #!/usr/bin/env python -array = [ - " ", - " ", - " ", - " ###### ", - " ###### ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " #### ", - "#########################", - "#########################", - "#########################", - "#########################", - ] +#array = [ +# " ", +# " ", +# " ", +# " ###### ", +# " ###### ", +# " ", +# " ", +# " ", +# " ", +# " ", +# " ", +# " ", +# " #### ", +# "#########################", +# "#########################", +# "#########################", +# "#########################", +# ] #array = [ # " ", # " ", @@ -54,25 +54,25 @@ array = [ # " ##### ## ##### ", # " ##### ## ##### ", # ] -#array = [ -# " ", -# " ", -# " ", -# " ", -# " ################### ", -# " ################### ", -# " ## ", -# " ## ", -# " ## ", -# " ## ", -# " ## ", -# " ## ", -# " ## ", -# " ######## ####### ", -# " ######## ######## ", -# " ######## ######## ", -# " ######## ######## ", -# ] +array = [ + " ", + " ", + " ", + " ", + " ################### ", + " ################### ", + " ################### ", + " ################### ", + " ## ", + " ## ", + " ## ", + " ## ", + " ## ", + " ######## ####### ", + " ######## ######## ", + " ######## ######## ", + " ######## ######## ", + ] def layer0(x, y, solid, topSurface, left, right): @@ -38,7 +38,7 @@ const ( ghostAlpha = 0.5 hightlightBorder = 2 audioFadeIn = 0.99 - musicVolume = 0.2 + musicVolume = 0.5 sampleRate = 44100 shadowOffset = 1 @@ -49,6 +49,8 @@ const ( menuFadeInTime = 80 buttonOffset = 4.0 buttonOffsetPressed = 2.0 + + masterVolume = 6.0 ) var ( @@ -423,6 +425,10 @@ func (g *Game) Update() error { func (g *Game) UpdatePlacing() { for _, obj := range g.objects { obj.Update(*g.tilemap, g.objects) + if obj.y > screenHeight { + g.toPlace = append(g.toPlace, obj) + g.RemoveObject(obj) + } } g.tilemap.Update() @@ -848,6 +854,7 @@ func loadAudiosVorbis(oggFiles [][]byte, audioContext *audio.Context) []*audio.P if err != nil { return nil } + p.SetVolume(p.Volume()*masterVolume) players = append(players, p) } return players @@ -866,6 +873,7 @@ func loadAudioVorbis(oggFile []byte, audioContext *audio.Context) *audio.Player if err != nil { return nil } + p.SetVolume(p.Volume()*masterVolume) return p } func loadAudio(wavFile []byte, audioContext *audio.Context) *audio.Player { @@ -881,6 +889,7 @@ func loadAudio(wavFile []byte, audioContext *audio.Context) *audio.Player { if err != nil { return nil } + p.SetVolume(p.Volume()*masterVolume) return p } |