hytopia 0.1.2 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +8 -3
- package/bin/scripts.js +18 -0
- package/docs/assets/banner.png +0 -0
- package/package.json +4 -5
package/README.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# HYTOPIA SDK
|
2
2
|
|
3
|
-
|
3
|
+
## Quick Links
|
4
|
+
[Quickstart](#quickstart) • [API Reference](./docs/server.md) • [Report Bugs or Request Features](https://github.com/hytopiagg/sdk/issues)
|
4
5
|
|
5
6
|
## What is HYTOPIA?
|
6
7
|
|
@@ -26,7 +27,7 @@ With these resources, you can quickly build and share immersive, voxel-style mul
|
|
26
27
|
|
27
28
|
## Quickstart
|
28
29
|
|
29
|
-
1. Install a compatible JavaScript runtime. We recommend [Bun (recommended)](https://bun.sh/), but [Node.js](https://nodejs.org/) and [Deno](https://deno.com/) are also supported.
|
30
|
+
1. Install a compatible JavaScript runtime. We recommend [Bun (recommended)](https://bun.sh/), but [Node.js](https://nodejs.org/) and [Deno](https://deno.com/) are also supported. All examples will be given using Bun.
|
30
31
|
|
31
32
|
2. Install the SDK in a new or existing project.
|
32
33
|
```bash
|
@@ -35,11 +36,15 @@ npm install hytopia
|
|
35
36
|
|
36
37
|
2. Run a local HYTOPIA server using an example game included in the SDK. The following command will start the Zombie Arena example game on port 8080.
|
37
38
|
```bash
|
38
|
-
|
39
|
+
bun hytopia examples/zombie-arena
|
39
40
|
```
|
40
41
|
|
41
42
|
3. Visit https://play.hytopia.com - when prompted, enter the local server your game is running on, which is `http://localhost:8080`.
|
42
43
|
|
44
|
+
Once you're up and running, here's some other resources to go further:
|
45
|
+
- [Game Examples](./examples)
|
46
|
+
- [API Reference](./docs/server.md)
|
47
|
+
|
43
48
|
## Architecture & Motivation
|
44
49
|
|
45
50
|
HYTOPIA gives developers full control to create any game imaginable in a voxel-like style. The underlying architecture handles low-level tasks like networking, prediction, entity lifecycle, physics and more, so you can focus on building and deploying games quickly.
|
package/bin/scripts.js
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
#!/usr/bin/env node
|
2
|
+
|
3
|
+
const fs = require('fs');
|
4
|
+
const path = require('path');
|
5
|
+
const command = process.argv[2];
|
6
|
+
|
7
|
+
if (command === 'init') {
|
8
|
+
const srcDir = path.join(__dirname, '..', 'boilerplate');
|
9
|
+
const destDir = process.cwd();
|
10
|
+
|
11
|
+
fs.cpSync(srcDir, destDir, { recursive: true });
|
12
|
+
|
13
|
+
console.log('🚀 Hytopia project initialized successfully!');
|
14
|
+
console.log('💡 Start your development server with `bun --watch index.ts`!');
|
15
|
+
return;
|
16
|
+
}
|
17
|
+
|
18
|
+
console.log('Unknown command: ' + command);
|
Binary file
|
package/package.json
CHANGED
@@ -1,16 +1,15 @@
|
|
1
1
|
{
|
2
2
|
"name": "hytopia",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.4",
|
4
4
|
"description": "The HYTOPIA SDK makes it easy for developers to create multiplayer games on the HYTOPIA platform using JavaScript or TypeScript.",
|
5
5
|
"main": "server.js",
|
6
|
+
"bin": {
|
7
|
+
"hytopia": "bin/scripts.js"
|
8
|
+
},
|
6
9
|
"directories": {
|
7
10
|
"doc": "docs",
|
8
11
|
"example": "examples"
|
9
12
|
},
|
10
|
-
"scripts": {
|
11
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
12
|
-
"start": "node server.js"
|
13
|
-
},
|
14
13
|
"repository": {
|
15
14
|
"type": "git",
|
16
15
|
"url": "git+https://github.com/hytopiagg/sdk.git"
|