GitHubはじめる

このページはまだ日本語訳がないため、英語の原文を表示しています。

その他

Working as a team

NSGo projects are designed to be reviewed and merged by Git. Scenes, prefabs, resources, settings and data stay in text files, while the repository records stable file IDs and the permissions that every teammate should review.

Commit the project files

Commit these files with the game code and assets.

File Purpose
game.yaml Project identity, scenes, input, audio, assets and export presets
nsgo.yaml NSGo build, development and signing settings
game.index.yaml Stable UIDs and hashes for project files and references
permissions.yaml Shared editor and agent permissions, when the project uses them
.gitattributes LF text files, binary media and the scene merge driver
go.mod, go.sum The Go and NSGo versions used by the project

Keep .nsgo/, .game/, dist/ and build output out of Git. The editor keeps checkpoints, threads and per-user state under .nsgo/; the asset cache and local editor state are under .game/. A generated release directory belongs in CI artifacts or a release upload.

The starter template includes .gitattributes. If an older project does not, run the merge setup command once after cloning:

go tool game merge -setup

This writes the local merge.nsgo-scene.driver configuration and adds the canonical text, binary and scene rules to .gitattributes. Check the setup without changing files with go tool game merge -check.

Make every clone agree

Use the Go version in go.mod and the NSGo version pinned by the module's tool and require lines. Run go tool nsgo test ./... from the repository root of the game, not a globally installed version. The merge driver is local Git configuration, so every teammate and every CI checkout must run go tool game merge -setup or an equivalent setup step.

The template's attributes force text to LF. Keep that rule when a Windows teammate uses core.autocrlf; it prevents YAML and game.index.yaml from changing only because a clone uses CRLF. Do not hand-edit line endings to resolve a conflict.

Binary art and large files

Git can merge YAML and Go by lines, and the NSGo scene driver can merge scene objects by their IDs. Images, audio, fonts, models and compressed textures remain binary. Put large source files such as layered art, 3D authoring files and long audio in Git LFS, and track the exact extensions the project uses:

git lfs install
git lfs track "*.psd" "*.blend" "*.wav"
git add .gitattributes

Commit the LFS pointer and the .gitattributes change together. Enable LFS locking for assets that cannot be edited concurrently, then lock before editing and unlock after the change is merged:

git lfs lock assets/hero.blend
git lfs unlock assets/hero.blend

Generated atlases, KTX2 textures and release packages should be reproducible from the text project settings and source art. Store them only when the project explicitly ships them as source or a platform requires a checked-in artifact.

Work without stepping on each other

Give large scenes to one owner at a time, and split a level into smaller scenes or prefabs when several people need to work in parallel. The scene merge driver combines objects, children and connections by stable IDs. If it reports a conflict, resolve it in the editor or in the generated conflict report, then run game check before committing.

Keep game.index.yaml with the files it describes. After a move made by Git or another tool, run go tool game index from the project root and commit the index update. Do not resolve an index conflict by choosing one side blindly. Re-run the command after the scene and resource merge so paths, UIDs and content hashes describe the merged tree.

Project-wide permission changes in permissions.yaml deserve the same review as code. Machine-local agent settings and editor preferences stay in .nsgo/ and must not be copied between clones.

Review gates

A pull request that changes scenes, maps, resources or project settings should include the text diff and the reason for the change. Reviewers can inspect the object IDs and YAML fields directly, then run the same gates as CI:

go tool game check .
go tool game index -check .
go tool nsgo test ./...
go tool nsgo check -target macos,windows,linux,android,web

game check catches missing references and malformed maps. game index -check reports stale or missing UIDs without writing the index and fails when the index is out of date. Add a focused test or a deterministic playtest when a scene change changes gameplay. CI should run these commands on the same pinned Go and NSGo versions as the project.

Continuous integration

Start from the workflow generated by the template and keep project-specific checks beside it. A small project normally checks formatting, go tool nsgo test ./..., and go tool nsgo check for its release targets. Add game check, game index -check and game release -strict when the project commits scenes, an index or experimental export presets. Cache Go modules and NSGo's build cache, but never cache .nsgo/ checkpoints or permission files.

Releases and hotfixes

Keep main moving and cut a release branch when a version enters final QA, for example release/1.4. Tag the commit that passed every target check. Fix urgent release issues on that branch, build and test the branch, then cherry-pick the fix back to main so the next release contains it. Increase game.yaml's appVersion for each store release, keep the reverse-DNS id unchanged, and let game release derive the platform packages and build metadata.

Record release notes and asset credits in the project, and keep signing credentials in CI secrets or the platform keychain. The Building and Shipping guide covers target-specific signing and uploads. Open gaps such as scene merge edge cases, project-wide CI checks and binary locking are tracked in #1532, #1534 and #1535.

このページを編集