Skip to content

Writing the classic battleship game in Rust / Bevy.

benracine/bevy-battleship

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bevy Battleship

A simple implementation of the classic Battleship game using the Bevy game engine in Rust.

Features

  • 1 human player vs 1 computer player
  • 10x10 board for each player
  • ECS-based architecture (Entities, Components, Systems)
  • Board and cell grid logic
  • Ready for further development (ships, UI, gameplay)

Getting Started

  1. Install Rust: https://rustup.rs/

  2. Clone this repository

  3. Run the game:

    cargo run

Project Structure

  • src/components.rs - ECS components and data types
  • src/systems.rs - Game systems (setup, camera, etc.)
  • src/resources.rs - Global resources (game state)
  • src/main.rs - App entry point

Development Loop

For a rapid inner development loop, you can use cargo-watch and cargo-update.

Install them with:

cargo install cargo-watch cargo-update

Then, you can automatically check, build, and run your project on file changes with:

cargo watch -x check -x build -x run

This will re-run your code every time you save a file, speeding up your workflow.

Some Bevy Examples

Here are some official Bevy examples you can explore:

About

Writing the classic battleship game in Rust / Bevy.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages