Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐔 Crossy Chicken

A Crossy Road-style game built with Three.js, where you control a chicken trying to cross busy roads!

🎮 About the Game

Crossy Chicken is a 3D browser game where the player must cross multiple lanes filled with moving vehicles. The goal is to get as far as possible without getting hit!

✨ Features

  • 🎨 3D graphics rendered with Three.js
  • 🚗 Moving vehicles (cars and trucks)
  • 🌳 Environment with trees and grass
  • 📊 Scoring system
  • 🔄 Collision detection
  • 🎯 Dynamic camera that follows the player

🛠️ Technologies

  • Three.js - JavaScript 3D library
  • JavaScript (ES6+) - Programming language
  • CSS3 - Styling

📁 Project Structure

crossy-chicken/
├── src/
│   ├── main.js                    # Main entry point
│   ├── constants.js               # Game constants
│   ├── counter.js                 # Scoring system
│   ├── hitTest.js                 # Collision detection
│   ├── collectUserInput.js        # Input management
│   ├── style.css                  # CSS styles
│   ├── components/                # 3D components
│   │   ├── Camera.js
│   │   ├── Car.js
│   │   ├── DirectionalLight.js
│   │   ├── Grass.js
│   │   ├── Map.js
│   │   ├── Player.js
│   │   ├── Renderer.js
│   │   ├── Road.js
│   │   ├── Tree.js
│   │   ├── Truck.js
│   │   └── Wheel.js
│   └── utilities/                 # Utility functions
│       ├── calculateFinalPosition.js
│       ├── endsUpInValidPosition.js
│       └── generateRows.js
└── LICENSE

🚀 How to Play

  1. Use the arrow keys or WASD to move the chicken
  2. Cross the roads avoiding vehicles
  3. Each line crossed increases your score
  4. Try to get as far as possible!

💻 Installation and Running

Prerequisites

  • Node.js (version 14 or higher)
  • npm or yarn

Steps

  1. Clone the repository:
git clone https://github.com/moon-byme/crossy-chicken.git
cd crossy-chicken
  1. Install dependencies:
npm install
  1. Run the project in development mode:
npm run dev
  1. Open your browser and go to http://localhost:3000 (or the port indicated in the terminal)

🎯 Main Components

Player

The character controlled by the player (chicken)

Map

Manages the generation and organization of the game map

Vehicles

  • Car: Smaller and faster cars
  • Truck: Larger and slower trucks

Environment

  • Grass: Safe areas with grass
  • Road: Road lanes where vehicles travel
  • Tree: Decorative trees

🤝 Contributing

Contributions are welcome! Feel free to:

  1. Fork the project
  2. Create a branch for your feature (git checkout -b feature/MyFeature)
  3. Commit your changes (git commit -m 'Add MyFeature')
  4. Push to the branch (git push origin feature/MyFeature)
  5. Open a Pull Request

📄 License

This project is under the MIT license. See the LICENSE file for more details.

Copyright (c) 2026 Lethycia Zenaide

👤 Author

Lethycia Zenaide - @moon-byme

🙏 Acknowledgments

  • Inspired by the Crossy Road game
  • Three.js for the amazing 3D library
  • Open source community

Made with ❤️ and JavaScript

About

A chicken trying to cross the street. For no good reason.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages