diff options
| author | Jakob L. Kreuze <jakob@memeware.net> | 2018-10-26 14:13:54 -0400 |
|---|---|---|
| committer | Jakob L. Kreuze <jakob@memeware.net> | 2018-10-26 14:13:54 -0400 |
| commit | a610d4f3c513107135ece5276afffa4223c7ee4b (patch) | |
| tree | 5bf84c3afe6608f3b3582240587a29f86b9d7c3e | |
| parent | 558d16e8b2577f9c698a75b833dfc08af4133db9 (diff) | |
Rest of greetz and maps. Game is essentially complete
| -rw-r--r-- | credits.fnl | 24 | ||||
| -rw-r--r-- | game.fnl | 3 | ||||
| -rw-r--r-- | maps/bounce.fnl | 3 | ||||
| -rw-r--r-- | maps/bounce.png | bin | 0 -> 196 bytes | |||
| -rw-r--r-- | maps/fall.fnl | 3 | ||||
| -rw-r--r-- | maps/fall.png | bin | 0 -> 204 bytes | |||
| -rw-r--r-- | maps/gimmick.fnl | 3 | ||||
| -rw-r--r-- | maps/gimmick.png | bin | 0 -> 233 bytes | |||
| -rw-r--r-- | maps/laststretch.fnl | 3 | ||||
| -rw-r--r-- | maps/laststretch.png | bin | 0 -> 255 bytes | |||
| -rw-r--r-- | maps/obstacle.fnl | 3 | ||||
| -rw-r--r-- | maps/obstacle.png | bin | 0 -> 200 bytes | |||
| -rw-r--r-- | maps/tubes.fnl | 3 | ||||
| -rw-r--r-- | maps/tubes.png | bin | 0 -> 190 bytes | |||
| -rw-r--r-- | player.fnl | 2 | ||||
| -rw-r--r-- | slimeball.fnl | 4 | ||||
| -rw-r--r-- | world.fnl | 4 | ||||
| -rw-r--r-- | wrap.fnl | 2 |
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 [] @@ -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 Binary files differnew file mode 100644 index 0000000..63b7201 --- /dev/null +++ b/maps/bounce.png 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 Binary files differnew file mode 100644 index 0000000..6f09270 --- /dev/null +++ b/maps/fall.png 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 Binary files differnew file mode 100644 index 0000000..b1f57a6 --- /dev/null +++ b/maps/gimmick.png 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 Binary files differnew file mode 100644 index 0000000..acb9cda --- /dev/null +++ b/maps/laststretch.png 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 Binary files differnew file mode 100644 index 0000000..c0d8927 --- /dev/null +++ b/maps/obstacle.png 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 Binary files differnew file mode 100644 index 0000000..4b0e292 --- /dev/null +++ b/maps/tubes.png @@ -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) @@ -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) @@ -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) |