@woosh/meep-engine 2.131.19 → 2.131.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +85 -101
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,126 +1,110 @@
|
|
|
1
1
|
# Meep Engine
|
|
2
|
+
**The unopinionated, high-performance ECS engine for code-first developers.**
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
Meep is a battle-tested JavaScript game engine designed for scale. Built over 10+ years and used in commercial Steam releases, it strips away the bloat of traditional engines to offer a molecular, zero-allocation architecture.
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
It is designed for engineers who want full control, offering performance that rivals native code on the web.
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
[🚀 Quick Start Template](http://gitlab.company-named.com/travnik/dream-engine-template) | [📚 Documentation](http://meep-engine.company-named.com:8080/docs/getting_started/Installation)
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Why Meep?
|
|
13
|
+
Most web engines are heavy, opinionated, and struggle with garbage collection. Meep is different.
|
|
14
|
+
|
|
15
|
+
* **Pure ECS Architecture:** A true data-oriented foundation that supports complex hierarchies and millions of entities. Unlike hybrid engines, our component queries are instantaneous.
|
|
16
|
+
* **Molecular Modularity:** Distributed as ~3,000 fine-grained modules. Need a lerp function? Import it for a 4-line footprint. You never pay for code you don't use.
|
|
17
|
+
* **Zero-Garbage Architecture:** Custom memory management ensures stable frame rates. Meep handles millions of objects on low-spec mobile hardware without GC spikes.
|
|
18
|
+
* **Code-First:** No GUI. No black boxes. Meep is a programmatic tool designed for software engineers who value architecture and long-term integration.
|
|
19
|
+
* **Battle-Hardened:** Covered by 3,000+ unit tests and extensive assertions. This is not a prototype; it is industrial-grade software.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## 💎 Architecture: Pure ECS
|
|
24
|
+
Meep is not yet another Object-Oriented engine with an ECS tacked on; it is a **Pure Entity Component System** engine.
|
|
25
|
+
|
|
26
|
+
While other engines (like Unity) struggle with slow query times and documentation that advises you to use component lookups "sparingly" — Meep thrives on them.
|
|
27
|
+
|
|
28
|
+
* **Strict Data-Oriented Design:** One component instance per type per entity. This guarantees memory layout optimization and cache locality.
|
|
29
|
+
* **The Hierarchy Problem: Solved.** Pure ECS architectures historically struggle with scene graphs and parent-child transforms. Meep solves this natively. You get the composability of a scene graph with the raw speed of a flat array. (Similar to the Rust-based Bevy engine).
|
|
30
|
+
* **Tiered API Access:**
|
|
31
|
+
* **High-Level:** Use convenient abstraction layers for gameplay logic.
|
|
32
|
+
* **Low-Level:** Drop down to raw typed arrays for performance-critical paths.
|
|
33
|
+
* **Uncompromised Speed:** Because the architecture is solid, you can query, filter, and iterate over millions of entities without performance cliffs.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## ⚡ High-Performance Rendering
|
|
38
|
+
Meep implements a Clustered Forward+ rendering pipeline, allowing for scenes that traditional web engines choke on.
|
|
39
|
+
|
|
40
|
+
* **Unlimited Lighting:** Render thousands of point lights (muzzle flashes, explosions, torches) with clustered lighting.
|
|
41
|
+
|
|
42
|
+
* **GPU-Driven Decals:** Handle 1,000,000+ decals for persistent battle damage and environmental details.
|
|
43
|
+
|
|
44
|
+
* **Massive Terrain:** Chunk-based, auto-culled terrain system supporting up to 256 layers (vs Unity's 4).
|
|
10
45
|
|
|
11
|
-
|
|
12
|
-
To help get you started, various samples are provided under `/samples` folder. Feel free to use them as a point of reference.
|
|
46
|
+
* **"Particular" Particle Engine:** A zero-allocation particle system with full lighting, soft particles, and automatic atlassing. Compiled into just 4 shaders to eliminate state-switching overhead.
|
|
13
47
|
|
|
14
|
-
|
|
48
|
+
* **Path Tracing:** Includes a pure JS path tracer utilizing the engine's internal BVH.
|
|
15
49
|
|
|
16
|
-
|
|
17
|
-
Meep
|
|
50
|
+
## 🧠 AI & Simulation Tools
|
|
51
|
+
Meep provides a suite of tools rarely found in JS engines, optimized for complex decision making.
|
|
18
52
|
|
|
19
|
-
|
|
20
|
-
Most of the test code is significantly larger than the code that is being tested.
|
|
53
|
+
* **Behavior Trees & Blackboards:** Industry-standard tools for state management.
|
|
21
54
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
55
|
+
* **Monte-Carlo Tree Search:** The same algorithm used in AlphaGo, available for your decision logic.
|
|
56
|
+
|
|
57
|
+
* **Resource Allocation Solver:** Plan optimal actions based on limited resources (ammo, health, currency).
|
|
58
|
+
|
|
59
|
+
* **Spatial Query System:** Highly optimized BVH for Ray, Box, Frustum, and Point queries.
|
|
60
|
+
|
|
61
|
+
* **Inverse Kinematics:** Includes FABRIK solvers and specialized bip/quadruped solvers for uneven terrain adaptation.
|
|
62
|
+
|
|
63
|
+
## 🛠️ Developer Experience
|
|
64
|
+
|
|
65
|
+
### Installation & Stripping
|
|
66
|
+
|
|
67
|
+
Meep is designed to be invisible in production.
|
|
68
|
+
```shell
|
|
69
|
+
npm install @woosh/meep-engine
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**Development Mode:** The engine includes ~4,000 assertions to help you catch errors instantly.
|
|
73
|
+
|
|
74
|
+
**Production Mode:** Using @rollup/plugin-strip, Meep compiles to tiny size and runs at the speed of light.
|
|
26
75
|
|
|
27
76
|
```js
|
|
77
|
+
// vite.config.js
|
|
28
78
|
import strip from '@rollup/plugin-strip';
|
|
29
|
-
import { defineConfig } from 'vite';
|
|
30
|
-
|
|
31
79
|
export default defineConfig({
|
|
32
|
-
plugins: [{
|
|
33
|
-
// this will remove all assert statements from the production build
|
|
34
|
-
...strip(),
|
|
35
|
-
apply: 'build'
|
|
36
|
-
}],
|
|
37
|
-
// ... the rest of the config ...
|
|
80
|
+
plugins: [{ ...strip(), apply: 'build' }]
|
|
38
81
|
});
|
|
39
82
|
```
|
|
40
83
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
## Package Size
|
|
84
|
+
### Reliability
|
|
85
|
+
* **Tests:** 2,944 handwritten tests covering critical algorithms and complex edge cases.
|
|
44
86
|
|
|
45
|
-
|
|
87
|
+
* **Coverage:** 90%+ core coverage.
|
|
46
88
|
|
|
47
|
-
|
|
48
|
-
If you use meep in your project, you add as much or as little to your overall bundle size as you want.
|
|
89
|
+
* **Stability:** Exhaustively tested corner cases over a decade of development.
|
|
49
90
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
## Performance
|
|
91
|
+
---
|
|
53
92
|
|
|
54
|
-
|
|
55
|
-
That said, meep is performance-first engine. Various API wrappers are offered for convenience, but you're always welcome to drop down to low-level API.
|
|
56
|
-
Meep is written to generate close to 0 garbage and where that would be otherwise impossible - Meep implements custom memory management to make it possible.
|
|
57
|
-
The engine is built to handle millions of objects at the same time on even low-spec mobile hardware.
|
|
93
|
+
## Additional Features
|
|
58
94
|
|
|
59
|
-
|
|
95
|
+
| Category | Features |
|
|
96
|
+
|------------------|-----------------------------------------------------------------------------------------------------------------------|
|
|
97
|
+
| Audio | Custom culling and attenuation; supports 1,000s of positional sources with zero overhead |
|
|
98
|
+
| Input | Unified abstraction for Touch, Mouse, and Keyboard. Event-driven and Query-based APIs |
|
|
99
|
+
| Assets | Web-first asset streaming. The engine runs before assets even load |
|
|
100
|
+
| Serialization | Binary serialization system with version upgrading |
|
|
101
|
+
| UI | High-speed, zero-garbage UI system. Optional—can be replaced with React/Vue if desired |
|
|
102
|
+
| Color Management | Scientific-grade color management toolkit, including spectral-integration tools and modern color spaces such as OKLab |
|
|
103
|
+
| NodeGraph | A building block for node-graph systems, such as shader editors and workflow engines |
|
|
104
|
+
| Achievements | State-of-the-art achievement system, using expressions and blackboards |
|
|
105
|
+
| Inverse Kinematics (IK) | Highly optimized FABRIK inverse kinematics solver even the most complex IK use cases |
|
|
60
106
|
|
|
61
107
|
---
|
|
62
|
-
## Input
|
|
63
|
-
* Touch / Mouse / Keyboard device support
|
|
64
|
-
* Unified abstraction of input, offering both query and event-driven APIs
|
|
65
|
-
* Input binding implementation via `InputController` component
|
|
66
|
-
|
|
67
|
-
## Rendering & Lighting
|
|
68
|
-
### Automatic instancing
|
|
69
|
-
This will minimize the number of draw calls and improve performance.
|
|
70
|
-
### Clustered lighting, aka Forward+
|
|
71
|
-
Meep implements clustered lighting technique which allows you to have a pretty much an unlimited number of point lights in your scene. All the other light types are supported as well, but only point lights are clustered for now. Point lights are useful for various effects, like muzzle flashes, grenade explosions, torches, etc.
|
|
72
|
-
### Terrain
|
|
73
|
-
The terrain engine is chunk-based, which means that terrain is split into rectangular pieces internally, and they are built on-the-fly inside a web-worker based on camera position. Terrain is automatically culled based on camera position, so you're only drawing the chunks that are in view. Terrain supports layers just like Unity, but unlike Unity - Meep supports up to 256 layers of terrain instead of 4.
|
|
74
|
-
### Path tracer
|
|
75
|
-
Pure JS implementation of a path tracer, using engine's BVH (See Physics section)
|
|
76
|
-
|
|
77
|
-
## Visual Effects
|
|
78
|
-
### Decals
|
|
79
|
-
Decals in meep are done on the GPU, and as a result you can have a lot of them in your scene. The most I tested in a single scene is 1,000,000 which works quite well. Decals are useful for bullet holes, blood splatter and various scene decorations such as signs and scuff marks.
|
|
80
|
-
### Particles
|
|
81
|
-
Meep's particle engine ("Particular") is optimized for game development needs, this means supporting complex effects and being able to spawn/destroy many particle systems every frame. There are a lot of particle engines out there, but they tend to have costly spawning routines, take up a lot of draw calls and not manage memory well, which leads to pretty poor performance in games. My particle engine supports full particle lighting as well, and soft particles. On top of that - all particles are automatically atlassed in the background and are compiled with just 4 shaders. This means that no matter how many particle effects you have - there will be no shader switching and no texture switching, and there will be no delays associated with shader compilation. Particles are culled, so particle systems that are off-screen are not rendered and simulation for them can be paused to save CPU resources (this is automatic behavior)
|
|
82
|
-
### Trails
|
|
83
|
-
Meep implements a fairly complex trail system, where a trail can be attached to an entity, and it will create a trail behind.
|
|
84
|
-
|
|
85
|
-
## Audio
|
|
86
|
-
### Sound engine
|
|
87
|
-
Meep has a custom sound engine which is culled and has custom attenuation, this allows scenes to have 1000s of positional audio sources without any extra cost in terms of performance
|
|
88
|
-
|
|
89
|
-
## Physics
|
|
90
|
-
### High performance spatial index
|
|
91
|
-
Meep features a BVH (bounding volume hierarchy) implementation optimized for speed and memory usage that provides a wide variety of spatial queries, such as:
|
|
92
|
-
* Ray
|
|
93
|
-
* Box
|
|
94
|
-
* Sphere
|
|
95
|
-
* Planar
|
|
96
|
-
* Frustum
|
|
97
|
-
* Point intersection
|
|
98
|
-
* Point distance
|
|
99
|
-
### Inverse kinematics
|
|
100
|
-
* Meep has 2 very useful IK solvers to fix foot position for characters on uneven terrain or stairs, aligning both the position and orientation of character feet. This works for hands as well if you want and is not limited to bipeds, the system works just as well for, say, spiders.
|
|
101
|
-
* Highly optimized FABRIK inverse kinematics solver for more complex IK use cases
|
|
102
|
-
|
|
103
|
-
## Other
|
|
104
|
-
### Asset streaming
|
|
105
|
-
Meep in general is a web-first engine, all assets are streamed, meaning that the engine is up and running even before any models/texture are loaded, and you're free to decide when to let the player see your level, wait until everything is loaded or drop them in as soon as you can. There is a pre-loader module in case you want to load some assets in bulk before starting the game.
|
|
106
|
-
### AI tools
|
|
107
|
-
including, but not limited to:
|
|
108
|
-
* full-fledged Behavior trees
|
|
109
|
-
* Blackboard (took for recording information useful for AI to read/write relevant world state, very commonly used with Behavior Trees)
|
|
110
|
-
* monte-carlo tree search (same as Google's AlphaGo, useful for decision-making)
|
|
111
|
-
* state optimization (useful for decision-making)
|
|
112
|
-
* grid-based path finding (optimized for 10,000s of queries per second)
|
|
113
|
-
* resource allocation solver (useful for planning, given certain resources such as bullets/grenades/money/health - plan what actions to take to optimize your chances of winning)
|
|
114
|
-
* and a number of other useful tools to complement development of game AI and other intelligent behavior use cases.
|
|
115
|
-
### High-performance serialization
|
|
116
|
-
Extremely compact binary serialization system. You can save/load your scenes from files. This serialization system supports format changes, so as you develop your game - old saves will be supported and the system will automatically upgrade them to the most recent version, so the player doesn't have to lose any data.
|
|
117
|
-
### Achievements
|
|
118
|
-
Achievements work with Blackboard components and are very easy to define. There is an abstraction system that helps connect your achievements to various platforms such as Steam or XBox (you'd have to implement that binding yourself though), by default it comes with a browser backend, storing data in IndexedDB. I also have bindings for Steam and NewGrounds that I can share.
|
|
119
|
-
### UI system
|
|
120
|
-
You're free to use it or not, the engine works just fine without it. The system is written for speed, and it offers a few commonly used tools, such as popup windows, notifications and pages. The UI system is optimized for speed, so it generates no garbage, but again - if you want to use, say React - you can ignore this system or integrate it with the system.
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
For more information, please refer to the documentation
|
|
124
108
|
|
|
125
|
-
|
|
126
|
-
Copyright © 2025 Company Named Limited, All Rights Reserved
|
|
109
|
+
## License & Copyright
|
|
110
|
+
Copyright © 2025 Company Named Limited, All Rights Reserved.
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"description": "Pure JavaScript game engine. Fully featured and production ready.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"author": "Alexander Goldring",
|
|
8
|
-
"version": "2.131.
|
|
8
|
+
"version": "2.131.20",
|
|
9
9
|
"main": "build/meep.module.js",
|
|
10
10
|
"module": "build/meep.module.js",
|
|
11
11
|
"exports": {
|