An open API service indexing awesome lists of open source software.

https://github.com/isaka-james/gemu-la-nyoka

Game of Snake written in Rust
https://github.com/isaka-james/gemu-la-nyoka

game piston-window rand rust snake snake-game

Last synced: about 1 year ago
JSON representation

Game of Snake written in Rust

Awesome Lists containing this project

README

          

# Gemu La Nyoka


since 04 Sep,2024

**Gemu La Nyoka** is a classic snake game implemented in Rust. The goal is to guide the snake to eat food, grow longer, and avoid colliding with itself or the walls. This project demonstrates basic game development principles using Rust.

## Features
- [x] - Simple and intuitive controls
- [x] Incremental difficulty with growing snake
- [x] Fun and engaging gameplay
- [ ] Score tracking

## Screenshots

![image](https://github.com/user-attachments/assets/eba4c7dc-7027-49b4-bb08-62b8e2e7752a)

## Getting Started

### Prerequisites

- Rust (latest stable version)
- Cargo (Rust package manager)

### Installation

1. Clone the repository:

```sh
git clone https://github.com/isaka-james/gemu-la-nyoka.git
```

2. Navigate to the project directory:

```sh
cd gemu-la-nyoka
```

3. Build the project:

```sh
cargo build
```

4. Run the game:

```sh
cargo run
```

## Controls

- **Arrow Keys**: Move the snake
- **ESC**: Exit the game

## Code Structure

- `src/main.rs`: The main entry point for the game
- `src/game.rs`: Contains the game logic and mechanics
- `src/snake.rs`: Handles the snake's movement and growth
- `src/draw.rs`: Functions for drawing game elements on the screen

## Contributing

Contributions are welcome! Please fork the repository and create a pull request for any improvements or new features.

1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

## License

Distributed under the MIT License. See `LICENSE` for more information.

## Acknowledgments

- Rust community for excellent resources and support
- [Piston Window](https://github.com/PistonDevelopers/piston_window) for the windowing and graphics library
- [rand](https://github.com/rust-random/rand) for random number generation library
- Project inspired by [tensor](https://www.youtube.com/@TensorProgramming)

## Contact

Isaka James - [GitHub](https://github.com/isaka-james)