Skip to content

Commit

Permalink
Dialog and NPCs' Behaviors Update: Merge branch 'feature-dialog' into…
Browse files Browse the repository at this point in the history
… develop

* feature-dialog: (24 commits)
  Target Type Detection
  Chase Behavior
  hello clippy
  calculate "closeness" when the FollowBehavior is attribute
  close dialog automatically
  Global Refactor NPC, Behavior, Collisions
  normalize npc interaction
  add Follow behavior
  rearrange button choice
  add `fight_arena` dialog
  bump version to v0.3.9 and update the `README
  add preview and badges
  add the stairs down ramp in the secret room
  fix overlapping secret room stones (cause of stairs' fake perspective)
  add castle theme
  game start, title flex
  keep the mountain at the bottom (and the title in the screen)
  add new changes
  Scaling art with window's resolution (keep the 16/9)
  add smoke anim (random time)
  ...
  • Loading branch information
Wabtey committed Sep 16, 2023
2 parents 0167899 + 7522b55 commit 94b8d8b
Show file tree
Hide file tree
Showing 33 changed files with 4,068 additions and 727 deletions.
66 changes: 65 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,71 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Update Map to v4.0.0
## Dialog Update - [v0.4.0](https://github.com/Fabinistere/fabien-et-la-trahison-de-olf/releases/tag/v0.4.0) - 2023-09-04

## Map, Title Screen and Animation Update - [v0.3.9](https://github.com/Fabinistere/fabien-et-la-trahison-de-olf/releases/tag/v0.3.9) - 2023-08-31

[![v0.3.9](https://img.shields.io/badge/v0.3.9-gray?style=flat&logo=github&logoColor=181717&link=https://github.com/Fabinistere/fabien-et-la-trahison-de-olf/releases/tag/v0.3.9)](https://github.com/Fabinistere/fabien-et-la-trahison-de-olf/releases/tag/v0.3.9)
[![**Full Commits History**](https://img.shields.io/badge/GitHubLog-gray?style=flat&logo=github&logoColor=181717&link=https://github.com/fabinistere/fabien-et-la-trahison-de-olf/commits/v0.3.9)](https://github.com/fabinistere/fabien-et-la-trahison-de-olf/commits/v0.3.9)
![Demo](https://img.shields.io/badge/Demo-gray?style=flat&logo=darkreader&logoColor=181717&link=https://fabinistere.github.io/fabien-et-la-trahison-de-olf/)

### Preview

[![Title Banner](https://github.com/Fabinistere/fabien-et-la-trahison-de-olf/assets/73140258/4cf67c3a-f587-4604-9990-db44143e6fcc)](https://fabinistere.github.io/fabien-et-la-trahison-de-olf/)

<https://github.com/Fabinistere/fabien-et-la-trahison-de-olf/assets/73140258/07cf5f8c-ac60-4d46-be3b-9365b00c6abd>

The Title screen (you can zoom) and the music doesn't quite work in the [web demo](https://fabinistere.github.io/fabien-et-la-trahison-de-olf/).

### Added

- Castle Theme Music

### Removed

- `Location` States to focus on only one location state: `PlayerLocation`

### Changed

- Player Movement
- random idle
- top/bot walk anim
- spritesheet handle
- Menu
- Art Anim (randomness)
- smoke
- lights
- clouds
- Scaling
- Language
- Map
- Z refactor
- Map updated to v4.0.0
- Map design
- new Hall
- new lights
- new secret room
- flower panel
- new Temple
- new floor
- new throne
- new stairs
- new column
- new props
- new statues
- new plants
- new lights
- replace curtains by banners
- Collider generated by sprite
- TODO: create more accurate sprite
- Locations Sensor to detect a location change
- add Balcony Cover
- Sprite are now 1pixel scale
The camera has been adpated to this size

### Fixed

- [All previous layer glitches](https://github.com/Fabinistere/fabien-et-la-trahison-de-olf/issues/2)

## Bevy Migration - [v0.3.8](https://github.com/Fabinistere/fabien-et-la-trahison-de-olf/releases/tag/v0.3.8) - 2023-08-18

Expand Down
22 changes: 20 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,35 @@
[package]
name = "fabien-et-la-trahison-de-olf"
version = "0.3.8"
version = "0.3.9"
authors = ["Morgan Van Amerongen <[email protected]>", "Olf EPAIN <[email protected]>", "Grassouille la Fripouille", "Sombre Roi René"]
repository = "https://github.com/Fabinistere/fabien-et-la-trahison-de-olf"
license = "MIT OR Apache-2.0"
edition = "2021"

[workspace]
resolver = "2"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
bevy = { version = "0.11", features = ["dynamic_linking"] }
bevy_ecs = "0.11"
bevy_reflect = "0.11"

[target.'cfg(target_arch = "wasm32")'.dependencies]
bevy = "0.11"
bevy_ecs = "0.11"
bevy_reflect = "0.11"
# wasm-bindgen = "0.2"


[dependencies]
# ----------- Common ----------
bevy = "0.11"
# bevy = "0.11"
bevy_tweening = "0.8"

# ---------- Dialog -----------
yml_dialog = "0.2"
serde_yaml = "0.9"

# ----- Hitbox - Velocity -----
bevy_rapier2d = { version = "0.22", features = ["simd-stable", "debug-render-2d"] }

Expand Down
25 changes: 17 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
# Fabien et la trahison de Olf

[![v0.3.8](https://img.shields.io/badge/v0.3.8-gray?style=flat&logo=github&logoColor=181717&link=https://github.com/Fabinistere/fabien-et-la-trahison-de-olf/releases/tag/v0.3.8)](https://github.com/Fabinistere/fabien-et-la-trahison-de-olf/releases/tag/v0.3.8)
[![v0.3.9](https://img.shields.io/badge/v0.3.9-gray?style=flat&logo=github&logoColor=181717&link=https://github.com/Fabinistere/fabien-et-la-trahison-de-olf/releases/tag/v0.3.9)](https://github.com/Fabinistere/fabien-et-la-trahison-de-olf/releases/tag/v0.3.9)
[![Bevy tracking](https://img.shields.io/badge/Bevy%20tracking-released%20version-lightblue)](https://github.com/bevyengine/bevy/blob/main/docs/plugins_guidelines.md#main-branch-tracking)
[![MIT/Apache 2.0](https://img.shields.io/badge/license-MIT%2FApache-blue.svg)](https://github.com/fabinistere/fabien-et-la-trahison-de-olf#license)
![Demo](https://img.shields.io/badge/Demo-gray?style=flat&logo=darkreader&logoColor=181717&link=https://fabinistere.github.io/fabien-et-la-trahison-de-olf/)

## Preview

[Physics](https://github.com/Fabinistere/fabien-et-la-trahison-de-olf/assets/73140258/89c2279a-9a56-4708-8812-220a8ea0645e)
[![Title Banner](https://github.com/Fabinistere/fabien-et-la-trahison-de-olf/assets/73140258/4cf67c3a-f587-4604-9990-db44143e6fcc)](https://fabinistere.github.io/fabien-et-la-trahison-de-olf/)

## Inspirations
<https://github.com/Fabinistere/fabien-et-la-trahison-de-olf/assets/73140258/07cf5f8c-ac60-4d46-be3b-9365b00c6abd>

This is my first Bevy project so I used another game source code to learn.
I've used [this repository](https://github.com/TheRealTeamFReSh/MurderUserDungeon)
a lot to understand how Bevy works and is used.

![the freaking poti chat](https://user-images.githubusercontent.com/73140258/176795348-5eb8f7ed-87c4-49d2-82d4-6895bbddedf6.gif "poti chat")
Play the [technical demo here](https://fabinistere.github.io/fabien-et-la-trahison-de-olf/)

## Contribute

Expand Down Expand Up @@ -44,3 +41,15 @@ All code in this repository is dual-licensed under either:
- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0))

See the very good reasons for including both [here](https://github.com/bevyengine/bevy/issues/2373).

## Note

[Physics](https://github.com/Fabinistere/fabien-et-la-trahison-de-olf/assets/73140258/89c2279a-9a56-4708-8812-220a8ea0645e)

## Inspirations

This is my first Bevy project so I used another game source code to learn.
I've used [this repository](https://github.com/TheRealTeamFReSh/MurderUserDungeon)
a lot to understand how Bevy works and is used.

![the freaking poti chat](https://user-images.githubusercontent.com/73140258/176795348-5eb8f7ed-87c4-49d2-82d4-6895bbddedf6.gif "poti chat")
37 changes: 37 additions & 0 deletions data/fabien_dialog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
1:
source: Fabien
content:
text:
- Hello
- <3
exit_state: 2
2:
source: Player
content:
- text: Hey
condition: null
exit_state: 3
- text: No Hello
condition: null
exit_state: 4
- text: Want to share a flat ?
condition: null
exit_state: 5
3:
source: Fabien
content:
text:
- :)
exit_state: 6
4:
source: Fabien
content:
text:
- :O
exit_state: 6
5:
source: Fabien
content:
text:
- Sure
exit_state: 6
37 changes: 37 additions & 0 deletions data/hugo_dialog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
1:
source: Hugo
content:
text:
- Hello fellow friend
exit_state: 2
2:
source: Player
content:
- text: Just Follow me for a sec.
condition: null
exit_state: 3
- text: Who are you again ?
condition: null
exit_state: 4
3:
source: Hugo
content:
text:
- :)
exit_state: 6
trigger_event:
- FollowPlayer
4:
source: Hugo
content:
text:
- :O
exit_state: 5
5:
source: Hugo
content:
text:
- Still shocked.
exit_state: 2
trigger_event:
- EndDialog
39 changes: 39 additions & 0 deletions data/olf_dialog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
1:
source: Olf
content:
text:
- Il faut absolument sauver les Fabien du Chien Geant
exit_state: 2
2:
source: Player
content:
- text: ...
condition: null
exit_state: 3
3:
source: Olf
content:
text:
- Il me faut donc obtenir le trone
exit_state: 4
4:
source: Player
content:
- text: ...
condition: null
exit_state: 5
- text: et de l'$
condition: null
exit_state: 6
5:
source: Olf
content:
text:
- Et de l'$
exit_state: 6
6:
source: Olf
content:
text:
- C'est essentiel
exit_state: 7
8 changes: 8 additions & 0 deletions data/self_player_dialog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
1:
source: Player
content:
text:
- Bonjour Flo.
- Comment vas-tu ?
- J'ai faim.
exit_state: 2
23 changes: 23 additions & 0 deletions data/supreme_god_dialog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
1:
source: Player
content:
- text: Can you Follow Me ?
condition: null
exit_state: 2
- text: No Nothing
condition: null
exit_state: 3
2:
source: Dieu Suprème
content:
text:
- Sure
exit_state: 4
trigger_event:
- FollowPlayer
3:
source: Dieu Suprème
content:
text:
- :O
exit_state: 1
43 changes: 31 additions & 12 deletions src/animations/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,41 @@ use bevy::prelude::*;
pub use fade::{Fade, FadeType};
pub use slide::{Slide, UiSlide, UiSlideType};

use crate::in_menu;

// DOC: create systemsLabel for `sprite_sheet_animation::tempo_animation_timer`

pub struct AnimationPlugin;

impl Plugin for AnimationPlugin {
fn build(&self, app: &mut App) {
app.init_resource::<CharacterSpriteSheet>().add_systems(
Update,
(
fade::fade_animations,
slide::slide_animations,
slide::ui_slide_animations,
sprite_sheet_animation::animate_sprite_sheet,
sprite_sheet_animation::jump_frame_character_state,
sprite_sheet_animation::tempo_animation_timer,
sprite_sheet_animation::animate_character,
),
);
app.init_resource::<CharacterSpriteSheet>()
.add_systems(
PostUpdate,
(
sprite_sheet_animation::jump_frame_manor_lights_state
.before(sprite_sheet_animation::tempo_animation_timer),
sprite_sheet_animation::animate_manor_lights
.after(sprite_sheet_animation::tempo_animation_timer),
sprite_sheet_animation::animate_ui_atlas
.after(sprite_sheet_animation::tempo_animation_timer),
sprite_sheet_animation::flexing_title
.after(sprite_sheet_animation::tempo_animation_timer),
)
.run_if(in_menu),
)
.add_systems(
PostUpdate,
(
fade::fade_animations,
slide::slide_animations,
slide::ui_slide_animations,
sprite_sheet_animation::animate_sprite_sheet,
sprite_sheet_animation::jump_frame_character_state,
sprite_sheet_animation::tempo_animation_timer,
sprite_sheet_animation::animate_character,
),
);
}
}

Expand Down
Loading

0 comments on commit 94b8d8b

Please sign in to comment.