From cf6fc8b7cb8b108e5778481070944acb13513b5d Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Thu, 16 Feb 2023 21:16:20 +0000 Subject: Adjusted map collision --- data/map.json | 4 ++-- src/Game/Entities.hs | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/data/map.json b/data/map.json index f4e6f6b..9eb7906 100644 --- a/data/map.json +++ b/data/map.json @@ -3,7 +3,7 @@ "infinite":false, "layers":[ { - "data":[1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 2, 27, 28, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 27, 28, 1, 2, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 1, 2, 27, 28, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 1, 2, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 1, 2, 55, 56, 55, 56, 27, 28, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 27, 28, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 27, 28, 3, 3, 3, 3, 1, 2, 27, 28, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 1, 2, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 1, 2, 79, 80, 79, 80, 27, 28, 1, 2, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 27, 28, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 27, 28, 55, 56, 55, 56, 1, 2, 27, 28, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 27, 28, 1, 2, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 1, 2, 27, 28, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 1, 2, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 27, 28, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 27, 28, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 2, 27, 28, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 1, 2, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 27, 28, 1, 2, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 1, 2, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 27, 28, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 1, 2, 27, 28, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 27, 28, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 27, 28, 1, 2, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 1, 2, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 1, 2, 27, 28, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 27, 28, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 27, 28, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 2, 27, 28, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 27, 28, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28], + "data":[1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 2, 27, 28, 79, 80, 53, 54, 53, 54, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 27, 28, 1, 2, 53, 54, 79, 80, 79, 80, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 1, 2, 27, 28, 55, 56, 53, 54, 53, 54, 55, 56, 55, 56, 1, 2, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 1, 2, 55, 56, 55, 56, 27, 28, 1, 2, 3, 3, 79, 80, 79, 80, 3, 3, 3, 3, 27, 28, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 27, 28, 3, 3, 3, 3, 1, 2, 27, 28, 79, 80, 53, 54, 53, 54, 79, 80, 79, 80, 1, 2, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 1, 2, 79, 80, 79, 80, 27, 28, 1, 2, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 27, 28, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 27, 28, 55, 56, 55, 56, 1, 2, 27, 28, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 27, 28, 1, 2, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 1, 2, 27, 28, 55, 56, 55, 56, 55, 56, 79, 80, 79, 80, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 1, 2, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 27, 28, 1, 2, 3, 3, 3, 3, 3, 3, 53, 54, 53, 54, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 27, 28, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 2, 27, 28, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 1, 2, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 27, 28, 1, 2, 55, 56, 55, 56, 55, 56, 53, 54, 53, 54, 1, 2, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 27, 28, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 1, 2, 27, 28, 3, 3, 3, 3, 3, 3, 79, 80, 79, 80, 27, 28, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 27, 28, 1, 2, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 1, 2, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 1, 2, 27, 28, 55, 56, 55, 56, 55, 56, 79, 80, 79, 80, 27, 28, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 55, 56, 27, 28, 1, 2, 3, 3, 3, 3, 3, 3, 53, 54, 53, 54, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 2, 27, 28, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 79, 80, 27, 28, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28, 27, 28], "height":22, "id":1, "name":"Base", @@ -27,7 +27,7 @@ "y":0 }, { - "data":[0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 4, 0, 0, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0], "height":22, "id":4, "name":"Blocked", diff --git a/src/Game/Entities.hs b/src/Game/Entities.hs index 95d9626..9152175 100644 --- a/src/Game/Entities.hs +++ b/src/Game/Entities.hs @@ -241,8 +241,8 @@ updateVertical isBlocked jump down e -- go down a 8 pixel tall platform; not ideal to have these values hardcoded here -- but to be fair, the player height/width is hardcoded as well | down - && not (isBlocked (e.x + 2) (e.y + 24 + 8)) - && not (isBlocked (e.x + 12) (e.y + 24 + 8)) = + && not (isBlocked (e.x + 4) (e.y + 24 + 8)) + && not (isBlocked (e.x + 10) (e.y + 24 + 8)) = e {gravity = gravityDown, frame = jumpFrame, y = e.y + 1} | otherwise = e @@ -251,9 +251,9 @@ applyGravity isBlocked v e | v == 0 = e -- hit the floor | isGoingDown - && (isBlocked (e.x + 2) (e.y + 24) || isBlocked (e.x + 12) (e.y + 24)) - && not (isBlocked (e.x + 2) (e.y + 23)) - && not (isBlocked (e.x + 12) (e.y + 23)) = + && (isBlocked (e.x + 4) (e.y + 24) || isBlocked (e.x + 10) (e.y + 24)) + && not (isBlocked (e.x + 4) (e.y + 23)) + && not (isBlocked (e.x + 10) (e.y + 23)) = e {jumping = False, gravity = gravityOff, delay = 0} | otherwise = applyGravity isBlocked (v - 1) e {y = e.y + change} where @@ -263,7 +263,7 @@ applyGravity isBlocked v e updateGravity :: IsBlocked -> Entity -> Entity updateGravity isBlocked e | current > gravityOff = applyGravity isBlocked (gravityTable !! current) e {gravity = new} - | not (isBlocked (e.x + 2) (e.y + 24) || isBlocked (e.x + 12) (e.y + 24)) = e {gravity = gravityDown, frame = jumpFrame} + | not (isBlocked (e.x + 4) (e.y + 24) || isBlocked (e.x + 10) (e.y + 24)) = e {gravity = gravityDown, frame = jumpFrame} | otherwise = e where current = e.gravity -- cgit v1.2.3