Skip to content

Warcraft 3 OpenMW vision#6

Merged
awest813 merged 1 commit into
mainfrom
cursor/warcraft-3-openmw-vision-fb5c
Mar 2, 2026
Merged

Warcraft 3 OpenMW vision#6
awest813 merged 1 commit into
mainfrom
cursor/warcraft-3-openmw-vision-fb5c

Conversation

@awest813
Copy link
Copy Markdown
Owner

@awest813 awest813 commented Mar 2, 2026

Implement Phase C performance improvements and update documentation to reflect the OpenMW-equivalent vision for Warcraft 3.


Open in Web Open in Cursor 

- LightInstance: add float[] cache and static generation counter so each
  light's packed 16-float GPU block is computed at most once per frame.
  LightInstance.advanceGeneration() is called once by W3xSceneWorldLightManager.
  Subsequent bind() calls within the same generation use FloatBuffer.put(float[])
  bulk copy instead of re-evaluating all keyframe tracks.

- W3xSceneWorldLightManager: replace shared lightDataCopyHeap with separate
  unitLightBuffer and terrainLightBuffer; fill both in a single loop over
  this.lights. Remove the clear()/reuse pattern that forced sequential uploads.

- MdxComplexInstance.updateBoneTexture(): replace 16 absolute-indexed
  FloatBuffer.put(int,float) calls per bone with a single put(val,0,16) bulk
  copy + flip(). LibGDX Matrix4.val[M00..M33] are contiguous indices 0-15 so
  the data written is identical; JVM maps the bulk put to native memcpy.

- FramePacingTracker: sort a copy of the ring buffer in report() to compute
  p95 and p99 percentile frame times alongside avg/max. Adds spike-detection
  warning when p99 > 3x avg. Zero per-frame overhead.

- Add ObjectPool<T>: fixed-capacity stack-backed pool with acquire()/release()
  semantics and hitRate() diagnostic. Infrastructure for Phase D GC reduction.

- Add SimulationBudgetTracker: ns-resolution tick timer with avg/max/overrun
  reporting every ~60 s. Ready to wire around CSimulation.step() in Phase D.

Co-authored-by: awest813 <awest813@users.noreply.github.com>
@cursor
Copy link
Copy Markdown

cursor Bot commented Mar 2, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@awest813 awest813 marked this pull request as ready for review March 2, 2026 13:10
@awest813 awest813 merged commit cd47ae4 into main Mar 2, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants