Limit-Theory-Redux / ltheory

Limit Theory Redux is a fork of the discontinued open-world space simulation game Limit Theory. We have made it our mission to continue the development of the ambitious Limit Theory project as an open source initiative.
Apache License 2.0
62 stars 8 forks source link

Archetype Value Inconsistency #327

Closed LukeJHarvey closed 3 months ago

LukeJHarvey commented 3 months ago

Branch: feat/ecs Files effected:

Issue: Archetype values stored into GlobalStorage are inconsistently off by 1. This is a known issue for EntityArchetype, but potential issue for ComponentArchetype aswell, given storage is similarly done.

There are no reproduction steps. As this will happen between consecutive runs with no change in code. Issue could be with storage into GlobalStorage inside the Entity.lua/Component.lua file

Consideration: This issue could be occurring when Enums is added to _G/Namespace, where it is not loading consistently into _g.

LukeJHarvey commented 3 months ago

Example Run 1: MoonEntity(1ULL) MoonEntity(5ULL) PhysicsTransformComponent(3ULL) PhysicsTransformComponent(7ULL)

Run 2: AsteroidEntity(1ULL) AsteroidEntity(5ULL) PhysicsTransformComponent(3ULL) PhysicsTransformComponent(7ULL)

When running: cargo r -- RenderingTest

IllustrisJack commented 3 months ago

should be fixed in #903bc20