@gmvjs/dunia1
v0.1.1
Published
gmv: Dunia Engine 1 (Far Cry 2)
Readme
@gmvjs/dunia1 — Dunia Engine 1 (Far Cry 2)
Dunia Engine 1 (Far Cry 2; Dunia 2, Far Cry 3 and later, is not supported yet): .fat/.dat archives (FAT2 v5, LZO), .xbg models, .xbt textures, .mab animations with root motion, character outfits, .fc2level levels.
An engine plugin for @gmvjs/core: formats, archives and game presets. Heavy parsers are loaded on demand (import() inside load), so adding the package costs almost nothing until a file of this engine is opened.
Installation
npm i @gmvjs/core @gmvjs/dunia1 @gmvjs/codecsUsage
The whole engine (all games):
import { createRegistry, ViewerSession } from '@gmvjs/core';
import { dunia1Engine } from '@gmvjs/dunia1';
const session = new ViewerSession(createRegistry([dunia1Engine]));One game: a package subpath (the game preset and an engine limited to that game):
import { createRegistry, ViewerSession } from '@gmvjs/core';
import farcry2 from '@gmvjs/dunia1/farcry2';
const session = new ViewerSession(createRegistry([farcry2.engine]), farcry2.preset.id);Games (subpaths)
| Import | Preset | Game | Status | Only for this game |
|---|---|---|---|---|
| @gmvjs/dunia1/farcry2 | farcry2 | Far Cry 2 (2008) | 🟡 beta | — |
Formats
| id | What | Files | Status |
|---|---|---|---|
| dunia-xbg | Far Cry 2: .xbg model | .xbg + .mab animations | 🟡 beta |
| dunia-level | Far Cry 2: level (worlds//maps/*.fc2level is a 1×1 km map with objects; .fc2level is the whole world) | .fc2level | 🟡 beta |
Archives
dunia-fat— Far Cry 2: .fat + .dat archives (.fat)
Textures
xbt—.xbt
Dependencies
@gmvjs/core— plugin API, types, ZIP/folder archives, zlib, DDS/BC, geometry@gmvjs/codecs— LZO
Not done yet
- Facial animation
- Havok
- Exact RealTree trees, sky, terrain layer blending
License
MIT
If this project helps you, consider supporting its development on Patreon ❤️

