Skip to content

Create a new map - #5

Open
Techno453 wants to merge 4 commits into
stanuwu:masterfrom
Techno453:feature/new-world
Open

Techno453 wants to merge 4 commits into
stanuwu:masterfrom
Techno453:feature/new-world

Conversation

@Techno453

Copy link
Copy Markdown

Makes New > Map work. It asks for a name, title, bubble count (1 to 64), ground size and ground colour, compiles a complete map into one new package and opens it in the viewport. The map holds the definition and keys, a root, per bubble a branch with six containers (visibility, render, name, empty service, geometry, physics), a flat static ground with collision, an arrival point and an inert point-query owner, plus a scenario with one enabled state per bubble, registries, the player-service object and localized names.

How:

  • Formats/NewWorld/: the compiler, ported from World Studio. A graph allocator gives tags in key order and root manifests for every type-16 root; writers cover the definition and keys, containers and branches, component tables and simple entities, the static archetype profile, the ground mesh and its flat-colour technique, the ground collision, the visibility owner and query partition, and the scenario. Ground shaders compile from an embedded HLSL file with D3DCompile. The recipe is saved as NAME.newmap.json.
  • NewWorldCompiler reads the installed inputs by tag (collision archetype 80C70CE9, surface 80C70D6A, navigation entity 80C70D01, placeholder navigation root 80C4E6E9, the static archetype profile and three player-service configs), checks each against its pinned layout, and stores copies as derived assets. Collision is framed through HavokPackfileBuilder, so Studio's own reader decodes it.
  • Added assets can carry a Group (feature asset-groups); a map is one group, so one transaction adds it and undo/redo restore the same ids. MapCatalog and WorldLoader list project-added maps and scenarios.

New > Map compiles a map from a name, a title, 1 to 64 bubbles, a ground size and a
colour: definition and keys, root, per-bubble branch and containers, a flat static ground
with collision and shaders, one arrival, an inert point-query owner, and a scenario with
one state per bubble. Installed inputs are named by tag and checked against their pinned
layouts. The map is one added-asset group (manifest version 8), imported as one undo
step, and opens in the viewport. MapCatalog and WorldLoader list maps a project adds in a
new package. SunriseStudio.NewWorld.Tests covers compiles, Studio's readers, the build,
the workflow, and byte parity with World Studio's compiler.
Version 8 now lists the features a manifest holds by name, so this and the
other world-authoring features can merge in any order. A build refuses a
manifest naming a feature it does not know.
NativeBuffer keeps its padded, native and compact placements but frames
every array through NativeArrays, the same file in every world-authoring
branch that appends typed arrays, so merging them dedupes it. The bytes are
unchanged.
…ith World Studio

The cooker now returns each object's data section, fixups and imports, and
Authoring frames them with HavokPackfileBuilder: the reflection class table,
signatures and user tags installed packfiles carry. HavokPackfile reads the
result, so the collision view shows new grounds and the built package's
collision decodes. Parity compares packfiles by data section, fixups, object
classes and imports; every other entry stays byte for byte. The oracle and
World Studio are named by WORLD_STUDIO_SOURCE and SUNRISE_PARITY_DRIVERS, and
the parity check is skipped when they are unset.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant