Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

v0.8.24 healthier piggos & bugfixes #204

Merged
merged 3 commits into from
Oct 18, 2024
Merged

v0.8.24 healthier piggos & bugfixes #204

merged 3 commits into from
Oct 18, 2024

Conversation

alexanderclarktx
Copy link
Owner

@alexanderclarktx alexanderclarktx commented Oct 18, 2024

  • improved piggo size/collider/eat scaling as he grows
  • fixed shaky movement bug

}

if (entity.components.collider) {
// @ts-expect-error
entity.components.collider.colliderDesc.shape.radius *= 1.1
entity.components.collider.colliderDesc.shape.radius += 1
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better piggo collider scaling as he grows

@@ -147,6 +147,8 @@ export const PositionSystem: SystemBuilder<"PositionSystem"> = {
velocity: { ...velocity },
pointingDelta: { ...pointingDelta },
}

position.lastCollided = following.components.position.lastCollided
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lastCollided copied to follower

@@ -61,7 +61,7 @@ const npcOnTick = (entity: Entity<Position>, world: World): void | InvokedAction
const closest = closestEntity(edibles, position.data, 200)

if (closest) {
if (XYdelta(position.data, closest.components.position.data) < 20) {
if (XYdelta(position.data, closest.components.position.data) < 20 + (0.5 * renderable!.scale * renderable!.scale)) {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scaling Eat distance with renderable scale

@@ -16,7 +16,7 @@ export const IsometricWorld: WorldBuilder = (props) => {
world.addSystemBuilders([
ExpiresSystem, ControlSystem, ClickableSystem, InputSystem, DebugSystem,
DamageSystem, CommandSystem, NPCSystem, NametagSystem, CooldownSystem,
ActionSystem, EffectsSystem, PhysicsSystem, PositionSystem, RenderSystem
PhysicsSystem, ActionSystem, EffectsSystem, PositionSystem, RenderSystem
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

previous ordering was causing velocity to be reset -> player movement was not interpolated (shaky)

@alexanderclarktx alexanderclarktx changed the title v0.8.24 wip v0.8.24 healthier piggos & bugfixes Oct 18, 2024
@alexanderclarktx alexanderclarktx merged commit 2520e13 into main Oct 18, 2024
@alexanderclarktx alexanderclarktx deleted the alex branch October 18, 2024 17:39
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant