@evitcastudio/kit 2.1.2 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +60 -59
- package/lib/bundle/cli/cli.js +1387 -53
- package/lib/bundle/cli/kit-game-templates/multi/README.md +15 -0
- package/lib/bundle/cli/kit-game-templates/multi/bun-build.ts +109 -0
- package/lib/bundle/cli/kit-game-templates/multi/favicon.ico +0 -0
- package/lib/bundle/cli/kit-game-templates/multi/package.json +23 -0
- package/lib/bundle/cli/kit-game-templates/multi/src/client/c-network.ts +22 -0
- package/lib/bundle/cli/kit-game-templates/multi/src/client/index.html +9 -0
- package/lib/bundle/cli/kit-game-templates/multi/src/client/index.ts +45 -0
- package/lib/bundle/cli/kit-game-templates/multi/src/client/packets/s-packets.ts +5 -0
- package/lib/bundle/cli/kit-game-templates/multi/src/client/vendor/vylocity-game-engine/vylo.client.js +19 -0
- package/lib/bundle/cli/kit-game-templates/multi/src/map-types.ts +9 -0
- package/lib/bundle/cli/kit-game-templates/multi/src/resources/default-atlas.vyi +0 -0
- package/lib/bundle/cli/kit-game-templates/multi/src/resources/default-macro.vymac +27 -0
- package/lib/bundle/cli/kit-game-templates/multi/src/resources/main-map.vym +1 -0
- package/lib/bundle/cli/kit-game-templates/multi/src/server/index.ts +58 -0
- package/lib/bundle/cli/kit-game-templates/multi/src/server/packets/c-packets.ts +5 -0
- package/lib/bundle/cli/kit-game-templates/multi/src/server/s-network.ts +16 -0
- package/lib/bundle/cli/kit-game-templates/multi/src/server/settings.json +4 -0
- package/lib/bundle/cli/kit-game-templates/multi/src/server/vendor/vylocity-game-engine/vylo.server.js +1 -0
- package/lib/bundle/cli/kit-game-templates/multi/src/types/shared-types.ts +13 -0
- package/lib/bundle/cli/kit-game-templates/multi/src/vylo.d.ts +3850 -0
- package/lib/bundle/cli/kit-game-templates/multi/tsconfig.json +28 -0
- package/lib/bundle/cli/kit-game-templates/single/README.md +15 -0
- package/lib/bundle/cli/kit-game-templates/single/bun-build.ts +33 -0
- package/lib/bundle/cli/kit-game-templates/single/bun-serve.ts +27 -0
- package/lib/bundle/cli/kit-game-templates/single/favicon.ico +0 -0
- package/lib/bundle/cli/kit-game-templates/single/package.json +23 -0
- package/lib/bundle/cli/kit-game-templates/single/src/index.html +12 -0
- package/lib/bundle/cli/kit-game-templates/single/src/index.ts +37 -0
- package/lib/bundle/cli/kit-game-templates/single/src/map-types.ts +9 -0
- package/lib/bundle/cli/kit-game-templates/single/src/resources/default-atlas.vyi +0 -0
- package/lib/bundle/cli/kit-game-templates/single/src/resources/default-macro.vymac +27 -0
- package/lib/bundle/cli/kit-game-templates/single/src/resources/main-map.vym +1 -0
- package/lib/bundle/cli/kit-game-templates/single/src/style.css +0 -0
- package/lib/bundle/cli/kit-game-templates/single/src/types/vylo.d.ts +3850 -0
- package/lib/bundle/cli/kit-game-templates/single/src/vendor/vylocity-game-engine/vylo.client.js +19 -0
- package/lib/bundle/cli/kit-game-templates/single/tsconfig.json +28 -0
- package/lib/cli/main.d.ts +8 -0
- package/lib/cli/main.d.ts.map +1 -0
- package/lib/cli/main.js +9 -0
- package/lib/cli/resource-builder.d.ts +6 -0
- package/lib/cli/resource-builder.d.ts.map +1 -0
- package/lib/cli/resource-builder.js +191 -0
- package/lib/cli/types.d.ts +11 -0
- package/lib/cli/types.d.ts.map +1 -0
- package/lib/cli/types.js +1 -0
- package/lib/index.d.ts +2 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/package.json +72 -0
- package/lib/src/cli/init.d.ts +15 -0
- package/lib/src/cli/init.d.ts.map +1 -0
- package/lib/src/cli/init.js +176 -0
- package/lib/src/cli/main.d.ts +13 -0
- package/lib/src/cli/main.d.ts.map +1 -0
- package/lib/src/cli/main.js +16 -0
- package/lib/src/cli/resource-builder.d.ts +6 -0
- package/lib/src/cli/resource-builder.d.ts.map +1 -0
- package/lib/src/cli/resource-builder.js +191 -0
- package/lib/src/cli/types.d.ts +11 -0
- package/lib/src/cli/types.d.ts.map +1 -0
- package/lib/src/cli/types.js +1 -0
- package/lib/src/events/event-system.d.ts +13 -0
- package/lib/src/events/event-system.d.ts.map +1 -0
- package/lib/src/events/event-system.js +25 -0
- package/lib/src/index.d.ts +8 -0
- package/lib/src/index.d.ts.map +1 -0
- package/lib/src/index.js +5 -0
- package/lib/src/kit.d.ts +67 -0
- package/lib/src/kit.d.ts.map +1 -0
- package/lib/src/kit.js +158 -0
- package/lib/src/plugins/kit-plugin.d.ts +27 -0
- package/lib/src/plugins/kit-plugin.d.ts.map +1 -0
- package/lib/src/plugins/kit-plugin.js +24 -0
- package/lib/src/plugins/network/index.d.ts +55 -0
- package/lib/src/plugins/network/index.d.ts.map +1 -0
- package/lib/src/plugins/network/index.js +101 -0
- package/lib/src/types/shared-types.d.ts +30 -0
- package/lib/src/types/shared-types.d.ts.map +1 -0
- package/lib/src/types/shared-types.js +1 -0
- package/lib/types/vylo.d.ts +3848 -3848
- package/package.json +13 -5
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2024 Jared Bates, Evitca Studio, "doubleactii"
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Jared Bates, Evitca Studio, "doubleactii"
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,60 +1,61 @@
|
|
|
1
|
-
# Kit
|
|
2
|
-
|
|
3
|
-
**Kit** is a lightweight, extensible 2D framework for game development in the [Vylocity Game Engine](https://www.vylocity.com/). Designed to be simple and modular, Kit
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
```bash
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
> [!IMPORTANT]
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
> [!WARNING]
|
|
29
|
-
Depending on your environment
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
1
|
+
# Kit
|
|
2
|
+
|
|
3
|
+
**Kit** is a lightweight, extensible 2D framework for game development in the [Vylocity Game Engine](https://www.vylocity.com/). Designed to be simple and modular, Kit empowers developers to build complex projects quickly through a robust plugin-driven architecture.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g @evitcastudio/kit
|
|
9
|
+
```
|
|
10
|
+
> **Note:** The `-g` flag ensures the `kit` CLI tool is globally available in your PATH.
|
|
11
|
+
|
|
12
|
+
## CLI Core Commands
|
|
13
|
+
|
|
14
|
+
The `kit build` command locates all Vylocity engine-related resources in your source directory, anonymizes them, and moves them to a deploy-ready output directory.
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
kit build -i ./<in-dir> -o ./<out-dir>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Executing this command automatically generates a `resource.json` map in your input directory.
|
|
21
|
+
**Best Practice:** Exclude `resource.json` from version control (`.gitignore`), as it is an ephemeral build artifact.
|
|
22
|
+
|
|
23
|
+
## Runtime Resource Loading
|
|
24
|
+
|
|
25
|
+
> [!IMPORTANT]
|
|
26
|
+
> `Kit.setResources()` should be called **before** `VYLO.load()`.
|
|
27
|
+
|
|
28
|
+
> [!WARNING]
|
|
29
|
+
> Depending on your build environment (e.g., webpack, vite, or bun), you may need specific loaders or assertions to import JSON natively.
|
|
30
|
+
|
|
31
|
+
```typescript
|
|
32
|
+
import resourceJSON from './resource.json';
|
|
33
|
+
|
|
34
|
+
// Initialize the engine with mapped resources
|
|
35
|
+
await Kit.setResources(resourceJSON);
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Plugin Architecture
|
|
39
|
+
|
|
40
|
+
```ts
|
|
41
|
+
import { Plugin } from 'custom-plugin';
|
|
42
|
+
|
|
43
|
+
const plugin = Kit.registerPlugin(Plugin);
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
# Listening for plugin events
|
|
47
|
+
|
|
48
|
+
```js
|
|
49
|
+
const listener = (pEvent: EmitterEvent) => {
|
|
50
|
+
const { data, timestamp } = pEvent;
|
|
51
|
+
// Here you can use the data that the event sent down.
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Here you listen for an event from the plugin: `Plugin`, under the event name of `eventName`
|
|
55
|
+
Kit.on('Plugin', 'eventName', listener);
|
|
56
|
+
|
|
57
|
+
// You can also stop listening for an event
|
|
58
|
+
Kit.off('Plugin', 'eventName', listener);
|
|
59
|
+
```
|
|
60
|
+
|
|
60
61
|
For more information check out the [wiki](https://github.com/EvitcaStudio/Kit/wiki)
|