summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--assets/vo/voice2.oggbin80802 -> 109846 bytes
-rw-r--r--assets/vo/voice3.oggbin76444 -> 39167 bytes
-rw-r--r--level.go144
-rwxr-xr-xlevelgen.py76
-rw-r--r--main.go11
5 files changed, 120 insertions, 111 deletions
diff --git a/assets/vo/voice2.ogg b/assets/vo/voice2.ogg
index ade567b..eeca273 100644
--- a/assets/vo/voice2.ogg
+++ b/assets/vo/voice2.ogg
Binary files differ
diff --git a/assets/vo/voice3.ogg b/assets/vo/voice3.ogg
index 9fe3436..a309d6d 100644
--- a/assets/vo/voice3.ogg
+++ b/assets/vo/voice3.ogg
Binary files differ
diff --git a/level.go b/level.go
index aa2d700..6b00cc6 100644
--- a/level.go
+++ b/level.go
@@ -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, 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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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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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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, 0, 0, 0,
0, 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 StartLevel9(g *Game) {
+func StartLevel8(g *Game) {
g.SetPlacing()
//noMoveable(g)
@@ -419,27 +395,27 @@ 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, 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, 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, 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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, 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):
diff --git a/main.go b/main.go
index 31d2310..44e0170 100644
--- a/main.go
+++ b/main.go
@@ -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
}