summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob L. Kreuze <jakob@memeware.net>2018-10-26 14:13:54 -0400
committerJakob L. Kreuze <jakob@memeware.net>2018-10-26 14:13:54 -0400
commita610d4f3c513107135ece5276afffa4223c7ee4b (patch)
tree5bf84c3afe6608f3b3582240587a29f86b9d7c3e
parent558d16e8b2577f9c698a75b833dfc08af4133db9 (diff)
Rest of greetz and maps. Game is essentially complete
-rw-r--r--credits.fnl24
-rw-r--r--game.fnl3
-rw-r--r--maps/bounce.fnl3
-rw-r--r--maps/bounce.pngbin0 -> 196 bytes
-rw-r--r--maps/fall.fnl3
-rw-r--r--maps/fall.pngbin0 -> 204 bytes
-rw-r--r--maps/gimmick.fnl3
-rw-r--r--maps/gimmick.pngbin0 -> 233 bytes
-rw-r--r--maps/laststretch.fnl3
-rw-r--r--maps/laststretch.pngbin0 -> 255 bytes
-rw-r--r--maps/obstacle.fnl3
-rw-r--r--maps/obstacle.pngbin0 -> 200 bytes
-rw-r--r--maps/tubes.fnl3
-rw-r--r--maps/tubes.pngbin0 -> 190 bytes
-rw-r--r--player.fnl2
-rw-r--r--slimeball.fnl4
-rw-r--r--world.fnl4
-rw-r--r--wrap.fnl2
18 files changed, 47 insertions, 10 deletions
diff --git a/credits.fnl b/credits.fnl
index 6851d37..8dad27b 100644
--- a/credits.fnl
+++ b/credits.fnl
@@ -32,9 +32,27 @@
""
"Be sure to read"
"the README.org"
- "for greetz."
""
- "With love,"
+ "Greetz to"
+ "technomancy"
+ "rxi"
+ "kikito"
+ "clintbellanger"
+ "drpetter"
+ "soda7"
+ "katiecadet"
+ "drozerix"
+ "korcankaraokcu"
+ "and all the"
+ "friendly faces"
+ "on sdf, tide.town"
+ "and the lisp"
+ "community"
+ ""
+ "I love all of ya"
+ ""
+ "Again, thanks!"
+ ""
"Jakob"])
(var offset (- 216))
@@ -49,7 +67,7 @@
(fn update [dt set-mode]
(set offset (+ offset (* 16 dt)))
- (when (> offset 420)
+ (when (> offset 750)
(set-mode :menu)))
(fn keypressed []
diff --git a/game.fnl b/game.fnl
index 4796532..a09f5b2 100644
--- a/game.fnl
+++ b/game.fnl
@@ -37,7 +37,8 @@
(: current-music :setLooping true)
(: current-music :play)))
-(local map-order ["sandbox" "babysteps"])
+(local map-order ["sandbox" "babysteps" "bounce" "tubes"
+ "obstacle" "fall" "gimmick" "laststretch"])
(var screen-alpha 1)
(var welcome-message-y (- (: (love.graphics.getFont) :getHeight)))
diff --git a/maps/bounce.fnl b/maps/bounce.fnl
new file mode 100644
index 0000000..5cd9f75
--- /dev/null
+++ b/maps/bounce.fnl
@@ -0,0 +1,3 @@
+{:name "Bouncy"
+ :player-spawn-x 32
+ :player-spawn-y (* 5 32)}
diff --git a/maps/bounce.png b/maps/bounce.png
new file mode 100644
index 0000000..63b7201
--- /dev/null
+++ b/maps/bounce.png
Binary files differ
diff --git a/maps/fall.fnl b/maps/fall.fnl
new file mode 100644
index 0000000..76c7c1c
--- /dev/null
+++ b/maps/fall.fnl
@@ -0,0 +1,3 @@
+{:name "The Fall!"
+ :player-spawn-x 32
+ :player-spawn-y (* 2 32)}
diff --git a/maps/fall.png b/maps/fall.png
new file mode 100644
index 0000000..6f09270
--- /dev/null
+++ b/maps/fall.png
Binary files differ
diff --git a/maps/gimmick.fnl b/maps/gimmick.fnl
new file mode 100644
index 0000000..0987843
--- /dev/null
+++ b/maps/gimmick.fnl
@@ -0,0 +1,3 @@
+{:name "Gimmick"
+ :player-spawn-x 32
+ :player-spawn-y 32}
diff --git a/maps/gimmick.png b/maps/gimmick.png
new file mode 100644
index 0000000..b1f57a6
--- /dev/null
+++ b/maps/gimmick.png
Binary files differ
diff --git a/maps/laststretch.fnl b/maps/laststretch.fnl
new file mode 100644
index 0000000..51572ee
--- /dev/null
+++ b/maps/laststretch.fnl
@@ -0,0 +1,3 @@
+{:name "Homestretch"
+ :player-spawn-x 32
+ :player-spawn-y (* 13 32)}
diff --git a/maps/laststretch.png b/maps/laststretch.png
new file mode 100644
index 0000000..acb9cda
--- /dev/null
+++ b/maps/laststretch.png
Binary files differ
diff --git a/maps/obstacle.fnl b/maps/obstacle.fnl
new file mode 100644
index 0000000..1147130
--- /dev/null
+++ b/maps/obstacle.fnl
@@ -0,0 +1,3 @@
+{:name "Obstacles"
+ :player-spawn-x 32
+ :player-spawn-y (* 5 32)}
diff --git a/maps/obstacle.png b/maps/obstacle.png
new file mode 100644
index 0000000..c0d8927
--- /dev/null
+++ b/maps/obstacle.png
Binary files differ
diff --git a/maps/tubes.fnl b/maps/tubes.fnl
new file mode 100644
index 0000000..1ebafad
--- /dev/null
+++ b/maps/tubes.fnl
@@ -0,0 +1,3 @@
+{:name "Tubes?!"
+ :player-spawn-x 32
+ :player-spawn-y (* 3 32)}
diff --git a/maps/tubes.png b/maps/tubes.png
new file mode 100644
index 0000000..4b0e292
--- /dev/null
+++ b/maps/tubes.png
Binary files differ
diff --git a/player.fnl b/player.fnl
index d9e8475..f86ed62 100644
--- a/player.fnl
+++ b/player.fnl
@@ -75,7 +75,7 @@
(fn bounce [player x-normal y-normal]
(tset player :x-vel (- (* 8 x-normal) (. player :x-vel)))
- (tset player :y-vel (- (math.abs (* 8 y-normal)) (. player :y-vel))))
+ (tset player :y-vel (- (. player :y-vel) (math.abs (* 8 y-normal)))))
(fn face-upwards [player]
(tset player :action :sliming-up true))
diff --git a/slimeball.fnl b/slimeball.fnl
index 058763e..daf9108 100644
--- a/slimeball.fnl
+++ b/slimeball.fnl
@@ -46,9 +46,7 @@
:width (. slimeball-sheet :width)
:height (. slimeball-sheet :height)
- :x-pos (if (= :right orientation)
- (+ player-x player-width)
- (- player-x player-width))
+ :x-pos player-x
:y-pos player-y
:x-vel (if (. player :action :sliming-up)
diff --git a/world.fnl b/world.fnl
index 152fa62..947b7bc 100644
--- a/world.fnl
+++ b/world.fnl
@@ -107,9 +107,9 @@
(fn draw-world [world camera-x camera-y screen-width screen-height]
(love.graphics.clear 0.1 0.1 0.1)
(draw-map world camera-x camera-y screen-width screen-height)
- (draw-object (. world :player) camera-x camera-y)
(each [_ slimeball (ipairs (. world :slimeballs))]
(draw-object slimeball camera-x camera-y))
+ (draw-object (. world :player) camera-x camera-y)
(draw-hud world screen-width screen-height))
;; Returns whether or not `tile' exists in `checked'.
@@ -264,7 +264,7 @@
(fn move-slimeball [world slimeball dt]
(let [collision-map (. world :collision-map)
(goal-x goal-y) (: slimeball :next-position dt)
- filter (fn [] "cross")
+ filter (fn [_ other] (if (. other :is-tile) "touch" "cross"))
(x y collisions _) (: collision-map :move slimeball goal-x goal-y filter)]
(each [_ collision (ipairs collisions)]
(let [other (. collision :other)
diff --git a/wrap.fnl b/wrap.fnl
index e3179e5..e4bed7b 100644
--- a/wrap.fnl
+++ b/wrap.fnl
@@ -19,6 +19,8 @@
;;;; This module contains non-game-specific bits and mode-changing logic.
+(math.randomseed (os.time))
+
(var scale 2)
(local canvas-width 640)
(local canvas-height 480)