diff options
-rw-r--r-- | assets/vo/voice1.ogg | bin | 0 -> 122532 bytes | |||
-rw-r--r-- | assets/vo/voice2.ogg | bin | 0 -> 80802 bytes | |||
-rw-r--r-- | assets/vo/voice3.ogg | bin | 0 -> 76444 bytes | |||
-rw-r--r-- | assets/vo/voice4.ogg | bin | 0 -> 64332 bytes | |||
-rw-r--r-- | assets/vo/voice5.ogg | bin | 0 -> 53864 bytes | |||
-rw-r--r-- | assets/vo/voice6.ogg | bin | 0 -> 53378 bytes | |||
-rw-r--r-- | assets/vo/voice7.ogg | bin | 0 -> 16321 bytes | |||
-rw-r--r-- | assets/vo/voice8.ogg | bin | 0 -> 14233 bytes | |||
-rw-r--r-- | assets/vo/voice9.ogg | bin | 0 -> 434014 bytes | |||
-rw-r--r-- | level.go | 29 | ||||
-rw-r--r-- | main.go | 31 |
11 files changed, 53 insertions, 7 deletions
diff --git a/assets/vo/voice1.ogg b/assets/vo/voice1.ogg Binary files differnew file mode 100644 index 0000000..80ea8c8 --- /dev/null +++ b/assets/vo/voice1.ogg diff --git a/assets/vo/voice2.ogg b/assets/vo/voice2.ogg Binary files differnew file mode 100644 index 0000000..ade567b --- /dev/null +++ b/assets/vo/voice2.ogg diff --git a/assets/vo/voice3.ogg b/assets/vo/voice3.ogg Binary files differnew file mode 100644 index 0000000..9fe3436 --- /dev/null +++ b/assets/vo/voice3.ogg diff --git a/assets/vo/voice4.ogg b/assets/vo/voice4.ogg Binary files differnew file mode 100644 index 0000000..b561e98 --- /dev/null +++ b/assets/vo/voice4.ogg diff --git a/assets/vo/voice5.ogg b/assets/vo/voice5.ogg Binary files differnew file mode 100644 index 0000000..436504e --- /dev/null +++ b/assets/vo/voice5.ogg diff --git a/assets/vo/voice6.ogg b/assets/vo/voice6.ogg Binary files differnew file mode 100644 index 0000000..f57a224 --- /dev/null +++ b/assets/vo/voice6.ogg diff --git a/assets/vo/voice7.ogg b/assets/vo/voice7.ogg Binary files differnew file mode 100644 index 0000000..8b64de7 --- /dev/null +++ b/assets/vo/voice7.ogg diff --git a/assets/vo/voice8.ogg b/assets/vo/voice8.ogg Binary files differnew file mode 100644 index 0000000..6733d7b --- /dev/null +++ b/assets/vo/voice8.ogg diff --git a/assets/vo/voice9.ogg b/assets/vo/voice9.ogg Binary files differnew file mode 100644 index 0000000..8fb2121 --- /dev/null +++ b/assets/vo/voice9.ogg @@ -99,7 +99,11 @@ func StartLevel1(g *Game ) { g.state = END }) - g.QueueState(PauseScreen) + g.QueueState(func (g *Game){ + // What do you mean "is that it?". I kinda uhh ran out of time to finish the actual game but uhhh if you want I can let you have a go at finishing it for me. Just press R to reverse time and we'll go from there + PauseScreen(g) + g.audioPlayer.voiceAudio[0].Play() + }) // after end g.QueueState(func (g *Game){ g.animStart = g.time - endCardDuration @@ -115,14 +119,22 @@ func StartLevel1(g *Game ) { func StartLevel2(g *Game) { g.SetPlacing() - noMoveable(g) + //noMoveable(g) + // OK so, this level could probably be a bit more diffcult. Here's a spikey thing, just click to place it anywhere, just make sure it kills the player + g.audioPlayer.voiceAudio[1].Play() g.toPlace = append(g.toPlace, NewLeftSpike(g, 0, 0)) // after end g.QueueState(ReverseLevel) + // after reversed - g.QueueState(afterReversed) + g.QueueState(func (g *Game){ + // Nice, Good job. + // Ok right I've got another spike for you to place. Remember, you can click on things to move them around if it doesn't quite work out + g.audioPlayer.voiceAudio[2].Play() + afterReversed(g) + }) g.QueueState(StartLevel3) } @@ -130,6 +142,8 @@ func StartLevel3(g *Game) { g.SetPlacing() noMoveable(g) + //g.audioPlayer.voiceAudio[3].Play() + g.toPlace = append(g.toPlace, NewSpike(g, 0, 0)) // after end @@ -144,6 +158,8 @@ func StartLevel4(g *Game) { noMoveable(g) g.toPlace = append(g.toPlace, NewSpring(g, 0, 0)) + // Ok lets try something a bit different. here's a spring this time + g.audioPlayer.voiceAudio[4].Play() g.ClearAll() tilemap := NewTilemap([][]int{ @@ -201,11 +217,13 @@ func StartLevel4(g *Game) { g.QueueState(StartLevel5) } -// HMM maybe we can make this a bit harder, lets try moving the exit by clicking on it func StartLevel5(g *Game) { g.SetPlacing() //noMoveable(g) + // HMM thats too easy. maybe Try moving the exit ontop of the hill, that could work + g.audioPlayer.voiceAudio[5].Play() + //g.toPlace = append(g.toPlace, NewSpring(g, 0, 0)) g.exit.movable = true g.toPlace = append(g.toPlace, g.exit) @@ -218,11 +236,12 @@ func StartLevel5(g *Game) { g.QueueState(StartLevel6) } -// Ok lets add a spring there as well +// How about this? func StartLevel6(g *Game) { g.SetPlacing() //noMoveable(g) + g.audioPlayer.voiceAudio[6].Play() g.toPlace = append(g.toPlace, NewSpring(g, 0, 0)) g.toPlace = append(g.toPlace, NewRightSideSpring(g, 0, 0)) g.toPlace = append(g.toPlace, NewLeftSideSpring(g, 0, 0)) @@ -38,7 +38,8 @@ const ( exitTransitionWeight = 0.7 ghostAlpha = 0.5 hightlightBorder = 2 - audioFadeIn = 0.999 + audioFadeIn = 0.99 + musicVolume = 0.3 sampleRate = 44100 shadowOffset = 1 @@ -93,6 +94,21 @@ var ( //go:embed assets/land2.ogg land2Ogg_src []byte + + //go:embed assets/vo/voice1.ogg + voice1Ogg_src []byte + //go:embed assets/vo/voice2.ogg + voice2Ogg_src []byte + //go:embed assets/vo/voice3.ogg + voice3Ogg_src []byte + //go:embed assets/vo/voice4.ogg + voice4Ogg_src []byte + //go:embed assets/vo/voice5.ogg + voice5Ogg_src []byte + //go:embed assets/vo/voice6.ogg + voice6Ogg_src []byte + //go:embed assets/vo/voice7.ogg + voice7Ogg_src []byte ) var ( @@ -136,6 +152,7 @@ type AudioPlayer struct { springAudio *audio.Player jumpAudio []*audio.Player landAudio []*audio.Player + voiceAudio []*audio.Player } type Game struct { @@ -311,7 +328,7 @@ func (g *Game) Update() error { g.audioPlayer.ambientAudio.Play() } volume := g.audioPlayer.ambientAudio.Volume() - volume = 1-((1-volume)*audioFadeIn) + volume = musicVolume-((musicVolume-volume)*audioFadeIn) g.audioPlayer.ambientAudio.SetVolume(volume) } @@ -839,6 +856,16 @@ func (g *Game) LoadAudio() { g.audioPlayer.jumpAudio = loadAudiosVorbis([][]byte{jump1Ogg_src, jump2Ogg_src}, g.audioPlayer.audioContext) g.audioPlayer.landAudio = loadAudiosVorbis([][]byte{land1Ogg_src, land2Ogg_src}, g.audioPlayer.audioContext) + g.audioPlayer.voiceAudio = loadAudiosVorbis([][]byte{ + voice1Ogg_src, + voice2Ogg_src, + voice3Ogg_src, + voice4Ogg_src, + voice5Ogg_src, + voice6Ogg_src, + voice7Ogg_src, + }, g.audioPlayer.audioContext) + } func (g *Game) LoadImages() { |