Giter Club home page Giter Club logo

snail-race's Introduction

SnailRace

SnailRace is an interactive web-based game where users can join and race snails by selecting dice images. The game tracks scores and announces a winner with a fun fireworks animation. The project was developed using HTML, CSS, JavaScript, and Socket.io, with the assistance of ChatGPT for generating code snippets and providing guidance throughout the development process.

How This Was Built Using ChatGPT This project was built with the assistance of ChatGPT, an AI language model developed by OpenAI. ChatGPT provided code snippets, suggested best practices, and guided the development process. The AI helped in structuring the project, writing HTML, CSS, and JavaScript code, and implementing features such as real-time user interaction, grid updates, and the finish screen animation.

image


How to Install

  1. Clone the Repository:

git clone https://github.com/yourusername/snailrace.git
cd snailrace
  1. Install Dependencies:

Ensure you have Node.js installed. Then, run:

npm install
  1. Add Images:

Ensure you have the necessary images in the images folder:

  • d4.png
  • d6.png
  • d8.png
  • d10.png
  • d12.png
  • snail.png
  • background.jpg
  • favicon.ico

How to Run

  1. Start the Server:

Copiar código
node server.js
  1. Access the Game:

Open a web browser and navigate to http://localhost:3000.


How to Play

  1. Join the Game:

When you connect, a unique snail-related name is assigned to you. Your name is displayed at the top of the page.

  1. Select a Dice Image:

Choose one of the dice images at the bottom of the page. The number rolled will be a random value between 1 and the maximum value of the selected dice (e.g., 1-4 for d4).

  1. Move on the Grid:

Your snail moves on the grid based on the number rolled. Each user has a unique row in the grid, and the cell your snail moves to is highlighted.

  1. Track Scores:

The game keeps track of each user's score. The goal is to reach the maximum score (equal to the number of columns).

  1. Win the Game:

When a user reaches the maximum score, a finish screen with fireworks will announce the winner. The game then resets for a new round.


Additional Features

  1. Real-time Interaction:

Users can interact in real-time, with scores and movements updated live for all participants.

  1. Visual Themes:

The game features a snail race theme with a background image and color-coded cells.

  1. Animations:

A fireworks animation is displayed when a user wins the game.

  1. Contributions

Feel free to fork this repository and submit pull requests. Contributions are welcome!

License This project is licensed under the MIT License.


Enjoy playing SnailRace and may the fastest snail win! 🐌🏁

snail-race's People

Contributors

jordi-aily avatar jpuigde avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.