A THREE.js middleware that provides ROBLOX-like scripting capabilities for creating 3D games and experiences.
Download the latest stable release here, view a demo here, and view the source here.
You can also play our new (proprietary) game No Person's Mine!
- Spawn characters with customizable models
- Create and manipulate basic geometric shapes (boxes, spheres, cylinders, cones, trusses)
- Organize objects using folders and groups
- Set properties like position, rotation, scale, and color
- Built-in optional multiplayer support with Socket.IO
- Scriptable and extensible architecture
- Clone the repository
- Install dependencies:
npm install
The project uses Webpack for bundling and Babel for transpilation. Available scripts:
npm start
: Start the development server with hot reloadingnpm run build
: Build for productionnpm run server
: Start the multiplayer servernpm run dev
: Start both development server and multiplayer server concurrently
- three.js (^0.162.0): 3D graphics library
- socket.io-client (^4.7.4): Client-side multiplayer support
- express (^4.18.2): Server framework
- socket.io (^4.7.4): Server-side multiplayer support
- webpack (^5.90.3): Module bundler
- babel (^7.24.0): JavaScript transpiler
- concurrently (^8.2.2): Run multiple commands concurrently
<!DOCTYPE html>
<html>
<head>
<title>Engineish</title>
</head>
<body>
<div id="engineish-container" width="80%" height="84%"></div>
<script src="bundle.js"></script>
<script>
// Initialize the engine
const engine = new Engine(document.getElementById('game-container'));
</script>
</body>
</html>
// Create a box
const box = new Part('box', {
width: 2,
height: 1,
depth: 2,
color: 0xff0000
});
// Set position
box.setPosition(0, 1, 0);
// Set rotation
box.setRotation(0, Math.PI / 4, 0);
// Set scale
box.setScale(1, 1, 1);
// Add to workspace
engine.workspace.add(box);
// Spawn the default character
const player = engine.spawn();
// Set character position
player.setPosition(0, 5, 0);
// Create a group
const house = engine.createGroup('House');
// Add parts to the group
house.add(walls);
house.add(roof);
// Manipulate the entire group
house.setPosition(0, 0, 0);
house.setRotation(0, Math.PI / 2, 0);
// Create a folder
const myFolder = engine.createFolder('MyFolder');
// Add objects to the folder
myFolder.add(house);
myFolder.add(box);
// Find objects in the folder
const found = myFolder.find('House');
// Add a baseplate with custom color
engine.addBaseplate(0x808080);
// Connect to the multiplayer server
engine.connect('http://localhost:3000');
// Spawn a networked character
const player = engine.spawn({
networked: true,
position: { x: 0, y: 5, z: 0 }
});
// Sync object properties across network
player.sync({
position: true,
rotation: true,
scale: true
});
box
: Rectangular prismsphere
: Perfect spherecylinder
: Cylindrical shapecone
: Conical shapetruss
: Simple truss structure
The engine supports custom tools through the Hopperbin system. You can create and customize tools for your place:
// Create a new Hopperbin tool using the Engine's Hopperbin class
const myTool = new Engine.Hopperbin('MyTool', {
icon: '🔨', // Optional: Custom icon
description: 'A custom tool that does something', // Optional: Tool description
requiresSelection: true, // Optional: Whether the tool needs a selected part
syncMultiplayer: true, // Optional: Whether to sync tool actions in multiplayer
script: (context) => {
// Your tool's functionality here
const { selectedPart, engine } = context;
if (selectedPart) {
// Do something with the selected part
selectedPart.setColor(0xff0000); // Example: turn it red
}
}
});
// Add the tool to a character
character.addHopperbin(myTool);
- Number keys (1-0): Quick select tools
- Space bar: Activate/deactivate current tool
name
: Name of the toolicon
: Visual icon for the tooldescription
: Tool descriptionrequiresSelection
: Whether the tool needs a selected partsyncMultiplayer
: Whether to sync tool actions in multiplayerscript
: Function that defines the tool's behavior
All parts and groups support the following properties:
setPosition(x, y, z)
: Set the position in 3D spacesetRotation(x, y, z)
: Set the rotation in radianssetScale(x, y, z)
: Set the scale in all dimensionssetColor(color)
: Set the color (hex value)
- WASD - move
- CTRL - jump
- Click/drag - pan camera
- Scroll - zoom
- 0 through 9 - select hopperbin
- Click - select hopperbin target
- Space - Activate hopperbin
- Escape - put away hopperbin
- C - Character customization.
- N - Name system (multiplayer only)
- K - Keybind settings
SPL-R5 EX (New to this codebase.)