Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
9381742
feat: first spil + gameplay and pos tweaks
Arthur-Aillet Feb 8, 2026
e74af91
Merge branch 'work/sy' of github.com:Agartha-Software/GameJam into fe…
Arthur-Aillet Feb 8, 2026
6e54a00
feat: spils placed
Arthur-Aillet Feb 8, 2026
58840c5
feat: removed ground layer, speaker have gravity
Arthur-Aillet Feb 8, 2026
8d158f8
Merge branch 'work/sy' of github.com:Agartha-Software/GameJam into fe…
Arthur-Aillet Feb 8, 2026
3e6258e
feat: speaker dont clip
Arthur-Aillet Feb 8, 2026
231d0c2
feat: sounds for speaker and for monster
Arthur-Aillet Feb 8, 2026
ae8439d
feat: start of ladder interract
Arthur-Aillet Feb 8, 2026
3f77b7c
Merge branch 'merge/final' of github.com:Agartha-Software/GameJam int…
Arthur-Aillet Feb 8, 2026
68e18d0
feat: fake win conditions
Arthur-Aillet Feb 8, 2026
3a4b350
feat: marker logic reworked with messages
Arthur-Aillet Feb 15, 2026
7d4e28d
feat: restore marker light material
Arthur-Aillet Feb 15, 2026
a724e96
chore: remove marker deadcode
Arthur-Aillet Feb 15, 2026
c10e3bb
feat: marker placed with raycast for perfect ground placement
Arthur-Aillet Feb 15, 2026
9f380eb
feat: resolved warnings
Arthur-Aillet Feb 15, 2026
9b8ed5b
feat: marker placing logic reworked to be independant from speaker state
Arthur-Aillet Feb 15, 2026
8dc5ccc
feat: oil spil range displayed in debug
Arthur-Aillet Feb 15, 2026
8c6233d
feat: ui debug toggleable
Arthur-Aillet Feb 15, 2026
6475625
feat: UI Text refactored to be centered more cleanly
Arthur-Aillet Feb 15, 2026
9a16725
feat: ladder code in his own plugin
Arthur-Aillet Feb 15, 2026
33febf9
feat: Game State progresses until end of the game
Arthur-Aillet Feb 15, 2026
ba35057
feat: text has a pixelated font
Arthur-Aillet Feb 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
*.glb filter=lfs diff=lfs merge=lfs -text
*.wav filter=lfs diff=lfs merge=lfs -text
*.mp3 filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ bevy = { version = "0.18.0", features = [
"3d",
"wav",
"mp3",
"bevy_ui_debug",
"bevy_dev_tools",
] }
bevy_atmosphere = { git = "https://github.com/Arthur-Aillet/bevy_atmosphere", branch = "feat/z-up" }
Expand Down
3 changes: 3 additions & 0 deletions assets/VCR_OSD_MONO_1.001.ttf
Git LFS file not shown
25 changes: 23 additions & 2 deletions src/debug.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
use avian3d::prelude::{PhysicsDebugPlugin, PhysicsGizmos};
use bevy::dev_tools::fps_overlay::{FpsOverlayConfig, FpsOverlayPlugin, FrameTimeGraphConfig};
use bevy::prelude::*;
use bevy::ui_render::UiDebugOptions;
use bevy_inspector_egui::bevy_egui::EguiPlugin;
use bevy_inspector_egui::quick::WorldInspectorPlugin;

use crate::node::OilNode;
use crate::player::WorldModelCamera;
use crate::player::marker::PLAYER_PLACE_DIST;
use crate::settings::Settings;
use crate::ui::OverlayImage;

Expand All @@ -31,21 +34,38 @@ impl Plugin for DebugPlugin {
})
.add_plugins((EguiPlugin::default(), PhysicsDebugPlugin))
.add_plugins(WorldInspectorPlugin::new().run_if(if_debug_display))
.add_systems(Update, toggle_debug);
.add_systems(
Update,
(
toggle_debug,
display_oil_nodes_debug.run_if(if_debug_display),
),
);
}
}

pub fn if_debug_display(settings: Res<Settings>) -> bool {
fn if_debug_display(settings: Res<Settings>) -> bool {
settings.debug_display
}

fn display_oil_nodes_debug(mut gizmos: Gizmos, oil_nodes: Query<&GlobalTransform, With<OilNode>>) {
for oil_node in oil_nodes {
gizmos.sphere(
oil_node.translation(),
PLAYER_PLACE_DIST,
Color::srgb(1., 0.7, 0.7),
);
}
}

fn toggle_debug(
input: Res<ButtonInput<KeyCode>>,
mut fps_overlay: ResMut<FpsOverlayConfig>,
mut cam: Single<(&mut DistanceFog, &mut Projection), With<WorldModelCamera>>,
mut image_overlay: Single<&mut Visibility, With<OverlayImage>>,
mut settings: ResMut<Settings>,
mut store: ResMut<GizmoConfigStore>,
mut debug_ui: ResMut<UiDebugOptions>,
) {
if input.just_pressed(KeyCode::F1) {
fps_overlay.enabled = !fps_overlay.enabled;
Expand All @@ -67,6 +87,7 @@ fn toggle_debug(
} else {
**image_overlay = Visibility::Visible;
}
debug_ui.enabled = settings.debug && !settings.debug_display;

let phys_config = store.config_mut::<PhysicsGizmos>().0;
if settings.debug_display == true {
Expand Down
146 changes: 146 additions & 0 deletions src/ladder.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
use bevy::{light::NotShadowCaster, prelude::*};
use bevy_sprite3d::Sprite3d;

use crate::{node::OilNodeResource, player::PlayerCamera, ui::CenteredText};

pub struct LadderPlugin;

impl Plugin for LadderPlugin {
fn build(&self, app: &mut App) {
app.insert_resource(Ladder::default())
.add_systems(Startup, load_ladder)
.add_systems(Update, spawn_ladder)
.add_systems(PostUpdate, game_state)
.insert_resource(GameState::default());
}
}

#[derive(Resource, Default)]
pub struct GameState {
current_step: Step,
since_last_change: Timer,
}

#[derive(Default, PartialEq)]
pub enum Step {
#[default]
LocateOil,
Exit,
SorryBuddy,
}

pub fn game_state(
text: Single<(&mut Node, &mut Text), With<CenteredText>>,
oil_res: If<Res<OilNodeResource>>,
mut game_state: ResMut<GameState>,
ladder: Single<&GlobalTransform, With<LadderInteract>>,
mut ladder_parent: Single<&mut Transform, With<LadderParent>>,
player_cam: Single<&GlobalTransform, With<PlayerCamera>>,
time: Res<Time>,
) {
if !game_state.since_last_change.is_finished() {
game_state.since_last_change.tick(time.delta());
}

let (mut node, mut text) = text.into_inner();

if oil_res.nodes_left <= 0 && game_state.current_step == Step::LocateOil {
game_state.current_step = Step::Exit;
game_state.since_last_change = Timer::from_seconds(10.0, TimerMode::Once);

node.display = Display::Block;
text.0 = "Just get back to the ladder now!".to_string();
}

if game_state.current_step == Step::Exit {
if game_state.since_last_change.just_finished() {
node.display = Display::None;
}
if !game_state.since_last_change.is_finished() {
ladder_parent.translation += Vec3::Z * 30.0 * time.delta_secs();
}
}

if game_state.current_step == Step::Exit
&& (ladder.translation().xy() - player_cam.translation().xy()).length() <= 7.0
{
game_state.current_step = Step::SorryBuddy;

node.display = Display::Block;
text.0 = "Sorry buddy... got an order from up there...".to_string();
}
}

#[derive(Resource, Default)]
pub struct Ladder(Handle<Image>);

#[derive(Component)]
pub struct LadderInteract;

#[derive(Component)]
pub struct LadderParent;

fn load_ladder(asset_server: Res<AssetServer>, mut ladder: ResMut<Ladder>) {
ladder.0 = asset_server.load("ladder.png");
}

fn spawn_ladder(
asset_server: Res<AssetServer>,
ladder: Res<Ladder>,
mut commands: Commands,
mut loaded: Local<bool>,
) {
if *loaded {
return;
}

if !asset_server
.get_load_state(ladder.0.id())
.is_some_and(|s| s.is_loaded())
{
return;
}

*loaded = true;

let mut ladder_parent = commands.spawn((
Visibility::Visible,
LadderParent,
Transform::from_xyz(-72.0, -85.0, 25.)
.looking_to(Vec3::Y, Vec3::Z)
.with_scale(Vec3::splat(3.)),
));

ladder_parent.with_child((
Sprite3d {
pixels_per_metre: 400.,
alpha_mode: AlphaMode::Blend,
unlit: false,
..default()
},
Sprite {
image: ladder.0.clone(),
..default()
},
Visibility::Visible,
LadderInteract,
Transform::from_xyz(0., 0., 0.),
));
for i in 1..72 {
ladder_parent.with_child((
Sprite3d {
pixels_per_metre: 400.,
alpha_mode: AlphaMode::Blend,
unlit: false,
..default()
},
Sprite {
image: ladder.0.clone(),
..default()
},
NotShadowCaster,
Visibility::Visible,
Transform::from_xyz(0., i as f32 * 2.24, 0.),
));
}
}
12 changes: 6 additions & 6 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
mod debug;
mod marker;
mod ladder;
mod monster;
mod node;
mod particle;
mod player;
mod settings;
mod speaker;
mod ui;
mod world;
pub mod world;

use avian3d::{PhysicsPlugins, prelude::Gravity};
use bevy::prelude::*;
Expand All @@ -16,7 +16,7 @@ use bevy_atmosphere::plugin::AtmospherePlugin;
use particle::ParticlePlugin;

use crate::{
debug::DebugPlugin, marker::MarkerPlugin, monster::MonsterPlugin, player::PlayerPlugin,
debug::DebugPlugin, ladder::LadderPlugin, monster::MonsterPlugin, player::PlayerPlugin,
settings::Settings, speaker::SpeakerPlugin, ui::UiPlugin, world::WorldPlugin,
};

Expand All @@ -28,8 +28,8 @@ fn main() {
.set(ImagePlugin::default_nearest())
.set(WindowPlugin {
primary_window: Some(Window {
title: "550fathom".into(),
name: Some("550fathom".into()),
title: "550fathoms".into(),
name: Some("550fathoms".into()),
..default()
}),
..default()
Expand All @@ -51,8 +51,8 @@ fn main() {
WorldPlugin,
PlayerPlugin,
MonsterPlugin,
MarkerPlugin,
SpeakerPlugin,
LadderPlugin,
))
.insert_resource(Gravity(Vec3::NEG_Z * 0.3))
.run();
Expand Down
75 changes: 0 additions & 75 deletions src/marker.rs

This file was deleted.

2 changes: 1 addition & 1 deletion src/monster.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,6 @@ pub fn spawn_monster(
PlaybackSettings::LOOP
.with_spatial(true)
.with_spatial_scale(SpatialScale::new(0.07))
.with_volume(bevy::audio::Volume::Linear(0.2)),
.with_volume(bevy::audio::Volume::Linear(0.4)),
));
}
Loading