Skip to content

Releases: Cristi-Croitoru/snake

Release 0.5.0: New Graphics

Pre-release

Choose a tag to compare

@Cristi-Croitoru Cristi-Croitoru released this 15 Sep 08:41
b7be27e

New Features

  • Main Menu
    image

  • Settings menu to toggle legacy graphics on or off
    image

  • Credits screen

  • New graphics
    image

  • New game over screen
    image

What's Changed

  • Overhaul by @IceTheCoder in #25

Full Changelog: 0.4.0...0.5.0

Release 0.4.0: High Score

Pre-release

Choose a tag to compare

@Cristi-Croitoru Cristi-Croitoru released this 02 Jul 11:35
daab134

2 July 2024

Improvements

  • High Score: Added a high score, displayed during gameplay and on the game over screen.
  • UI Updates: Updated the game and game over screens with new colors.
    image
    image
    image
    image

What I learned

  • Using local storage.

What's Changed

  • High score by @IceTheCoder in #23
  • Update README.md by @IceTheCoder in #24

Full Changelog: 0.3.1...0.4.0

Release 0.3.1: Fix score bug

Pre-release

Choose a tag to compare

@Cristi-Croitoru Cristi-Croitoru released this 02 Jul 09:04
c4fc165

Bug fix

  • Fixed a bug where the last score would be displayed until the player increased their score.

What's Changed

  • reset score upon restart by @IceTheCoder in #22

Full Changelog: 0.3.0...0.3.1

Release 0.3.0: Score during gameplay

Pre-release

Choose a tag to compare

@Cristi-Croitoru Cristi-Croitoru released this 02 Jul 07:41
5d8da77

2 July 2024

New Features

  • Gameplay Score Display: Added a score that is displayed during gameplay, allowing players to better understand their skill and track their performance.
    image

What's Changed

  • Score during gameplay by @IceTheCoder in #21

Full Changelog: 0.2.6.2...0.3.0

Release 0.2.6.2: Disable swipe script when game is over

Choose a tag to compare

@Cristi-Croitoru Cristi-Croitoru released this 01 Jul 12:38
6731bfe

1 July 2024

Improvements

  • Disabled swipe script when it's not used (when the game is over) to avoid unnecessary processes (it would still detect swipes when the game wasn't played), leading to better performance.

What's Changed

  • Disable swipe script when game over by @IceTheCoder in #20

Full Changelog: 0.2.6.1...0.2.6.2

Release 0.2.6.1: Restart scene instead of reloading page

Choose a tag to compare

@Cristi-Croitoru Cristi-Croitoru released this 01 Jul 11:46
ac56067

1 July 2024

Improvements

  • Improved performance by restarting the game scene when the player would restart the game instead of reloading the whole page, using less resources and being more efficient.

What's Changed

  • Restart scene instead of reloading page by @IceTheCoder in #19

Full Changelog: 0.2.6...0.2.6.1

Release 0.2.6: Adjusted game size

Pre-release

Choose a tag to compare

@Cristi-Croitoru Cristi-Croitoru released this 01 Jul 08:22
409bd92

1 July 2024

Improvements

  • Modified the game size to ensure it fits properly on mobile devices without being cut off.

What's Changed

  • fix by @IceTheCoder in #18

Full Changelog: 0.2.5...0.2.6

Release 0.2.5: Movement bug fix

Pre-release

Choose a tag to compare

@Cristi-Croitoru Cristi-Croitoru released this 30 Jun 15:26
fefa31e

Bug fixes

  • Fixed a bug where the player could rotate 180 degrees in the same column by swiping:
    • For example, previously, if the snake was heading right and the player swiped down then immediately up, the snake would erroneously change direction to down and then up.

Technicalities

if (this.canChangeDirection && this.direction !== direction && this.direction !== Math.abs(180 - direction)) {

  • The issue stemmed from incorrect direction comparison logic:
    • Originally, I compared the current direction (this.direction, which was DOWN in the above example) against the opposite of the current direction (UP): DOWN !== UP. This comparison always returned true, allowing illegal movements.
    • Instead of the correct approach of checking the requested direction (UP) with the opposite of the current direction (opposite of DOWN is UP): UP !== UP is false).
  • Furthermore, Math.abs(180 - direction) didn't consistently return the expected result.
    • For instance, if the current direction (this.direction) is 90 (right), the expected result is 270 (left) (the opposite of the current direction, right), but the calculation would return 90 instead.
    • Now, the result is determined via a separate function to guarantee a correct result:
    function oppositeDegrees(degrees) {
      if (degrees === 0) {
        return 180;
      } else if (degrees === 90) {
        return 270;
      } else if (degrees === 180) {
        return 0;
      } else if (degrees === 270) {
        return 90;
      }
    }

What's Changed

  • Bug can change direction 180 degree immediately after directin change by @IceTheCoder in #17

Full Changelog: 0.2.4...0.2.5

30 June 2024

Release 0.2.4: Bug fixes

Pre-release

Choose a tag to compare

@Cristi-Croitoru Cristi-Croitoru released this 30 Jun 14:44
953e7f6

Bug fixes

  • Fixed a game-freezing bug triggered by two quickly-succeeded swipe gestures.
  • Fixed a bug causing site flickering when restarting the game after a loss.

Code-cleaning

  • Added additional debug messages, some of them color-coded.

What I learned

  • Implementing color formatting for console.log() messages.
  • Passing arguments to a function called by a method such as setTimeout().

30 June 2024

What's Changed

  • Bug fix game freezes after two quick swipes by @IceTheCoder in #16

Full Changelog: 0.2.3.1...0.2.4

Release 0.2.3.1: Code-cleaning

Pre-release

Choose a tag to compare

@Cristi-Croitoru Cristi-Croitoru released this 30 Jun 09:36
c8f9737

30 June 2024

What's Changed

  • Code cleaning by @IceTheCoder in #15

Full Changelog: 0.2.3...0.2.3.1