All Projects â†’ vpdb â†’ vpx-js

vpdb / vpx-js

Licence: GPL-2.0 License
🎮 Visual Pinball in the Browser

Programming Languages

typescript
32286 projects
VBScript
123 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to vpx-js

vpinball
Visual Pinball
Stars: ✭ 111 (+192.11%)
Mutual labels:  pinball, pinball-simulation, visualpinball
playcanvas-gltf
glTF 2.0 support for the PlayCanvas Engine
Stars: ✭ 97 (+155.26%)
Mutual labels:  gltf
Box2DSwift
Box2DSwift is a Swift port of Box2D Physics Engine.
Stars: ✭ 38 (+0%)
Mutual labels:  physics-engine
amethyst physics
Amethyst physics engine abstraction layer
Stars: ✭ 29 (-23.68%)
Mutual labels:  physics-engine
gltf
👓 Go library for encoding glTF 2.0 files
Stars: ✭ 156 (+310.53%)
Mutual labels:  gltf
box2d-optimized
A very fast and scalable physics engine, based on Box2D.
Stars: ✭ 50 (+31.58%)
Mutual labels:  physics-engine
pixi-omber-gltf2-vector
Pixi.js library for using vector art created in Omber that's saved in glTF 2.0 format
Stars: ✭ 13 (-65.79%)
Mutual labels:  gltf
Rayon
Rigid body simulation for Minecraft
Stars: ✭ 25 (-34.21%)
Mutual labels:  physics-engine
xeokit-react
Integratation of the xeokit viewer into a React application.
Stars: ✭ 27 (-28.95%)
Mutual labels:  gltf
webgl-gltf
GLTF Viewer For WebGL
Stars: ✭ 26 (-31.58%)
Mutual labels:  gltf
pg2b3dm
Tool for converting from PostGIS to b3dm tiles
Stars: ✭ 138 (+263.16%)
Mutual labels:  gltf
Vortex2D
Real-time fluid simulation engine running on GPU with Vulkan
Stars: ✭ 91 (+139.47%)
Mutual labels:  physics-engine
FlightAirMap-3dmodels
3D models used by FlightAirMap with Cesium
Stars: ✭ 23 (-39.47%)
Mutual labels:  gltf
glazejs
A high performance 2D game engine built in Typescript
Stars: ✭ 96 (+152.63%)
Mutual labels:  physics-engine
TaichiGAME
GPU Accelerated Motion Engine based on Taichi Lang.
Stars: ✭ 35 (-7.89%)
Mutual labels:  physics-engine
alien
ALIEN is a CUDA-powered artificial life simulation program.
Stars: ✭ 2,493 (+6460.53%)
Mutual labels:  physics-engine
VRMKit
VRM loader and VRM renderer (3D model / gltf)
Stars: ✭ 85 (+123.68%)
Mutual labels:  gltf
Flame
A physical engine used to simulate water,snow,sand.etc
Stars: ✭ 44 (+15.79%)
Mutual labels:  physics-engine
playcanvas-viewer
glTF 2.0 model viewer
Stars: ✭ 152 (+300%)
Mutual labels:  gltf
model-browser
model-browser is a command line tool available on npm, for browsing local 3D models via a web browser. It currently only supports GLB files.
Stars: ✭ 19 (-50%)
Mutual labels:  gltf

Visual Pinball X in JavaScript

A port of the best pinball simulator out there

Build Status codecov Dependencies

Features

This isn't a ready-to-use game. It's a library of loosely-coupled components that together implement Visual Pinball's player for the web.

The player can be split into three parts:

  1. The rendering engine
  2. The physics engine
  3. The scripting engine

This library provides an abstraction layer for rendering with three.js, which covers the first point. A physics loop is implemented by the Player class. Collision detection and rigid body dynamics are fully ported, covering the second part. Work on scripting has begun with the wiring set up and the default table script working. More info about how we go about this can be found here.

Rendering

VPX-JS reads Visual Pinball's VPX format and extracts all meshes in VP's internal format. Using an abstraction layer, any WebGL framework can convert this format and construct a scene. An adapter for three.js is included.

Additionally, VPX-JS supports direct export to GLTF files, which is nice, because it allows off-loading the export to a server. It's also nice because GLTF allows doing stuff that Visual Pinball's OBJ export doesn't, for example:

  • Include materials, textures and lights in one single file
  • Apply optimizations:
    • PNG textures with no transparency are converted to JPEG
    • PNG textures with transparency are PNG-crushed
    • Compress meshes with Draco

image A table in the browser using three.js

Physics

VPX-JS uses the same physics code than Visual Pinball. That means the gameplay is identical in the browser than when running VPX.

Scripting and VPM

For scripting, see this issue. About VPM, there isn't a JavaScript implementation of PinMAME yet. However, @neophob wrote a WPC emulator from scratch that will cover many games already.

Development Setup

Given this is a lib, you'll need an actual web application to test. There is a simple one we're currently using for development here.

This vpweb project retrieves VPX-JS from NPM, so in order to iterate rapidly, we'll link it to your local working copy.

git clone https://github.com/vpdb/vpx-js.git
cd vpx-js
npm ci
npm link
npm run build:watch

And the vpweb host application:

git clone https://github.com/freezy/vpweb.git
cd vpweb
npm ci
npm link vpx-js
npm start

Then connect to http://localhost:8080 and drag a VPX file into it. Note that the scripting engine is still limited. However, the table script of the default table should now work.

Usage

WIP. The API will be documented when it's considered stable.

Tests

Run tests with:

npm run test

For more infos about how tests are written, see here

Credits

  • @jsm174 for getting the Nearley grammar right and his work on translating VBScript to JavaScript
  • @neophob for his awesome WPC-EMU integration

IntelliJ IDEA

Special thanks go to JetBrains for their awesome IDE and support of the Open Source Community!

License

GPLv2, see LICENSE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].