From a610d4f3c513107135ece5276afffa4223c7ee4b Mon Sep 17 00:00:00 2001 From: "Jakob L. Kreuze" Date: Fri, 26 Oct 2018 14:13:54 -0400 Subject: Rest of greetz and maps. Game is essentially complete --- credits.fnl | 24 +++++++++++++++++++++--- game.fnl | 3 ++- maps/bounce.fnl | 3 +++ maps/bounce.png | Bin 0 -> 196 bytes maps/fall.fnl | 3 +++ maps/fall.png | Bin 0 -> 204 bytes maps/gimmick.fnl | 3 +++ maps/gimmick.png | Bin 0 -> 233 bytes maps/laststretch.fnl | 3 +++ maps/laststretch.png | Bin 0 -> 255 bytes maps/obstacle.fnl | 3 +++ maps/obstacle.png | Bin 0 -> 200 bytes maps/tubes.fnl | 3 +++ maps/tubes.png | Bin 0 -> 190 bytes player.fnl | 2 +- slimeball.fnl | 4 +--- world.fnl | 4 ++-- wrap.fnl | 2 ++ 18 files changed, 47 insertions(+), 10 deletions(-) create mode 100644 maps/bounce.fnl create mode 100644 maps/bounce.png create mode 100644 maps/fall.fnl create mode 100644 maps/fall.png create mode 100644 maps/gimmick.fnl create mode 100644 maps/gimmick.png create mode 100644 maps/laststretch.fnl create mode 100644 maps/laststretch.png create mode 100644 maps/obstacle.fnl create mode 100644 maps/obstacle.png create mode 100644 maps/tubes.fnl create mode 100644 maps/tubes.png 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 Binary files /dev/null and b/maps/bounce.png 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 Binary files /dev/null and b/maps/fall.png 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 Binary files /dev/null and b/maps/gimmick.png 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 Binary files /dev/null and b/maps/laststretch.png 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 Binary files /dev/null and b/maps/obstacle.png 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 Binary files /dev/null and b/maps/tubes.png 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) -- cgit v1.3