Skip to content

blobbyofficial/snake-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

32 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

This website is moving!

Thanks a lot to anyone who played this fun and simple game. It will soon be hosted on the Classic-Games-Hub very soon. It is moving due to it being such an old and low quality game. The new version will be a lot better, and there will be lots more games to play!


Snake Logo

Welcome to Snake-Game โ€“ a modern, responsive reimagination of the classic Snake game by blobbyofficial!

Relive the nostalgia, enjoy smooth animations, and challenge yourself to beat your high score across both desktop and mobile devices. ๐Ÿš€


Table of Contents

  1. Introduction
  2. Features
  3. How to Play
  4. Installation & Running Locally
  5. Folder Structure
  6. Development & Technologies
  7. Behind the Scenes
  8. Contributing
  9. Future Enhancements
  10. License
  11. Acknowledgements & Contact
  12. Changelog
  13. More Info
  14. Advert & Promotions
  15. Extended Details

Introduction

Welcome to Snake.io Game! This project is a modern twist on the classic Snake game built entirely with HTML, CSS, and JavaScript.
Designed by blobbyofficial, this game is now part of the Classic Games Hub. Whether you're playing on desktop or mobile, enjoy the nostalgic gameplay with smooth animations and intuitive controls. ๐Ÿ˜Ž

This README provides a deep dive into the projectโ€”from its folder structure to development insights and future plans.


Features

  • Smooth Animations: Enjoy beautifully interpolated movement between grid cells that makes the snake glide rather than jump.
  • Mobile-Friendly Controls: Use swipe gestures on mobile devices to control the snake, while desktop players can rely on arrow keys or WASD.
  • Responsive Design: The game is built to work seamlessly on desktops, tablets, and smartphones.
  • High Score Tracking: Your best score is saved locally so you can always try to beat your previous record.
  • Simple & Intuitive UI: Minimalistic design with a retro neon vibe.
  • Dynamic Grid Display: A clear grid is drawn on the canvas to emphasize the classic look.
  • Robust Collision Detection: The game ends when you collide with the wall or your own body.
  • Two-Page Experience: A polished start screen (index.html) and a game screen (game.html) for a smooth user experience.

And much, much more... ๐Ÿš€๐Ÿ”ฅ


How to Play

  1. Start Screen: Open the start page and press "Play" to begin.
  2. Desktop Controls: Use arrow keys or WASD to direct the snake.
  3. Mobile Controls: Swipe in the direction you want the snake to go.
  4. Objective: Eat the red food to grow longer and score points.
  5. Game Over: Avoid hitting the walls or your own tail. When the game ends, you can press the "Back" button to return to the start screen.

Tip: Try to beat your own high score and challenge your friends to do the same! ๐Ÿ˜„


Installation & Running Locally

To run Snake.io Game on your machine, follow these steps:

  1. Clone the Repository:
    git clone https://github.com/blobbyofficial/snake-io-game.git
  2. Navigate to the Project Directory:
    cd snake-io-game
  3. Open the Start Page: Open html/index.html in your web browser. You can simply double-click the file or use your terminal:
    open html/index.html
  4. Enjoy the Game: Click the Play button to start playing. Use the provided controls to navigate the snake and achieve a high score! If you encounter any issues, ensure that your browser supports modern JavaScript and HTML5.

Folder Structure

/snake-io-game
โ”œโ”€โ”€ /css
โ”‚   โ””โ”€โ”€ style.css            # Main stylesheet for both pages
โ”œโ”€โ”€ /js
โ”‚   โ”œโ”€โ”€ script.js            # Game logic and animations for the game page
โ”‚   โ””โ”€โ”€ start-page.js        # (Optional) JavaScript for start screen behavior
โ”œโ”€โ”€ /images
โ”‚   โ”œโ”€โ”€ logo.png             # Logo image for the game
โ”‚   โ””โ”€โ”€ architecture.png     # Architecture/diagram image (if available)
โ”œโ”€โ”€ /html
โ”‚   โ”œโ”€โ”€ index.html           # Start page (landing screen)
โ”‚   โ””โ”€โ”€ game.html            # Game page (where the game is played)
โ””โ”€โ”€ README.md                # This file

Each folder is organized to keep your assets, scripts, and styles separate and maintainable. This structure makes it easier to expand the project laterโ€”whether adding new features, pages, or assets.


Development & Technologies

Snake.io Game was built using:

  • HTML5: For semantic, accessible markup.
  • CSS3: For styling, layout, and responsive design.
  • Vanilla JavaScript: For game logic, animations, and input handling.
  • localStorage: For persisting high scores across sessions.

Tools Used:

  • Visual Studio Code (or any preferred code editor)
  • Git for version control
  • GitHub for repository hosting and collaboration
  • Browser developer tools for debugging

The project was developed with a focus on performance, simplicity, and a retro aesthetic that honors classic arcade games.


Behind the Scenes

The journey of creating Snake.io Game began as a small experiment. Over time, the project evolved through several iterations:

  • Prototype Phase: A basic implementation of snake movement and collision detection.
  • Beta Phase: Introduced smooth animations and refined grid-based movement.
  • Final Release: Added mobile swipe controls, a dedicated start screen, high score tracking, and polished UI elements.

Challenges Overcome:

  • Smooth Animations: Achieved using interpolation techniques to make movement seamless.
  • Cross-Platform Input: Integrating keyboard and touch/swipe controls.
  • Responsive Design: Ensuring that the game looks great on all devices.
  • Performance Optimization: Balancing visual effects with smooth gameplay even on lower-end devices.

Every bug and feature request was a learning experience that shaped the final product.


Contributing

We welcome contributions to Snake.io Game! Hereโ€™s how you can help:

  1. Fork the Repository: Click the "Fork" button at the top of the GitHub page.
  2. Clone Your Fork:
    git clone https://github.com/your-username/snake-io-game.git
  3. Create a New Branch:
    git checkout -b feature-or-bugfix
  4. Make Your Changes: Follow our code style guidelines, comment your code, and test thoroughly.
  5. Submit a Pull Request: Provide a detailed description of your changes.

Code Style Guidelines:

  • Use descriptive variable names.
  • Write clean, modular code.
  • Comment where necessary.
  • Follow standard JavaScript best practices.

Every contribution is appreciated, whether it's a bug fix, new feature, or documentation improvement. Happy coding! ๐Ÿค“


Future Enhancements

Weโ€™re continuously working to improve Snake.io Game. Here are some ideas for future updates:

  • Multiplayer Mode: Enable real-time multiplayer gameplay.
  • Advanced Visual Effects: Implement particle effects, dynamic backgrounds, and more refined animations.
  • Customizable Skins & Themes: Let users choose different snake skins, color schemes, and backgrounds.
  • Global Leaderboards: Integrate with a backend service to display global rankings.
  • Sound Effects & Music: Add immersive audio to enhance the gaming experience.
  • Settings Menu: Provide options for adjusting speed, difficulty, and control sensitivity.

Your suggestions are welcome! Feel free to open an issue or submit a pull request with your ideas.


License

This project is licensed under the MIT License.
You are free to use, modify, and distribute this software as long as the original copyright notice and license terms are included.

For details, see the LICENSE file.


Acknowledgements & Contact

Snake.io Game was developed by blobbyofficial. Special thanks to:

  • The open-source community for libraries, inspiration, and support.
  • Everyone who has played and provided feedback on the game.
  • Classic arcade games for inspiring this project.

For any questions, suggestions, or contributions, please contact:

  • GitHub: blobbyofficial
  • Website: Classic Games Hub
  • Twitter: @blobbyofficial

Changelog

  • Version 1.0.0 (Initial Release): Basic Snake game implemented with grid-based movement.
  • Version 1.0.1: Fixed minor bugs in collision detection and improved performance.
  • Version 1.0.2: Updated documentation and refined input handling.

More Info

For more information about Snake.io Game, check out:

  • The Classic Games Hub for more retro game projects.
  • Our blog posts and developer diary entries on the GitHub repository.
  • Detailed documentation in the docs/ folder (if available) covering architecture, algorithms, and more.

Advert & Promotions ๐Ÿš€

๐Ÿ”ฅ Experience the Ultimate Retro Gaming Revival! ๐Ÿ”ฅ

Join thousands of gamers on the Classic Games Hub where you can explore a curated collection of timeless arcade classics and modern remakes.

Special Offer: Sign up now to receive exclusive updates, themed game nights, and bonus in-game items!
Follow us on Twitter: @blobbyofficial for the latest news and promotions.
Subscribe to our Newsletter: Stay informed about upcoming games, patches, and community events.
Donโ€™t miss out on the retro revolutionโ€”play, share, and enjoy the classics! ๐ŸŽฎโœจ


Extended Details

Technical Architecture
The Snake.io Game project is structured to be lightweight, modular, and easily extendable. Key components include:

  • HTML: Markup for two main pages (start and game).
  • CSS: A unified stylesheet (style.css) that adapts to multiple devices.
  • JavaScript: Handles game logic, animation, input (keyboard and touch), collision detection, and high score management.
  • localStorage: Used to store high scores persistently.

Detailed Component Interaction

  • Game Loop: The game loop uses requestAnimationFrame to render frames and interpolate movement between grid cells, resulting in smooth animations.
  • Input Handling: Both keyboard and swipe gestures are supported.
  • Collision Logic: The collision detection checks for wall collisions as well as self-collisions, ending the game if either occurs.
  • Animation Interpolation: A progress variable is used to interpolate between fixed grid positions, making transitions smoother.

Design Philosophy

  • Minimalism: The game design is kept simple and clean to provide an uncluttered, enjoyable gaming experience.
  • Responsiveness: The interface adapts to different screen sizes, ensuring that both desktop and mobile users have a great experience.
  • Modularity: The code is structured to be modular and easy to maintain. Separate files for HTML, CSS, and JavaScript allow for scalable growth and feature additions.
  • User Engagement: Features like high score tracking and responsive controls are designed to keep players engaged and encourage repeat play.

Developer Insights

Developing Snake.io Game was both challenging and rewarding. From refining the smooth movement algorithms to ensuring responsive input handling across devices, every step was a learning opportunity.

โ€œEvery line of code was written with passion for retro gaming and the joy of creating something timeless.โ€ โ€“ blobbyofficial


Final Thoughts

We hope you enjoy playing Snake.io Game as much as we enjoyed creating it. Your feedback is incredibly valuable to us. If you have suggestions, bug reports, or ideas for new features, please donโ€™t hesitate to open an issue or submit a pull request.

Thank you for your support and happy gaming! ๐ŸŽฎโค๏ธ

Made with โค๏ธ by blobbyofficial

๐Ÿš€ Follow Me ๐ŸŒŸ

Stay connected and follow me on my social media platforms for updates, insights, and fun:

  • ๐Ÿ’ป GitHub: @BlobbyOfficial
  • ๐Ÿฆ Twitter: @BlobbyOfficial_
  • ๐Ÿ“ธ Facebook: @BlobbyOfficial
  • ๐ŸŽฅ YouTube: Blobby_Official
  • ๐ŸŽถ TikTok: @BlobbyOfficial_
  • ๐ŸŽค Twitch: @BlobbyOfficial_
  • ๐ŸŒ Personal Website: https://blobbyofficial.github.io/blobbyofficial/

โœจ Letโ€™s connect, collaborate, and explore new ideas! โœจ ๐Ÿ’ฌ Feel free to reach out, ask questions, or share your thoughts!

About

part of classic-games-hub

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors