Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions docs/asset-credits.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# 素材来源

内置素材库里的官方精选,除了 GameKit 自己画的森林,都来自 [Kenney](https://kenney.nl/assets)。Kenney 这些包以 [CC0 1.0](https://creativecommons.org/publicdomain/zero/1.0/legalcode) 贡献到公共领域。使用时不要求署名。GameKit 仍然记下作者、原包链接和内容 hash,缺了许可或来源就不能构建。

每个主题只收了原包里风格协调的一小部分:角色、地形或瓦片、道具、特效、短音效。没有整包搬进来,也没有热链接到 kenney.nl。复制进项目的是文件本身,运行和导出都不访问外网。

| 包 | 主题 | 文件数 | 原包 |
| --- | --- | --- | --- |
| `kenney-platform` | 平台跳跃 | 11 | [Pixel Platformer](https://kenney.nl/assets/pixel-platformer) |
| `kenney-dungeon` | 迷宫地牢 | 7 | [Tiny Dungeon](https://kenney.nl/assets/tiny-dungeon) |
| `kenney-space` | 太空射击 | 9 | [Pixel Shmup](https://kenney.nl/assets/pixel-shmup) |
| `kenney-racing` | 竞速 | 11 | [Pixel Vehicle Pack](https://kenney.nl/assets/pixel-vehicle-pack) |
| `kenney-puzzle` | 益智 | 4 | [Sokoban](https://kenney.nl/assets/sokoban) |
| `kenney-ui` | 界面 | 13 | [UI Pack](https://kenney.nl/assets/ui-pack)(只要蓝色默认样式) |
| `kenney-sfx` | 音效 | 15 | [Kenney 素材](https://kenney.nl/assets) 里的短声音。每条声音的来源指向它自己的原包:Digital Audio、Impact Sounds、Interface Sounds、RPG Audio、Sci-fi Sounds |

音效是原来的 OGG Vorbis,没有转码。文件头里要能认出 Vorbis,构建才会通过。

有三处为了接上现有编辑器,动过像素,说明写在包的署名里:

- 平台跳跃的地形是原来的 18 像素单张图。地图编辑器只收 8、16、32 像素的方格,所以这些地形不进地图调色板。
- 迷宫地牢和太空射击的图块是原来的 16 像素,排成 4×4,地图编辑器可以直接用。地牢包没有单独的角色图。
- 益智图块从 Sokoban 的 64 像素用最近邻缩到 32 像素。推箱子的人仍是 64 像素,四帧排成精灵表。
- 竞速的人原来每帧宽窄不一样,这里放进同样的 16×16 透明格子,脚对齐到底边,动画编辑器才能打开。车还是原来的大小。

GameKit 自己的「森林冒险」和「森林声音」不是 Kenney 的图,作者是 GameKit,许可同样是 CC0。
15 changes: 8 additions & 7 deletions docs/roadmap.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ await asyncio.sleep(0)

## 素材库

内置素材放在站点的 `public/asset-packs/`,打开素材库才请求说明文件和缩略图,不打进页面脚本。复制进项目的是文件字节,路径像 `assets/library/forest-adventure/characters/hero.png`,用普通 `pygame.image.load`。`assets/library.json` 只记下复制时的包版本、hash 和许可来源,游戏不要读它。
内置素材放在站点的 `public/asset-packs/`,打开素材库、新建地图或声音编辑器才请求说明文件和缩略图,不打进页面脚本。除了 GameKit 画的森林,还有 Kenney 的 CC0 精选(见 [docs/asset-credits.md](asset-credits.md))。复制进项目的是文件字节,路径像 `assets/library/forest-adventure/characters/hero.png`,用普通 `pygame.image.load`。地图如果从素材库的图块开始,瓦片图也会存进项目里的 `maps/*.tileset.png`。`assets/library.json` 只记下复制时的包版本、hash 和许可来源,游戏不要读它。

预览和导出都打包项目里的这份副本(和别的 `assets/` 文件一样)。成品不请求素材库目录,也不请求 GameKit 站点。素材库以后升级,不会改掉已经复制进项目、或已经导出的那一份。模板本身没有为素材库改过。

## 声音

声音编辑器把参数合成成 16-bit 单声道 22.05 kHz WAV。试听播放的字节和保存进 `assets/` 的字节是同一份,所以导出的游戏不调用生成接口。pygame-web 能播这种 PCM WAV,也能播通过文件头检查的 OGG Vorbis。MP3、AIFF、坏掉的 WAV、以及 Ogg 里的 Opus 会在问题面板里说明,不会假装能播。官方音效在素材库里,复制进项目之后和别的 `assets/` 文件一样打包。播放用普通 `pygame.mixer.Sound`。模板没有为声音改过。声音要等孩子点一下画面才会响。
声音编辑器把参数合成成 16-bit 单声道 22.05 kHz WAV。试听播放的字节和保存进 `assets/` 的字节是同一份,所以导出的游戏不调用生成接口。pygame-web 能播这种 PCM WAV,也能播通过文件头检查的 OGG Vorbis。MP3、AIFF、坏掉的 WAV、以及 Ogg 里的 Opus 会在问题面板里说明,不会假装能播。官方音效在素材库里,包括 Kenney 原来的 OGG Vorbis。复制进项目之后和别的 `assets/` 文件一样打包。播放用普通 `pygame.mixer.Sound`。模板没有为声音改过。声音要等孩子点一下画面才会响。

## 精灵动画

Expand Down
84 changes: 84 additions & 0 deletions public/asset-packs/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,90 @@
"source": "https://github.com/talkincode/GameKit",
"attribution": "这些声音由 GameKit 用参数合成,以 CC0 1.0 贡献到公共领域。使用时无需署名。不是从第三方素材站搬运的,也不是调用生成接口做的。",
"assetCount": 5
},
{
"id": "kenney-dungeon",
"version": "1.0.0",
"title": "迷宫地牢",
"theme": "迷宫地牢",
"summary": "16 像素的地砖、墙、门、箱子和旗帜,可以放进地图编辑器。来自 Kenney 的 Tiny Dungeon,CC0。",
"license": "CC0-1.0",
"author": "Kenney",
"source": "https://kenney.nl/assets/tiny-dungeon",
"attribution": "这些素材来自 Kenney(www.kenney.nl)的 CC0 包,使用时无需署名。GameKit 只收了原包里的一小部分。图块按 4×4 排好,每格 16 像素,地图编辑器的调色板可以直接用。原始包:https://kenney.nl/assets/tiny-dungeon",
"assetCount": 7
},
{
"id": "kenney-platform",
"version": "1.0.0",
"title": "平台跳跃",
"theme": "平台跳跃",
"summary": "绿色和蓝色小人、草地、泥土、石砖和水面,加上跳跃和脚步声。来自 Kenney 的 Pixel Platformer,CC0。",
"license": "CC0-1.0",
"author": "Kenney",
"source": "https://kenney.nl/assets/pixel-platformer",
"attribution": "这些素材来自 Kenney(www.kenney.nl)的 CC0 包,使用时无需署名。GameKit 只收了原包里的一小部分。小人的两帧排成了一张精灵表,动画编辑器可以直接打开。地形保持原来的 18 像素。原始包:https://kenney.nl/assets/pixel-platformer",
"assetCount": 11
},
{
"id": "kenney-puzzle",
"version": "1.0.0",
"title": "益智",
"theme": "益智",
"summary": "推箱子的人和 32 像素的地面、方块、箱子。来自 Kenney 的 Sokoban,CC0。",
"license": "CC0-1.0",
"author": "Kenney",
"source": "https://kenney.nl/assets/sokoban",
"attribution": "这些素材来自 Kenney(www.kenney.nl)的 CC0 包,使用时无需署名。GameKit 只收了原包里的一小部分。地图格子从原来的 64 像素缩小到 32 像素,好放进地图编辑器。人还是 64 像素,四帧排成精灵表。原始包:https://kenney.nl/assets/sokoban",
"assetCount": 4
},
{
"id": "kenney-racing",
"version": "1.0.0",
"title": "竞速",
"theme": "竞速",
"summary": "赛车、走路的人、路障和一段公路,加上撞击声。来自 Kenney 的 Pixel Vehicle Pack,CC0。",
"license": "CC0-1.0",
"author": "Kenney",
"source": "https://kenney.nl/assets/pixel-vehicle-pack",
"attribution": "这些素材来自 Kenney(www.kenney.nl)的 CC0 包,使用时无需署名。GameKit 只收了原包里的一小部分。人的三帧原来宽窄不一样,这里放在同样的 16×16 透明格子里,动画编辑器才能打开。车还是原来的大小。原始包:https://kenney.nl/assets/pixel-vehicle-pack",
"assetCount": 11
},
{
"id": "kenney-sfx",
"version": "1.0.0",
"title": "音效",
"theme": "音效",
"summary": "跳跃、金币、激光、脚步、开门和点击。来自 Kenney 的几套 CC0 音效,都是原来的 OGG Vorbis。",
"license": "CC0-1.0",
"author": "Kenney",
"source": "https://kenney.nl/assets",
"attribution": "这些素材来自 Kenney(www.kenney.nl)的 CC0 包,使用时无需署名。GameKit 只收了原包里的一小部分。这一套把 Digital Audio、Impact Sounds、Interface Sounds、RPG Audio 和 Sci-fi Sounds 里的短声音放在一起。每条声音的来源链到它自己的原包。原始包:https://kenney.nl/assets",
"assetCount": 15
},
{
"id": "kenney-space",
"version": "1.0.0",
"title": "太空射击",
"theme": "太空射击",
"summary": "飞船、敌机、地面图块和闪光,加上激光声。来自 Kenney 的 Pixel Shmup,CC0。",
"license": "CC0-1.0",
"author": "Kenney",
"source": "https://kenney.nl/assets/pixel-shmup",
"attribution": "这些素材来自 Kenney(www.kenney.nl)的 CC0 包,使用时无需署名。GameKit 只收了原包里的一小部分。地面图块按 4×4 排好,每格 16 像素,地图编辑器可以直接用。飞船是原来的 32 像素。原始包:https://kenney.nl/assets/pixel-shmup",
"assetCount": 9
},
{
"id": "kenney-ui",
"version": "1.0.0",
"title": "界面",
"theme": "界面",
"summary": "箭头、勾、叉、星星和点击声。来自 Kenney 的 UI Pack,只要蓝色的一小套,CC0。",
"license": "CC0-1.0",
"author": "Kenney",
"source": "https://kenney.nl/assets/ui-pack",
"attribution": "这些素材来自 Kenney(www.kenney.nl)的 CC0 包,使用时无需署名。GameKit 只收了原包里的一小部分。只收了蓝色默认样式里的小图标,没有把整套颜色都放进来。原始包:https://kenney.nl/assets/ui-pack",
"assetCount": 13
}
]
}
Binary file added public/asset-packs/kenney-dungeon/effects/flower.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
217 changes: 217 additions & 0 deletions public/asset-packs/kenney-dungeon/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,217 @@
{
"format": "gamekit.asset-pack",
"formatVersion": 1,
"id": "kenney-dungeon",
"version": "1.0.0",
"title": "迷宫地牢",
"theme": "迷宫地牢",
"summary": "16 像素的地砖、墙、门、箱子和旗帜,可以放进地图编辑器。来自 Kenney 的 Tiny Dungeon,CC0。",
"license": {
"spdx": "CC0-1.0",
"name": "CC0 1.0 Universal",
"url": "https://creativecommons.org/publicdomain/zero/1.0/legalcode"
},
"author": "Kenney",
"source": "https://kenney.nl/assets/tiny-dungeon",
"attribution": "这些素材来自 Kenney(www.kenney.nl)的 CC0 包,使用时无需署名。GameKit 只收了原包里的一小部分。图块按 4×4 排好,每格 16 像素,地图编辑器的调色板可以直接用。原始包:https://kenney.nl/assets/tiny-dungeon",
"assets": [
{
"id": "dungeon-tiles",
"version": "1.0.0",
"title": "地牢图块",
"path": "tilesets/rooms.png",
"mediaType": "image/png",
"tags": [
"图块",
"地形",
"地牢"
],
"theme": "迷宫地牢",
"category": "tileset",
"preview": "tilesets/rooms.png",
"license": {
"spdx": "CC0-1.0",
"name": "CC0 1.0 Universal",
"url": "https://creativecommons.org/publicdomain/zero/1.0/legalcode"
},
"author": "Kenney",
"source": "https://kenney.nl/assets/tiny-dungeon",
"attribution": "这些素材来自 Kenney(www.kenney.nl)的 CC0 包,使用时无需署名。GameKit 只收了原包里的一小部分。图块按 4×4 排好,每格 16 像素,地图编辑器的调色板可以直接用。原始包:https://kenney.nl/assets/tiny-dungeon",
"sha256": "41511ff2c66d33e65a506c70da6d82ad0e610bb2b349c9e0082a386e41a820fa",
"width": 64,
"height": 64,
"tileset": {
"tileWidth": 16,
"tileHeight": 16,
"columns": 4,
"rows": 4,
"names": [
"棕色地砖",
"深色地砖",
"灰色地砖",
"蓝灰地砖",
"暗色地砖",
"砖墙",
"石墙",
"蓝砖",
"木地板",
"白花",
"石碑",
"木桶",
"木箱",
"木门",
"旗帜",
"木箱盖"
]
}
},
{
"id": "dungeon-flower",
"version": "1.0.0",
"title": "白花",
"path": "effects/flower.png",
"mediaType": "image/png",
"tags": [
"特效",
"花"
],
"theme": "迷宫地牢",
"category": "effect",
"preview": "effects/flower.png",
"license": {
"spdx": "CC0-1.0",
"name": "CC0 1.0 Universal",
"url": "https://creativecommons.org/publicdomain/zero/1.0/legalcode"
},
"author": "Kenney",
"source": "https://kenney.nl/assets/tiny-dungeon",
"attribution": "这些素材来自 Kenney(www.kenney.nl)的 CC0 包,使用时无需署名。GameKit 只收了原包里的一小部分。图块按 4×4 排好,每格 16 像素,地图编辑器的调色板可以直接用。原始包:https://kenney.nl/assets/tiny-dungeon",
"sha256": "a4cda9571f99b9d4f597bb5a99d3b419a7d54756567d8204e9b291e60019bfe6",
"width": 16,
"height": 16
},
{
"id": "dungeon-door",
"version": "1.0.0",
"title": "木门",
"path": "props/door.png",
"mediaType": "image/png",
"tags": [
"道具",
"门"
],
"theme": "迷宫地牢",
"category": "prop",
"preview": "props/door.png",
"license": {
"spdx": "CC0-1.0",
"name": "CC0 1.0 Universal",
"url": "https://creativecommons.org/publicdomain/zero/1.0/legalcode"
},
"author": "Kenney",
"source": "https://kenney.nl/assets/tiny-dungeon",
"attribution": "这些素材来自 Kenney(www.kenney.nl)的 CC0 包,使用时无需署名。GameKit 只收了原包里的一小部分。图块按 4×4 排好,每格 16 像素,地图编辑器的调色板可以直接用。原始包:https://kenney.nl/assets/tiny-dungeon",
"sha256": "ba976d7810eb6096c163158c0ffd171356aa9efa805bedf270e198744cc75c2d",
"width": 16,
"height": 16
},
{
"id": "dungeon-crate",
"version": "1.0.0",
"title": "木箱",
"path": "props/crate.png",
"mediaType": "image/png",
"tags": [
"道具",
"箱子"
],
"theme": "迷宫地牢",
"category": "prop",
"preview": "props/crate.png",
"license": {
"spdx": "CC0-1.0",
"name": "CC0 1.0 Universal",
"url": "https://creativecommons.org/publicdomain/zero/1.0/legalcode"
},
"author": "Kenney",
"source": "https://kenney.nl/assets/tiny-dungeon",
"attribution": "这些素材来自 Kenney(www.kenney.nl)的 CC0 包,使用时无需署名。GameKit 只收了原包里的一小部分。图块按 4×4 排好,每格 16 像素,地图编辑器的调色板可以直接用。原始包:https://kenney.nl/assets/tiny-dungeon",
"sha256": "25afdd367cb93441e72fa9a70699f8c0b2df6e09ef4ff124fa196f7e76247339",
"width": 16,
"height": 16
},
{
"id": "dungeon-flag",
"version": "1.0.0",
"title": "旗帜",
"path": "props/flag.png",
"mediaType": "image/png",
"tags": [
"道具",
"旗帜"
],
"theme": "迷宫地牢",
"category": "prop",
"preview": "props/flag.png",
"license": {
"spdx": "CC0-1.0",
"name": "CC0 1.0 Universal",
"url": "https://creativecommons.org/publicdomain/zero/1.0/legalcode"
},
"author": "Kenney",
"source": "https://kenney.nl/assets/tiny-dungeon",
"attribution": "这些素材来自 Kenney(www.kenney.nl)的 CC0 包,使用时无需署名。GameKit 只收了原包里的一小部分。图块按 4×4 排好,每格 16 像素,地图编辑器的调色板可以直接用。原始包:https://kenney.nl/assets/tiny-dungeon",
"sha256": "6cee741dcc6bf96b37a1a72dc4e99f3309358cd1f572a7093159f388ff2fecf3",
"width": 16,
"height": 16
},
{
"id": "dungeon-door-sfx",
"version": "1.0.0",
"title": "开门",
"path": "sounds/door.ogg",
"mediaType": "audio/ogg",
"tags": [
"音效",
"门",
"地牢"
],
"theme": "迷宫地牢",
"category": "sfx",
"preview": "sounds/door.ogg",
"license": {
"spdx": "CC0-1.0",
"name": "CC0 1.0 Universal",
"url": "https://creativecommons.org/publicdomain/zero/1.0/legalcode"
},
"author": "Kenney",
"source": "https://kenney.nl/assets/rpg-audio",
"attribution": "这些素材来自 Kenney(www.kenney.nl)的 CC0 包,使用时无需署名。GameKit 只收了原包里的一小部分。声音是 Kenney 原来的 OGG Vorbis,没有转码。原始包:https://kenney.nl/assets/rpg-audio",
"sha256": "4ab93bab96522d8eb109ff96dc57cb6765deb02448fe14c10472084be5bb2a0b"
},
{
"id": "dungeon-step",
"version": "1.0.0",
"title": "石地脚步",
"path": "sounds/step.ogg",
"mediaType": "audio/ogg",
"tags": [
"音效",
"走路",
"地牢"
],
"theme": "迷宫地牢",
"category": "sfx",
"preview": "sounds/step.ogg",
"license": {
"spdx": "CC0-1.0",
"name": "CC0 1.0 Universal",
"url": "https://creativecommons.org/publicdomain/zero/1.0/legalcode"
},
"author": "Kenney",
"source": "https://kenney.nl/assets/rpg-audio",
"attribution": "这些素材来自 Kenney(www.kenney.nl)的 CC0 包,使用时无需署名。GameKit 只收了原包里的一小部分。声音是 Kenney 原来的 OGG Vorbis,没有转码。原始包:https://kenney.nl/assets/rpg-audio",
"sha256": "6fe61ef1fc3bcf0e253bf2eb64759db6cb69e2fe452f4d88cc597ecf78a3d601"
}
]
}
Binary file added public/asset-packs/kenney-dungeon/props/crate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/asset-packs/kenney-dungeon/props/door.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/asset-packs/kenney-dungeon/props/flag.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/asset-packs/kenney-dungeon/sounds/door.ogg
Binary file not shown.
Binary file added public/asset-packs/kenney-dungeon/sounds/step.ogg
Binary file not shown.
Binary file added public/asset-packs/kenney-dungeon/tilesets/rooms.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/asset-packs/kenney-platform/effects/dust.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading