Assets and art styles: CC0 models by id, six looks per game
Net Forge, the open-source multiplayer browser game engine built for AI coding agents, is published on npm under @netforge with source at github.com/netnetdev/net-forge.
A Net Forge game names its models and sounds by library id, such as style.lowpoly.ghost, never by URL or file path. The ids come from @netforge/asset-library, a set of CC0 models and sounds with their licences verified per pack, and every template can draw the same game in six art styles.
import { prefab } from "@netforge/engine";
prefab("shade", { model: "style.lowpoly.ghost", health: 20, speed: 3.6, radius: 0.35, damage: 6, ai: "chase" });The six art styles
game({ style }) picks one of lowpoly, toon, ps1, pixel, voxel or handdrawn. The template draws everything in it.
| Style | How it is drawn | Own model set |
|---|---|---|
lowpoly | The templates' own drawing: flat-shaded low-poly models. | yes |
ps1 | The late-1990s console look: about 240 lines, vertices snapped to the pixel grid, affine textures, 15-bit colour with an ordered dither. | yes |
voxel | Chunky cube-built worlds and characters, with cube particles. | yes |
pixel | A low-resolution render snapped to a 16-colour palette with a 4x4 dither, so 3D ground and sprites read as one piece of pixel art. | yes |
toon | Cel-shaded cartoon rendering over the low-poly models. | no |
handdrawn | Ink and watercolour: models repainted in washes, with pen lines drawn from the scene's depth, on paper. | no |
An id written for one style draws as another style's own model of the same name when that style has one: with style: "voxel", style.lowpoly.ghost draws style.voxel.ghost if it exists. So a game written once can be reskinned by changing one word.
What is in the library
Counted from the library's manifests for this release:
| Set | Entries |
|---|---|
lowpoly models | 228 |
ps1 models | 238 |
voxel models | 227 |
pixel sprites | 58 |
| Sound effects | 17, one per game-feel cue (hit, kill, levelUp, coin, dash and more), plus one music loop |
Entries are characters, creatures, vehicles, weapons, props, buildings, nature, food and pickups, each with a height, a body plan (biped, quadruped, flyer, blob, wheeled or static), a rig, search tags and a one-line description. Animated characters share canonical clips (idle, walk, run, jump, attack, shoot, hit, die) with fallbacks.
Finding an id
import { assetById, restyleId, search } from "@netforge/asset-library";
for (const hit of search("lowpoly", "ghost", 3)) console.log(hit);
console.log(assetById("style.lowpoly.ghost")?.line);
console.log(restyleId("style.lowpoly.ghost", "voxel")); // the voxel id when the voxel set has oneLicences
Every model and sound in the library is CC0 1.0, from packs whose licence page is recorded in the manifest, with the bytes pinned by sha256. The packs come from creators such as Kenney and Quaternius; the full credit list is in the package's NOTICE. The engine and templates are MIT.
Why ids instead of URLs
- The build can check them. An id that is not in the library fails when the game loads, with a line that says so, instead of a broken model at runtime.
- Styles can swap them. An id is a name, so the same game draws in any style that has the model.
- Agents cannot fetch arbitrary files. A game cannot load a URL, so an edit cannot pull in an unlicensed or unsafe asset.
Loading is handled by the template's AssetLoader (glTF with meshopt and KTX2). Until a model arrives, the template draws a fallback shape. npm run play -- --library-url <url> loads the library from a mirror instead of the installed copy.
FAQ
Can I use my own 3D models in a Net Forge game?
Not from src/game.ts: game code references library ids only. Custom art means adding it to an asset library build, which is template-level work, not game-module work.
Are the Net Forge assets free for commercial use?
Yes. Every library asset is CC0 1.0, which places it in the public domain. Credit is not required, and the package's NOTICE credits the packs anyway.
How do I change my game's art style?
Change style in game({ ... }), for example from "lowpoly" to "voxel", and run npm run play again.
Does the library include sound?
Yes: 17 CC0 sound effects, one per game-feel cue, and one CC0 music loop. The template's sound player loads them under the same cue names, and synthesized sounds play until a sample loads.