Inspiration I was inspired to create this number-guessing game as a personal challenge to improve my JavaScript skills and to create a fun and interactive project that could be shared with others. I wanted to create a game that was simple yet engaging, and that could be played in a web browser.
What it does The game prompts the player to guess a number between 1 and 100. Based on their guess, the game provides feedback on whether the guess is too high or too low. The player earns points based on the number of attempts it takes to guess the correct number, with different point values assigned to different ranges of attempts.
How I built it I built the game using HTML, CSS, and JavaScript. HTML is used for the structure of the game, CSS for styling, and JavaScript for the game logic. The game generates a random number between 1 and 100, which the player must guess. The game keeps track of the player's guesses, updates a progress bar based on their performance, and maintains a scoreboard of their total points.
Challenges I ran into One of the challenges I faced was implementing the logic for updating the progress bar based on the player's performance. I also had to ensure that the game provided accurate feedback to the player and correctly calculated their points based on the number of attempts.
Accomplishments that I'm proud of I'm proud of successfully implementing a working number guessing game with a user-friendly interface and engaging gameplay. I'm also proud of the design and layout of the game, which I feel enhances the overall user experience.
What I learned Through this project, I learned more about JavaScript programming, particularly in the context of building interactive web applications. I also gained experience in working with HTML and CSS to create visually appealing and responsive designs.
What's next for Track your game In the future, I plan to add more features to the game, such as a leaderboard to track high scores, different difficulty levels, and the ability for players to save their progress. I also aim to optimize the game for mobile devices to make it more accessible to a wider audience.
Log in or sign up for Devpost to join the conversation.