Compare commits
No commits in common. "ca5ebf22d5b20c7b74f211ef01cdbccd17723dd9" and "fbc416796eec79d2d8a4e9a13d0abda959b914c5" have entirely different histories.
ca5ebf22d5
...
fbc416796e
|
@ -135,32 +135,7 @@ A variety of relatively simple game systems should interact with each other to c
|
||||||
|
|
||||||
# Inspiration
|
# Inspiration
|
||||||
|
|
||||||
- Outer Wilds (not Outer Worlds)
|
TODO
|
||||||
- Kerbal Space Program
|
|
||||||
- Fallout New Vegas
|
|
||||||
- Anathem
|
|
||||||
- Baldur's Gate 3
|
|
||||||
- Citizen Sleeper
|
|
||||||
- Delta V: Rings of Saturn
|
|
||||||
- Disco Elysium
|
|
||||||
- Elite: Dangerous
|
|
||||||
- Endless Sky
|
|
||||||
- Firefly (2002 series)
|
|
||||||
- Mass Effect
|
|
||||||
- Nethack
|
|
||||||
- Planescape: Torment
|
|
||||||
- Prey (2017 game)
|
|
||||||
- Project Hail Mary
|
|
||||||
- RimWorld
|
|
||||||
- Risk of Rain
|
|
||||||
- Robot and Monk series
|
|
||||||
- Shadowrun Returns: Dragonfall, Hong Kong
|
|
||||||
- Stardew Valley
|
|
||||||
- Stray (2022 game)
|
|
||||||
- System Shock 2
|
|
||||||
- The Expanse
|
|
||||||
- The Forgotten City
|
|
||||||
- The Red Strings Club
|
|
||||||
|
|
||||||
# Survival Mechanics
|
# Survival Mechanics
|
||||||
|
|
||||||
|
|
12
src/game.rs
12
src/game.rs
|
@ -481,7 +481,7 @@ fn debug(
|
||||||
keyboard_input: Res<ButtonInput<KeyCode>>,
|
keyboard_input: Res<ButtonInput<KeyCode>>,
|
||||||
// mut commands: Commands,
|
// mut commands: Commands,
|
||||||
// mut extended_materials: ResMut<
|
// mut extended_materials: ResMut<
|
||||||
// Assets<bevy::pbr::ExtendedMaterial<StandardMaterial, load::AsteroidSurface>>,
|
// Assets<bevy::pbr::ExtendedMaterial<StandardMaterial, load::AsteroidSurface>>,
|
||||||
// >,
|
// >,
|
||||||
mut achievement_tracker: ResMut<var::AchievementTracker>,
|
mut achievement_tracker: ResMut<var::AchievementTracker>,
|
||||||
vars: Res<var::GameVars>,
|
vars: Res<var::GameVars>,
|
||||||
|
@ -490,11 +490,11 @@ fn debug(
|
||||||
if settings.dev_mode && keyboard_input.just_pressed(KeyCode::KeyP) {
|
if settings.dev_mode && keyboard_input.just_pressed(KeyCode::KeyP) {
|
||||||
|
|
||||||
// for (entity, _name, mesh) in &materials {
|
// for (entity, _name, mesh) in &materials {
|
||||||
// dbg!(mesh);
|
// dbg!(mesh);
|
||||||
// let mut entity = commands.entity(entity);
|
// let mut entity = commands.entity(entity);
|
||||||
// entity.remove::<Handle<StandardMaterial>>();
|
// entity.remove::<Handle<StandardMaterial>>();
|
||||||
// let material = extended_materials.add(load::AsteroidSurface::material());
|
// let material = extended_materials.add(load::AsteroidSurface::material());
|
||||||
// entity.insert(material);
|
// entity.insert(material);
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
if settings.dev_mode && keyboard_input.just_pressed(KeyCode::KeyN) {
|
if settings.dev_mode && keyboard_input.just_pressed(KeyCode::KeyN) {
|
||||||
|
|
|
@ -128,7 +128,6 @@ pub fn setup(
|
||||||
|
|
||||||
pub fn spawn_effects(
|
pub fn spawn_effects(
|
||||||
mut commands: Commands,
|
mut commands: Commands,
|
||||||
settings: Res<var::Settings>,
|
|
||||||
mut er_effect: EventReader<SpawnEffectEvent>,
|
mut er_effect: EventReader<SpawnEffectEvent>,
|
||||||
mut materials: ResMut<Assets<StandardMaterial>>,
|
mut materials: ResMut<Assets<StandardMaterial>>,
|
||||||
mut meshes: ResMut<Assets<Mesh>>,
|
mut meshes: ResMut<Assets<Mesh>>,
|
||||||
|
@ -174,7 +173,6 @@ pub fn spawn_effects(
|
||||||
let texture = asset_server.load("textures/exhaust.png");
|
let texture = asset_server.load("textures/exhaust.png");
|
||||||
commands.spawn((
|
commands.spawn((
|
||||||
IsEffect,
|
IsEffect,
|
||||||
hud::ToggleableHudElement,
|
|
||||||
RigidBody::Kinematic,
|
RigidBody::Kinematic,
|
||||||
bevy::pbr::NotShadowCaster,
|
bevy::pbr::NotShadowCaster,
|
||||||
pos,
|
pos,
|
||||||
|
@ -207,11 +205,6 @@ pub fn spawn_effects(
|
||||||
alpha_mode: AlphaMode::Blend,
|
alpha_mode: AlphaMode::Blend,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
}),
|
}),
|
||||||
visibility: if settings.hud_active {
|
|
||||||
Visibility::Inherited
|
|
||||||
} else {
|
|
||||||
Visibility::Hidden
|
|
||||||
},
|
|
||||||
..default()
|
..default()
|
||||||
},
|
},
|
||||||
));
|
));
|
||||||
|
@ -265,9 +258,11 @@ pub fn update_fade_material(
|
||||||
if now > end_time {
|
if now > end_time {
|
||||||
material.base_color.set_alpha(data.value_end);
|
material.base_color.set_alpha(data.value_end);
|
||||||
commands.entity(entity).remove::<FadeMaterial>();
|
commands.entity(entity).remove::<FadeMaterial>();
|
||||||
} else if now < data.start_time {
|
}
|
||||||
|
else if now < data.start_time {
|
||||||
material.base_color.set_alpha(data.value_start);
|
material.base_color.set_alpha(data.value_start);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
let progress = ((now - data.start_time) / data.duration) as f32;
|
let progress = ((now - data.start_time) / data.duration) as f32;
|
||||||
let value = data.value_start + progress * (data.value_end - data.value_start);
|
let value = data.value_start + progress * (data.value_end - data.value_start);
|
||||||
material.base_color.set_alpha(value);
|
material.base_color.set_alpha(value);
|
||||||
|
@ -286,9 +281,11 @@ pub fn update_grow(
|
||||||
if now > end_time {
|
if now > end_time {
|
||||||
trans.scale = Vec3::splat(data.scale_end);
|
trans.scale = Vec3::splat(data.scale_end);
|
||||||
commands.entity(entity).remove::<Grow3DObject>();
|
commands.entity(entity).remove::<Grow3DObject>();
|
||||||
} else if now < data.start_time {
|
}
|
||||||
|
else if now < data.start_time {
|
||||||
trans.scale = Vec3::splat(data.scale_start);
|
trans.scale = Vec3::splat(data.scale_start);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
let progress = ((now - data.start_time) / data.duration) as f32;
|
let progress = ((now - data.start_time) / data.duration) as f32;
|
||||||
let scale = data.scale_start + progress * (data.scale_end - data.scale_start);
|
let scale = data.scale_start + progress * (data.scale_end - data.scale_start);
|
||||||
trans.scale = Vec3::splat(scale);
|
trans.scale = Vec3::splat(scale);
|
||||||
|
|
|
@ -38,10 +38,7 @@ impl Plugin for WorldPlugin {
|
||||||
fn build(&self, app: &mut App) {
|
fn build(&self, app: &mut App) {
|
||||||
app.add_systems(Startup, setup);
|
app.add_systems(Startup, setup);
|
||||||
app.add_systems(Update, handle_respawn.run_if(on_event::<RespawnEvent>()));
|
app.add_systems(Update, handle_respawn.run_if(on_event::<RespawnEvent>()));
|
||||||
app.add_systems(
|
app.add_systems(Update, handle_despawn_at.run_if(any_with_component::<DespawnAt>));
|
||||||
Update,
|
|
||||||
handle_despawn_at.run_if(any_with_component::<DespawnAt>),
|
|
||||||
);
|
|
||||||
app.add_plugins(PhysicsPlugins::default());
|
app.add_plugins(PhysicsPlugins::default());
|
||||||
//app.add_plugins(PhysicsDebugPlugin::default());
|
//app.add_plugins(PhysicsDebugPlugin::default());
|
||||||
app.insert_resource(Gravity(DVec3::splat(0.0)));
|
app.insert_resource(Gravity(DVec3::splat(0.0)));
|
||||||
|
|
Loading…
Reference in a new issue