hytopia 0.1.19 → 0.1.20
Sign up to get free protection for your applications and to get access to all the features.
- package/.github/ISSUE_TEMPLATE/bug_report.md +23 -0
- package/README.md +1 -1
- package/bin/scripts.js +2 -1
- package/examples/README.md +22 -0
- package/examples/payload-game/index.ts +14 -0
- package/package.json +1 -1
@@ -0,0 +1,23 @@
|
|
1
|
+
---
|
2
|
+
name: Bug report
|
3
|
+
about: Create a bug report. Use this for unexpected behaviors that we can reproduce so we can fix them in the SDK. If we find your issue is not an SDK bug, we'll provide clarity on a fix for your code.
|
4
|
+
title: <Concise title for this bug> [BUG]
|
5
|
+
labels: bug
|
6
|
+
assignees: iamarkdev
|
7
|
+
|
8
|
+
---
|
9
|
+
|
10
|
+
**What were you trying to do, what did you expect to happen?**
|
11
|
+
Let us know what you were trying to do, and what you expected your code to do that it did not.
|
12
|
+
|
13
|
+
**What actually happened?**
|
14
|
+
What did your code actually do? Explain the bug/issue clearly.
|
15
|
+
|
16
|
+
**To Reproduce**
|
17
|
+
For SDK specific bugs, please provide the HYTOPIA SDK version you're using and a complete snippet of your code so we can reproduce this issue locally.
|
18
|
+
|
19
|
+
**Screenshots**
|
20
|
+
If applicable, add screenshots to help explain your problem.
|
21
|
+
|
22
|
+
**Additional context**
|
23
|
+
Add any other context about the problem here.
|
package/README.md
CHANGED
@@ -1,7 +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
|
+
[Quickstart](#quickstart) • [API Reference](./docs/server.md) • [Examples](./examples) • [Join Our Developer Discord](https://discord.gg/hytopia-developers) • [Report Bugs or Request Features](https://github.com/hytopiagg/sdk/issues)
|
5
5
|
|
6
6
|
## What is HYTOPIA?
|
7
7
|
|
package/bin/scripts.js
CHANGED
@@ -43,7 +43,8 @@ const path = require('path');
|
|
43
43
|
console.log('🔧 Initializing project');
|
44
44
|
execSync('bun init --yes');
|
45
45
|
execSync('bun add hytopia');
|
46
|
-
|
46
|
+
|
47
|
+
const srcDir = path.join(__dirname, '..', 'boilerplate');
|
47
48
|
fs.cpSync(srcDir, destDir, { recursive: true });
|
48
49
|
}
|
49
50
|
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# HYTOPIA SDK Examples
|
2
|
+
|
3
|
+
HYTOPIA SDK examples are a collection of HYTOPIA SDK projects that demonstrate full games or specific features using the SDK.
|
4
|
+
|
5
|
+
In each folder, you'll find an index.ts file - this is the main entry point and where you'll find the code for each example.
|
6
|
+
|
7
|
+
Here's an overview of the examples available:
|
8
|
+
- [`payload-game`](./payload-game): A simple game where players must stay near a payload for it to move towards its destination while enemies spawn and swarm the players.
|
9
|
+
- [`character-controller`](./character-controller): A simple example of how to implement your own character controller class.
|
10
|
+
- [`entity-spawn`](./entity-spawn): A simple example of how to spawn an entity and set some of its properties.
|
11
|
+
|
12
|
+
## Use Examples As Templates For Your Projects
|
13
|
+
|
14
|
+
If you want to init a new HYTOPIA project based on an example in this directory, you can use the `hytopia init` command with the `--template` flag.
|
15
|
+
|
16
|
+
For example, to create a new project based on the `payload-game` example, you can run:
|
17
|
+
|
18
|
+
```bash
|
19
|
+
bunx hytopia init --template payload-game
|
20
|
+
```
|
21
|
+
|
22
|
+
The value passed to the `--template` flag should be the name of the folder in the examples directory.
|
@@ -1,5 +1,19 @@
|
|
1
1
|
/**
|
2
|
+
* payload-game is a simple game that encompasses a number of core HYTOPIA SDK systems.
|
3
|
+
* This example utilizes entities, spawning, rigid body, colliders and sensors,
|
4
|
+
* collision groups, audio, character controller hooks, and more.
|
2
5
|
*
|
6
|
+
* This example is a quick and dirty implementation of an overwatch style push the payload
|
7
|
+
* in a multiplayer PvE style. Players start the game around the payload and must stay near it
|
8
|
+
* for it to move towards the next waypoint. Enemies spawn near the next arget waypoint of
|
9
|
+
* the payload and swarm towards the players. Players can left click to shoot spiders with
|
10
|
+
* bullets.
|
11
|
+
*
|
12
|
+
* This example is not meant to be a polished game, but rather a demonstration of how to use
|
13
|
+
* the SDK to build your own games.
|
14
|
+
*
|
15
|
+
* In a polished implementation, we'd be using multiple files and not just index.ts to
|
16
|
+
* break out and properly organize game behavior and mechanics.
|
3
17
|
*/
|
4
18
|
|
5
19
|
import {
|
package/package.json
CHANGED