logo

Babylon.js Market

By Lawrence

5 minutes

Build an honest road — a strip of asphalt long enough to drive for two minutes at thirty units a second — and it fails twice. You reach the end of it. And well before that, the car's Z has grown past seven digits and started eating its own decimals, so the position that should read 3,600,000.25 renders at 3,600,000, and the ride goes gritty. Making the road longer makes both failures worse. The road you want is fourteen boxes that keep getting reused.

Scaffold the project and pull the components

Start from the arcade scaffold, which gives you a Babylon renderer, the ECS framework, a render loop, and a scene loader already wired together:

bjs create vehicle-combat-road
cd vehicle-combat-road
npm install

All nine vehicle-combat components are marketplace components rather than part of the free arcade core, so they have to come down into the project. One command acquires every one of them, plus the free core the scene leans on:

bjs download scene VehicleCombatRoad --all --buy -y
npm run dev

--buy -y is the part that spends: nine components at one credit each. Each lands as real source under src/components/<Name>/ — the component, the System, its tests, its meta.json — and the scaffold's src/registry.ts globs that folder, so a name like RoadTreadmill in scene JSON resolves with no wiring on your part. The command also writes the finished library scene to public/scenes/VehicleCombatRoad/scene.json. Leave it alone; you are building your own file from empty, and that one is what you diff against in lesson nine. There are no GLBs to fetch — every vehicle in this game is a box.

Continue reading

Unlock the Full Course

Every lesson, the runnable examples, and the finished build — yours to keep.

$9one-time

Was this page helpful?

We read every note — tell us what's working and what isn't.

↑↓ NavigateEnter SelectEsc CloseCtrl+K Open Search