diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 0d3f0e7..bb0eeb4 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -13,9 +13,9 @@ on: type: string env: - binary: hello-bevy # [CHANGE]: This needs to match the project name in cargo.toml + binary: charon add_binaries_to_github_release: true - # itch_target: eerii/hello-bevy # [CHANGE]: If you want to deploy to itch, set this as your username/project-url + itch_target: eerii/charon jobs: get-version: diff --git a/Cargo.lock b/Cargo.lock index 6ce6e27..39d7275 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -644,6 +644,16 @@ dependencies = [ "syn 2.0.39", ] +[[package]] +name = "bevy_ecs_tilemap" +version = "0.12.0" +source = "git+https://github.com/divark/bevy_ecs_tilemap.git?branch=0.12-fixes#658b6c12441a808c8342233a230863d3c74f780f" +dependencies = [ + "bevy", + "log", + "regex", +] + [[package]] name = "bevy_egui" version = "0.23.0" @@ -1411,6 +1421,23 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +[[package]] +name = "charon" +version = "0.1.0" +dependencies = [ + "bevy", + "bevy-inspector-egui", + "bevy-persistent", + "bevy_asset_loader", + "bevy_ecs_tilemap", + "bevy_embedded_assets", + "bevy_kira_audio", + "bevy_mod_debugdump", + "iyes_progress", + "rand", + "serde", +] + [[package]] name = "clang-sys" version = "1.6.1" @@ -2209,22 +2236,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "hello-bevy" -version = "0.12.3" -dependencies = [ - "bevy", - "bevy-inspector-egui", - "bevy-persistent", - "bevy_asset_loader", - "bevy_embedded_assets", - "bevy_kira_audio", - "bevy_mod_debugdump", - "iyes_progress", - "rand", - "serde", -] - [[package]] name = "hexasphere" version = "9.1.0" diff --git a/Cargo.toml b/Cargo.toml index d565f94..e3a53a8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,8 +1,8 @@ [package] -name = "hello-bevy" # [CHANGE]: Set your project name. -version = "0.12.3" +name = "charon" +version = "0.1.0" edition = "2021" -description = "a bevy game template" +description = "a game for the bevy jam 4" exclude = ["build", "assets", ".data"] [profile.dev.package."*"] @@ -32,5 +32,6 @@ iyes_progress = { version = "0.10", features = [ "assets" ] } # Track loading an bevy-inspector-egui = { version = "0.21" } # Inspector bevy-persistent = { version = "0.4", features = ["toml"] } # Persistent values (for saving) bevy_mod_debugdump = { version = "0.9" } # Debug graphs +bevy_ecs_tilemap = { git = "https://github.com/divark/bevy_ecs_tilemap.git", branch = "0.12-fixes" } # Tilemap (main repo is not updated for 0.12) rand = { version = "0.8" } serde = { version = "1.0", features = ["derive"] } diff --git a/assets/fonts/pixel.ttf b/assets/fonts/pixel.ttf deleted file mode 100644 index 5cf4045..0000000 Binary files a/assets/fonts/pixel.ttf and /dev/null differ diff --git a/assets/icons/pixelbevy.png b/assets/icons/pixelbevy.png deleted file mode 100644 index cced526..0000000 Binary files a/assets/icons/pixelbevy.png and /dev/null differ diff --git a/assets/sprites/temp_tile.png b/assets/sprites/temp_tile.png new file mode 100644 index 0000000..bb7579e Binary files /dev/null and b/assets/sprites/temp_tile.png differ diff --git a/examples/dvd.rs b/examples/dvd.rs deleted file mode 100644 index 023da23..0000000 --- a/examples/dvd.rs +++ /dev/null @@ -1,210 +0,0 @@ -use bevy::{prelude::*, sprite::MaterialMesh2dBundle, window::WindowResolution}; -use bevy_embedded_assets::{EmbeddedAssetPlugin, PluginMode}; -use bevy_kira_audio::prelude::*; -use bevy_persistent::Persistent; -use hello_bevy::{ - config::GameOptions, - load::{GameAssets, SampleAssets}, - GamePlugin, GameState, -}; - -const SIZE: Vec2 = Vec2::new(600., 600.); - -fn main() { - App::new() - .add_plugins(( - EmbeddedAssetPlugin { - mode: PluginMode::ReplaceDefault, - }, - DefaultPlugins.set(WindowPlugin { - primary_window: Some(Window { - title: "DVD Screensaver".to_string(), - resolution: WindowResolution::new(SIZE.x, SIZE.y), - resizable: false, - canvas: Some("#bevy".to_string()), - prevent_default_event_handling: false, - ..default() - }), - ..default() - }), - GamePlugin, - SampleGamePlugin, - )) - // Run - .run(); -} - -// ······ -// Plugin -// ······ - -pub struct SampleGamePlugin; - -impl Plugin for SampleGamePlugin { - fn build(&self, app: &mut App) { - app.add_event::() - .add_systems( - OnEnter(GameState::Play), - (init_sample.run_if(run_once()), resume_game), - ) - .add_systems( - Update, - (update_sample, on_collision).run_if(in_state(GameState::Play)), - ) - .add_systems(OnExit(GameState::Play), pause_game); - } -} - -// ·········· -// Components -// ·········· - -#[derive(Component)] -struct Velocity(Vec2); - -#[derive(Component)] -struct Counter(u32); - -#[derive(Component)] -struct GameCamera; - -// ······ -// Events -// ······ - -#[derive(Event)] -struct CollisionEvent(Entity); - -// ······· -// Systems -// ······· - -fn init_sample( - mut cmd: Commands, - assets: Res, - opts: Res>, - mut meshes: ResMut>, - mut materials: ResMut>, -) { - // Camera - cmd.spawn((Camera2dBundle::default(), GameCamera)); - - // Background - cmd.spawn(MaterialMesh2dBundle { - mesh: meshes.add(Mesh::from(shape::Quad::default())).into(), - transform: Transform::from_xyz(0., 0., -10.).with_scale(SIZE.extend(1.)), - material: materials.add(ColorMaterial::from(opts.color.darker)), - ..default() - }); - - // Sprites - for velocity in [ - Vec2::new(300., 250.), - Vec2::new(-150., 400.), - Vec2::new(200., -350.), - ] { - cmd.spawn(( - SpriteBundle { - texture: assets.bevy_icon.clone(), - sprite: Sprite { - custom_size: Some(Vec2::new(96., 96.)), - ..default() - }, - transform: Transform::from_translation(Vec3::new(0., 0., 1.)), - ..default() - }, - Velocity(velocity), - )); - } - - // Counter text - cmd.spawn(( - Text2dBundle { - text: Text::from_section( - "0", - TextStyle { - font: assets.font.clone(), - font_size: 192., - color: opts.color.mid, - }, - ), - ..default() - }, - Counter(0), - )); -} - -fn update_sample( - time: Res