sir-lancebot icon indicating copy to clipboard operation
sir-lancebot copied to clipboard

2048 Game

Open Shivansh-007 opened this issue 4 years ago • 0 comments

Description

2048 is a single-player game in which you must slide around tiles labelled with powers of 2 in four directions. When two tiles of the same value combine, they get added together, creating a new tile with double the value. After each successful move, a random tile either 2 or 4 is generated. The goal, as one might guess, is to reach a tile with a value of 2048. If at any point the user is unable to slide any tiles (the board is full and there are no adjacent combinations to be made) the game is over.

Implementation Detail 1

Since this game's implementation would be based on image manipulation, it would be consuming a lot of resources, so we would need to do something to restrict that, I see two options here:

  1. Adding a "rate limit" for the command, like only one person can play the game at once but I am not in favour of this as others would need to wait to play.
  2. Instead of images we could use emojis (we could add the custom emojis in the emoji server), this would work perfectly but the game UI may not be the best.

Implementation Detail 2

Since the game would be required user input of right/left/up/down we would need to use emojis/buttons. I would like to suggest the use of buttons over emojis as they can be disabled which would be more efficient than removing and adding emojis. Secondly, they would also enable ephemeral replies as the message would have interaction components, which could be used to send error messages ephemerally so that the others won't be bothered with it.

Implementation Detail 3

The leaderboard for this command doesn't need to be implemented and it would be used the one present on #930 :D

Would you like to implement this yourself?

@TizzySaurus has already started working on the 2048 game, so would like to implement this.

Shivansh-007 avatar Dec 09 '21 04:12 Shivansh-007