diff --git a/README.md b/README.md index c346076..5921f14 100644 --- a/README.md +++ b/README.md @@ -16,3 +16,8 @@ authored by Alex Griffith. A huge thank you to all aforementioned. You have made my learning possible, and my exploration into game-dev and Fennel/Love2D much more accessible and enjoyable! + +## Assets + +This project uses textures made by thatguynm found here: +[64px Textures/Tilesheet](https://thatguynm.itch.io/pixelated-textures). diff --git a/assets/textures/walls/001_tgnm-wall-10.png b/assets/textures/walls/001_tgnm-wall-10.png new file mode 100644 index 0000000..29cf293 Binary files /dev/null and b/assets/textures/walls/001_tgnm-wall-10.png differ diff --git a/assets/textures/walls/002_tgnm-wall-11.png b/assets/textures/walls/002_tgnm-wall-11.png new file mode 100644 index 0000000..a7c0266 Binary files /dev/null and b/assets/textures/walls/002_tgnm-wall-11.png differ diff --git a/assets/textures/walls/003_tgnm-wall-14.png b/assets/textures/walls/003_tgnm-wall-14.png new file mode 100644 index 0000000..24bf3b4 Binary files /dev/null and b/assets/textures/walls/003_tgnm-wall-14.png differ diff --git a/assets/textures/walls/bluestone.png b/assets/textures/walls/bluestone.png deleted file mode 100755 index e3bc499..0000000 Binary files a/assets/textures/walls/bluestone.png and /dev/null differ diff --git a/assets/textures/walls/colorstone.png b/assets/textures/walls/colorstone.png deleted file mode 100755 index 507f12e..0000000 Binary files a/assets/textures/walls/colorstone.png and /dev/null differ diff --git a/assets/textures/walls/greystone.png b/assets/textures/walls/greystone.png deleted file mode 100755 index 18b51dd..0000000 Binary files a/assets/textures/walls/greystone.png and /dev/null differ diff --git a/assets/textures/walls/mossy.png b/assets/textures/walls/mossy.png deleted file mode 100755 index 22ca59f..0000000 Binary files a/assets/textures/walls/mossy.png and /dev/null differ diff --git a/assets/textures/walls/purplestone.png b/assets/textures/walls/purplestone.png deleted file mode 100755 index 425bd71..0000000 Binary files a/assets/textures/walls/purplestone.png and /dev/null differ diff --git a/assets/textures/walls/redbrick.png b/assets/textures/walls/redbrick.png deleted file mode 100755 index 3eb620f..0000000 Binary files a/assets/textures/walls/redbrick.png and /dev/null differ diff --git a/assets/textures/walls/wood.png b/assets/textures/walls/wood.png deleted file mode 100755 index c30c317..0000000 Binary files a/assets/textures/walls/wood.png and /dev/null differ diff --git a/raycaster.fnl b/raycaster.fnl index 1f24b28..0a7de5d 100644 --- a/raycaster.fnl +++ b/raycaster.fnl @@ -20,22 +20,22 @@ ; ### Texture Information ### (var walls []) -(var wall-textures (love.filesystem.getDirectoryItems "textures/walls")) +(var wall-textures (love.filesystem.getDirectoryItems "assets/textures/walls")) (var (tex-height tex-width) (values 64 64)) (var skybox []) -(var skybox-textures (love.filesystem.getDirectoryItems "textures/skybox")) +(var skybox-textures (love.filesystem.getDirectoryItems "assets/textures/skybox")) (each [_ v (ipairs wall-textures)] (local wall {}) - (tset wall :t (love.graphics.newImage (.. "textures/walls/" v))) + (tset wall :t (love.graphics.newImage (.. "assets/textures/walls/" v))) (tset wall :w (love.graphics.getWidth (. wall :t))) (tset wall :h (love.graphics.getHeight (. wall :t))) (table.insert walls wall)) (each [_ v (ipairs skybox-textures)] (local skyb {}) - (tset skyb :t (love.graphics.newImage (.. "textures/skybox/" v))) + (tset skyb :t (love.graphics.newImage (.. "assets/textures/skybox/" v))) (tset skyb :w (love.graphics.getWidth (. skyb :t))) (tset skyb :h (love.graphics.getHeight (. skyb :t))) (table.insert skybox skyb)) @@ -289,23 +289,5 @@ :keypressed (fn keypressed [k] (when (= k "x") (love.event.quit)) - (when (= k "u") (set offst-x (+ offst-x 5))) - (when (= k "o") (set offst-x (- offst-x 5))) - (when (= k "y") (set offst-y (- offst-y 5))) - (when (= k "h") (set offst-y (+ offst-y 5))) ) } - -; (fn move-player [x] -; (let [new-x (+ posx (* (math.cos dirx)) x) new-y (+ posy (* (math.sin diry)) x)] -; (when (= (. map (math.floor new-y) (math.floor new-x)) 0) -; (set posx new-x) (set posy new-y)))) - -; (fn rotate-player [d] -; (local rotation-speed 1) -; (var old-dirx dirx) -; (set dirx (- (* dirx (math.cos (* d rotation-speed))) (* diry (math.sin (* d rotation-speed))))) -; (set diry (+ (* old-dirx (math.sin (* d rotation-speed))) (* diry (math.cos (* d rotation-speed))))) -; (var old-planex planex) -; (set planex (- (* planex (math.cos (* d rotation-speed))) (* planey (math.sin (* d rotation-speed))))) -; (set planey (+ (* old-planex (math.sin (* d rotation-speed))) (* planey (math.cos (* d rotation-speed))))))