v0.0.70
Release Notes — v0.0.70
Overview
v0.0.70 is a fairly chunky release. The game loop got a real upgrade, there’s a brand-new input system, and a bunch of ECS internals were tightened up. The main goals here were better performance, clearer APIs, and smoother ergonomics for server-authoritative multiplayer setups.
What’s New
Game Loop
- Built-in loop state: The game loop now tracks its own lifecycle (
running,paused, etc.), so you don’t need to manage that yourself. - New
GameLoopclass: Cleaner exports and a more explicit API around loop-related utilities. - Tick reset on stop: Tick count is properly reset when the loop stops, avoiding timing weirdness on restarts.
- InputManager wired in: Input handling now lives directly inside the loop.
- Clearer driver naming: Loop drivers were renamed to better reflect what they actually do.
Input System
-
New InputManager with first-class keyboard and mouse support:
- Key state tracking
- Mouse position and button states
- Frame-accurate input snapshots
-
Cleaner state handling overall, especially around snapshots and transitions between frames.
Intent System
IntentDataOnlytype: Exported fromdefine-intentto make intent payload extraction painless.- New helper types to pull just the data fields from a
DefinedIntent. - Stricter server-side validation: Better client tick tracking and validation for intent processing.
ECS Improvements
-
SystemBuilder upgrades:
- Field descriptors for safer, clearer component access
- Faster entity proxy creation
- Predicate-based conditions
- A proper
despawnmethod for cleanup
-
JIT-level optimizations: Faster component bit clearing and entity queries.
-
Component registration cleanup: Switched to
Object.valuesfor better scalability.
Ticker
- Accumulator reset now happens alongside tick resets for consistency.
- Improved floating-point handling to reduce drift in long-running simulations.
Benchmarks & Tooling
- More detailed ECS benchmarks, including variance and memory usage.
- Frame-based throttling added to health and combat systems during benchmarks.
- Smarter benchmark runs with entity conditions and cleanup logic.
Bug Fixes
- Fixed floating-point precision issues in ticker calculations.
Docs
- Clarified when input snapshots are available in
BaseEventsfor client-side loops.
Refactors
- Renamed private
GameLoopproperties for consistency. - Reworked parts of the input state and snapshot architecture.
Examples
- Added a new ECS + Pixi.js example showing recommended integration patterns.
Migration Notes
Game Loop State
If you were tracking loop state manually, you can now rely on the built-in status:
const loop = new GameLoop(/* ... */);
loop.start();
// loop.status === 'running'
loop.pause();
// loop.status === 'paused'Input Handling
The new InputManager replaces most ad-hoc input logic.
It is already in the game loop tick & render event ready to use:
this.events.on('tick', ({ tick, deltaTime, input }) => {
this.renderer.storePreviousState(this.world);
this.world.runSystems(deltaTime);
this.renderer.cleanup(this.world);
// hold space to spawn more entities
if (input.keys['Space']?.down) {
this.spawnEntities();
}
});Intent Types
Use IntentDataOnly to work with intent payloads without extra boilerplate:
import { IntentDataOnly } from 'murow';
type MyIntentData = IntentDataOnly<typeof myIntent>;Breaking Changes
None.
Performance Highlights
- Faster component bit operations
- Lower overhead entity proxies
- More stable tick math
- Improved entity query performance
Changelog
Full diff available in the commit history:
v0.0.60...v0.0.70
Install
npm install murow@0.0.70yarn add murow@0.0.70bun add murow@0.0.70If you want it even more blunt / changelog-y (or more marketing-ish), say the word.