|
|
PixelBullet
0.0.1
A C++ game engine
|
Weapon presentation projects logical combat events into optional owned-view and world visuals, motion, animation cues, and audio. It does not own aim-ray selection, fire cadence, ammo, reload rules, hits, or damage.
ActorWeaponPresentationLoadoutComponent maps logical weapon slot IDs to:
The slot ID joins this component to ActorWeaponLoadoutComponent. The logical world weapon entity remains combat-owned. PawnOwnedViewPresentationComponent defines the pawn's owned-view camera/presentation space, while prefab instances and socket attachments provide visible weapon geometry.
Owned-view and world profile schemas are owned under framework/scene_play/weapon_presentation. Profiles identify the expected world weapon prefab, supported action kinds, and cue specifications. Owned-view profiles may also identify an owned-view prefab plus aim and locomotion settings.
Combat does not require presentation components. Missing or disabled loadouts, slots, entities, prefab instances, profiles, cue specs, anchors, or sockets are reported as explicit resolution/inspection statuses. The runtime omits the unresolvable presentation action or cue and continues the combat simulation.
This makes reduced scenes and direct NPC ranged attacks valid, but it can produce expected diagnostic noise when optional presentation is absent. A scene claiming complete presentation must instead satisfy the full binding, prefab, profile, anchor, and socket chain.
Owned-view profiles may define:
The presentation pipeline applies layers in this order:
Authored rig animation is the idle authority when procedural idle amplitudes are zero. Locomotion bob is driven by requested movement intent; actual movement speed remains available for inspection but does not wake idle motion by itself. New sway, breathing, inertia, or recoil split belongs in a named layer with an explicit position in this order.
World profiles define supported actions and cues bound to a muzzle socket. World cue payloads may create flash, tracer, and spatial audio with attenuation distances. Animation notifies can time Shoot and Reload actions. Socket attachment profiles define how visible world weapon prefabs attach to character rigs; authoring preview may name an attachment profile without changing runtime ownership.
Local owned-view audio and spatial world audio are separate presenters. Presentation frames carry resolved cues to renderer/audio consumers after simulation has emitted the corresponding combat or animation facts.
| Coverage | Scenes |
|---|---|
| Complete two-slot owned-view presentation | @shared/scenes/humanoid_weapon_slots_first_person_runtime.scene.yaml |
| Complete pistol owned-view presentation | @shared/scenes/humanoid_pistol_first_person_runtime.scene.yaml |
| Complete pistol world presentation | @shared/scenes/humanoid_pistol_third_person_runtime.scene.yaml |
| Combined humanoid pistol pressure | @shared/scenes/humanoid_pistol_player_runtime.scene.yaml, humanoid_pistol_runtime.scene.yaml, and humanoid_pistol_engagement.scene.yaml |
| Reduced combat-only integration | @shared/scenes/level_slice.scene.yaml and @shared/scenes/combat_lab.scene.yaml |
The complete scenes bind presentation loadouts, owned-view entities where applicable, profiles, prefabs, sockets, and cue assets. Level Slice and Combat Lab bind a logical world pistol for combat but do not bind a presentation loadout.
Level Slice's GroundedPistol is an oversized, unattached world prefab at its scene transform. It is useful as a logical combat entity, not as proof of correct character socket presentation. Both Level Slice and Combat Lab can emit optional-presentation diagnostics during otherwise valid combat. These limitations belong to the authored scenes; they do not justify changing runtime logging or presentation fallback behavior in this documentation slice.
Focused proof covers profile schema and validation, loadout/profile resolution, action/notify handling, owned-view motion and recoil ordering, flash/tracer visuals, local/spatial weapon audio, world sockets, editor preview policy, and complete representative scenes.