FrancisTR / Rhythm-Swipe

A Repository dedicated to the 2D Game "Rhythm Swipe".
https://projectrhythmswipe.netlify.app/
GNU Affero General Public License v3.0
2 stars 0 forks source link

Major Changes to the Game and Website #46

Closed FrancisTR closed 1 year ago

netlify[bot] commented 1 year ago

Deploy Preview for projectrhythmswipe ready!

Name Link
Latest commit b424d8967b2f43cbeb920ab21844b72d0fe4e92d
Latest deploy log https://app.netlify.com/sites/projectrhythmswipe/deploys/64c00cbc84511d000891eb1d
Deploy Preview https://deploy-preview-46--projectrhythmswipe.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

FrostyNick commented 1 year ago

This is a fix in general with the hitbox in the white area where red/blue cubes are at. I found this fix while looking at the new hitbox being a bit off, just to realize this has been a bug for a whilewhile (probably). (Edit: Bug doesn't apply to hit boxes. Still it definitely shows with yellow highlight on character incorrectly. Not sure about everywhere else. So undo some code based on misleading yellow highlighted hit box preview.)

This adjusts hit boxes for changed white area. GitHub doesn't let me suggest it so I will paste it here.

Before:

        beatColorBoolean = (x2[0] > 540 || x2[0] < 480) && (x2[1] > 540 || x2[1] < 480) && (x2[2] > 540 || x2[2] < 480) && (x2[3] > 540 || x2[3] < 480) && (x2[4] > 540 || x2[4] < 480) && (x2[5] > 540 || x2[5] < 480)
        if (pressByBeat === 'red'){
            if ((x2[0] > 540 || x2[0] < 480) && (x2[1] > 540 || x2[1] < 480) && (x2[2] > 540 || x2[2] < 480) && (x2[3] > 540 || x2[3] < 480) && (x2[4] > 540 || x2[4] < 480) && (x2[5] > 540 || x2[5] < 480)){ //If you miss the beat

After:

        beatColorBoolean = (x2[0] > 540 || x2[0] < 470) && (x2[1] > 540 || x2[1] < 470) && (x2[2] > 540 || x2[2] < 470) && (x2[3] > 540 || x2[3] < 470) && (x2[4] > 540 || x2[4] < 470) && (x2[5] > 540 || x2[5] < 470)
        if (pressByBeat === 'red'){
            if ((x2[0] > 540 || x2[0] < 470) && (x2[1] > 540 || x2[1] < 470) && (x2[2] > 540 || x2[2] < 470) && (x2[3] > 540 || x2[3] < 470) && (x2[4] > 540 || x2[4] < 470) && (x2[5] > 540 || x2[5] < 470)){ //If you miss the beat