Chamber 15 - first pass (#39) (#69)

* started on chamber 15

* fizzler width can now be scaled via blender object's scale.x

* fix fizzler rendering radius (remember, fizzlers are per default 2x2, still their internal width height was 1x1?)

* chamber 15 first room functionally complete

* chamber 15: first room decor

* finished first room of chamber 15

* test chamber 15 second room WIP

* chamber15 hallway from room 2 to room 3 (WIP) and more progress on room 2

* test chamber 15: added observation room to room2, added voice lines add the beginning

* test chamber 15: finishing room 2

* enable "new game" menu entry for chamber 15 & boot into the intro menu again instead of straight into chamber 15

* Start on shamber 15 hazard hallway

Hallway is modeled with collision. No platforms.

* Decals and platform + light cutouts for chamber 15 hazard hallway

* Animate one moving platform in chamber 15 hazard hallway

This one animation is ~19 KB. Look at optimizing.

* Add material for water hazard wall

* Use water hazard wall material in chamber 15

* Start modelling final room of chamber 15

* Chamber 15 final room - side rooms

* Chamber 15 final room - pistons and exit

* Chamber 15 final room - observation room

* Chamber 15 final room - ball launcher and catcher

* Chamber 15 final room - ball trap and indicator lights

* Chamber 15 final room - ball trap doors

* Chamber 15 final room - collision

* Chamber 15 final room - animations and triggers

* Chamber 15 - escape hatch

* Chamber 15 - finish final room

* Chamber 15 - start on room 3

* Chamber 15 - main room 3 layout and collision

* Fix UV translation

Do not translate minimum coordinates, otherwise the translation will be
cancelled out.

* Chamber 15 - room 3 stair room

* Chamber 15 - room 3 dividers and ball launcher/catcher

* Chamber 15 - room 3 finishing touches

* Observation room decor
* Triggers
* Indicator lights
* Decals

* Chamber 15 - merge beginning and end

* Chamber 15 - fix room boundaries

---------

Co-authored-by: Deconimus <pascal.sielski@gmx.de>
Co-authored-by: Deconimus <Deconimus@users.noreply.github.com>
This commit is contained in:
Matt Penny 2024-05-28 01:53:02 -04:00 committed by GitHub
parent 134be543ba
commit 1e8275eec3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 126 additions and 12 deletions

View file

@ -203,6 +203,7 @@ portal_pak_dir/materials/effects/portal_1_particle_orange.png: portal_pak_dir/ma
$(VTF2PNG) -f 2 $< $@ $(VTF2PNG) -f 2 $< $@
portal_pak_dir/materials/signage/signage_overlay_fling1.png: portal_pak_dir/materials/signage/signage_overlay_fling2.png portal_pak_dir/materials/signage/signage_overlay_dots1.png portal_pak_dir/materials/signage/signage_overlay_dots2.png portal_pak_dir/materials/signage/signage_overlay_dots3.png portal_pak_dir/materials/signage/signage_overlay_dots4.png portal_pak_dir/materials/signage/signage_overlay_toxic.png portal_pak_dir/materials/signage/signage_overlay_fountain.png portal_pak_dir/materials/signage/signage_overlay_fling1.png: portal_pak_dir/materials/signage/signage_overlay_fling2.png portal_pak_dir/materials/signage/signage_overlay_dots1.png portal_pak_dir/materials/signage/signage_overlay_dots2.png portal_pak_dir/materials/signage/signage_overlay_dots3.png portal_pak_dir/materials/signage/signage_overlay_dots4.png portal_pak_dir/materials/signage/signage_overlay_toxic.png portal_pak_dir/materials/signage/signage_overlay_fountain.png
portal_pak_dir/materials/signage/signage_overlay_midair1.png: portal_pak_dir/materials/signage/signage_overlay_midair2.png
portal_pak_dir/materials/signage/signage_exit.png: portal_pak_dir/materials/signage/signage_overlay_arrow.png portal_pak_dir/materials/signage/signage_overlay_boxdispenser.png portal_pak_dir/materials/signage/signage_overlay_boxhurt.png portal_pak_dir/materials/signage/signage_overlay_energyball.png portal_pak_dir/materials/signage/signage_overlay_catcher.png portal_pak_dir/materials/signage/signage_overlay_toxic.png portal_pak_dir/materials/signage/signage_overlay_fountain.png portal_pak_dir/materials/signage/signage_exit.png: portal_pak_dir/materials/signage/signage_overlay_arrow.png portal_pak_dir/materials/signage/signage_overlay_boxdispenser.png portal_pak_dir/materials/signage/signage_overlay_boxhurt.png portal_pak_dir/materials/signage/signage_overlay_energyball.png portal_pak_dir/materials/signage/signage_overlay_catcher.png portal_pak_dir/materials/signage/signage_overlay_toxic.png portal_pak_dir/materials/signage/signage_overlay_fountain.png
portal_pak_dir/materials/signage/indicator_lights/indicator_lights_floor.png: portal_pak_dir/materials/signage/indicator_lights/indicator_lights_corner_floor.png portal_pak_dir/materials/signage/indicator_lights/indicator_lights_floor.png: portal_pak_dir/materials/signage/indicator_lights/indicator_lights_corner_floor.png
portal_pak_dir/materials/signage/indicator_lights/indicator_lights_floor_on.png: portal_pak_dir/materials/signage/indicator_lights/indicator_lights_corner_floor_on.png portal_pak_dir/materials/signage/indicator_lights/indicator_lights_floor_on.png: portal_pak_dir/materials/signage/indicator_lights/indicator_lights_corner_floor_on.png
@ -408,7 +409,8 @@ ANIM_TEST_CHAMBERS = build/assets/test_chambers/test_chamber_00/test_chamber_00_
build/assets/test_chambers/test_chamber_06/test_chamber_06_anim.o \ build/assets/test_chambers/test_chamber_06/test_chamber_06_anim.o \
build/assets/test_chambers/test_chamber_07/test_chamber_07_anim.o \ build/assets/test_chambers/test_chamber_07/test_chamber_07_anim.o \
build/assets/test_chambers/test_chamber_08/test_chamber_08_anim.o \ build/assets/test_chambers/test_chamber_08/test_chamber_08_anim.o \
build/assets/test_chambers/test_chamber_09/test_chamber_09_anim.o build/assets/test_chambers/test_chamber_09/test_chamber_09_anim.o \
build/assets/test_chambers/test_chamber_10/test_chamber_10_anim.o
build/anims.ld: $(ANIM_LIST) $(ANIM_TEST_CHAMBERS) tools/generate_animation_ld.js build/anims.ld: $(ANIM_LIST) $(ANIM_TEST_CHAMBERS) tools/generate_animation_ld.js
@mkdir -p $(@D) @mkdir -p $(@D)
@ -427,7 +429,8 @@ TEST_CHAMBERS = assets/test_chambers/test_chamber_00/test_chamber_00.blend \
assets/test_chambers/test_chamber_06/test_chamber_06.blend \ assets/test_chambers/test_chamber_06/test_chamber_06.blend \
assets/test_chambers/test_chamber_07/test_chamber_07.blend \ assets/test_chambers/test_chamber_07/test_chamber_07.blend \
assets/test_chambers/test_chamber_08/test_chamber_08.blend \ assets/test_chambers/test_chamber_08/test_chamber_08.blend \
assets/test_chambers/test_chamber_09/test_chamber_09.blend assets/test_chambers/test_chamber_09/test_chamber_09.blend \
assets/test_chambers/test_chamber_10/test_chamber_10.blend
TEST_CHAMBER_HEADERS = $(TEST_CHAMBERS:%.blend=build/%.h) TEST_CHAMBER_HEADERS = $(TEST_CHAMBERS:%.blend=build/%.h)
TEST_CHAMBER_OBJECTS = $(TEST_CHAMBERS:%.blend=build/%_geo.o) TEST_CHAMBER_OBJECTS = $(TEST_CHAMBERS:%.blend=build/%_geo.o)

View file

@ -0,0 +1,6 @@
-alpha off
-resize 32x32 -repage +0+0
\( portal_pak_dir/materials/signage/signage_overlay_midair2.png -alpha off -resize 32x32 -repage +32+0 \)
-compose Copy
-layers merge

View file

@ -1198,6 +1198,20 @@ materials:
set: [G_SHADE] set: [G_SHADE]
clear: [G_LIGHTING] clear: [G_LIGHTING]
signage_overlay_midair1:
gDPSetTile:
filename: ../../portal_pak_modified/materials/signage/signage_overlay_midair1.png
siz: G_IM_SIZ_4b
fmt: G_IM_FMT_I
gDPSetCombineMode: G_CC_MODULATERGB
gDPSetCycleType: G_CYC_1CYCLE
gDPSetRenderMode: G_RM_RA_ZB_OPA_DECAL
gSPGeometryMode:
set: [G_SHADE]
clear: [G_LIGHTING]
signage_doorstate: signage_doorstate:
gDPSetTile: gDPSetTile:
filename: ../../portal_pak_modified/materials/signage/signage_doorstate.png filename: ../../portal_pak_modified/materials/signage/signage_doorstate.png

View file

@ -0,0 +1 @@
-c 1 -r 22050

View file

@ -0,0 +1 @@
-c 1 -r 22050

View file

@ -0,0 +1 @@
-c 1 -r 22050

View file

@ -0,0 +1 @@
-c 1 -r 22050

Binary file not shown.

View file

@ -0,0 +1,80 @@
cutscenes:
INTRO:
- q_sound AMBIENCE_BASE CH_AMBIENT SubtitleKeyNone 0.55
SIGNAGE:
- activate_signage 15
- q_sound 10_PART1_ENTRY_1 CH_GLADOS PORTAL_10_PART1_ENTRY_1
- q_sound 10_PART1_ENTRY_2 CH_GLADOS PORTAL_10_PART1_ENTRY_2
- q_sound 10_PART1_ENTRY_3 CH_GLADOS PORTAL_10_PART1_ENTRY_3
ROOM2:
- set_signal room2_launch_ball
- wait_for_signal room2_solved
- save_checkpoint
- label room2_piston_loop
- play_animation room2_piston piston_move_down
- wait_for_signal room2_on_piston
- play_animation room2_piston piston_move_down -1
- wait_for_signal room2_piston_needed
- goto room2_piston_loop
ROOM_3_CHECKPOINT:
- save_checkpoint
ENTERED_ROOM_3:
- set_signal room_3_ball_launcher
- wait_for_signal hallway_platforms_activate
- start_cutscene HAZARD_HALLWAY_CHECKPOINT
# TODO: start platform spawn
HAZARD_HALLWAY_CHECKPOINT:
- wait_for_signal in_hazard_hallway_checkpoint
- save_checkpoint
DROWN_PLAYER:
- kill_player water
ENTERED_FINAL_ROOM:
- set_signal final_room_ball_launcher
- start_cutscene SWITCH_ROOM_1_PISTON
- start_cutscene SWITCH_ROOM_2_PISTON
- start_cutscene CHECK_TRAPPED
# TODO: disable spawning (looping) of hazard hallway platforms
- save_checkpoint
- wait_for_signal exit_activate
- save_checkpoint
- q_sound 10_PART1_SUCCESS_1 CH_GLADOS PORTAL_10_PART1_SUCCESS_1
- label exit_piston_loop
- play_animation exit_piston exit_down
- wait_for_signal on_exit_piston
- play_animation exit_piston exit_down -1
- wait_for_signal not_on_exit_piston
- goto exit_piston_loop
SWITCH_ROOM_1_PISTON:
- label piston_loop
- play_animation switch_room_1 switch_room_1_down
- wait_for_signal on_switch_room_1_piston
- play_animation switch_room_1 switch_room_1_down -1
- wait_for_signal not_on_switch_room_1_piston
- goto piston_loop
SWITCH_ROOM_2_PISTON:
- label piston_loop
- play_animation switch_room_2 switch_room_2_down
- wait_for_signal on_switch_room_2_piston
- play_animation switch_room_2 switch_room_2_down -1
- wait_for_signal not_on_switch_room_2_piston
- goto piston_loop
CHECK_TRAPPED:
- label trapped_loop
- wait_for_signal trapped 30
- q_sound 07_PART1_TRAPPED_1 CH_GLADOS PORTAL_07_PART1_TRAPPED_1
- q_sound 07_PART1_TRAPPED_2 CH_GLADOS PORTAL_07_PART1_TRAPPED_2
- wait_for_channel CH_GLADOS
- play_animation escape_hatch escape_hatch_open
- wait_for_signal not_in_ball_trap 30
- play_animation escape_hatch escape_hatch_open -1
- goto trapped_loop
operators:
- not_on_exit_piston = not on_exit_piston
- not_on_switch_room_1_piston = not on_switch_room_1_piston
- not_on_switch_room_2_piston = not on_switch_room_2_piston
- ball_trap_open = ball_door_1 and ball_door_2
- ball_trap_closed = not ball_trap_open
- trapped = ball_trap_closed and in_ball_trap
- not_in_ball_trap = not in_ball_trap

View file

@ -41,3 +41,4 @@ The possible values for `SOUND_TYPE_NAME` are:
* `Piston`: Vertical moving platform sound * `Piston`: Vertical moving platform sound
* `Arm`: Horizontal moving wall sound * `Arm`: Horizontal moving wall sound
* `Stairs`: Ascending/descending staircase sound * `Stairs`: Ascending/descending staircase sound
* `Door`: Door open/close sound

View file

@ -14,13 +14,13 @@ Static level geometry. Used to generate level mesh and portal surface data.
| ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `no_portals` (optional) | If specified, the surface will not be considered portalable, regardless of its material name | | `no_portals` (optional) | If specified, the surface will not be considered portalable, regardless of its material name |
| `indicator_lights SIGNAL_NAME` (optional) | If specified and the indicator light or door state material is used, it will be switched to the corresponding "active" variant when the specified [signal](../signals.md) is set | | `indicator_lights SIGNAL_NAME` (optional) | If specified and the indicator light or door state material is used, it will be switched to the corresponding "active" variant when the specified [signal](../signals.md) is set |
| `uvtransx TRANS_X` (optional) | If specified and the material has `tileSizeS` and `tileSizeT` properties, translates UV coordinates by `TRANS_X` on the X axis | | `uvtransx TRANS_X` (optional) | If specified and the material has `tileSizeS` and `tileSizeT` properties, translates UV coordinates by `TRANS_X` on the X axis. Defaults to 0. |
| `uvtransy TRANS_Y` (optional) | If specified and the material has `tileSizeS` and `tileSizeT` properties, translates UV coordinates by `TRANS_Y` on the Y axis | | `uvtransy TRANS_Y` (optional) | If specified and the material has `tileSizeS` and `tileSizeT` properties, translates UV coordinates by `TRANS_Y` on the Y axis. Defaults to 0. |
| `uvtransz TRANS_Z` (optional) | If specified and the material has `tileSizeS` and `tileSizeT` properties, translates UV coordinates by `TRANS_Z` on the Z axis | | `uvtransz TRANS_Z` (optional) | If specified and the material has `tileSizeS` and `tileSizeT` properties, translates UV coordinates by `TRANS_Z` on the Z axis. Defaults to 0. |
| `uvrotx ROT_X` (optional) | If specified and the material has `tileSizeS` and `tileSizeT` properties, rotates UV coordinates by `ROT_X` degrees on the X axis | | `uvrotx ROT_X` (optional) | If specified and the material has `tileSizeS` and `tileSizeT` properties, rotates UV coordinates by `ROT_X` degrees on the X axis. Defaults to 0. |
| `uvroty ROT_Y` (optional) | If specified and the material has `tileSizeS` and `tileSizeT` properties, rotates UV coordinates by `ROT_Y` degrees on the Y axis | | `uvroty ROT_Y` (optional) | If specified and the material has `tileSizeS` and `tileSizeT` properties, rotates UV coordinates by `ROT_Y` degrees on the Y axis. Defaults to 0. |
| `uvrotz ROT_Z` (optional) | If specified and the material has `tileSizeS` and `tileSizeT` properties, rotates UV coordinates by `ROT_Z` degrees on the Z axis | | `uvrotz ROT_Z` (optional) | If specified and the material has `tileSizeS` and `tileSizeT` properties, rotates UV coordinates by `ROT_Z` degrees on the Z axis. Defaults to 0. |
| `uvscale SCALE` (optional) | If specified and the material has `tileSizeS` and `tileSizeT` properties, scales UV coordinates by `SCALE/tileSize` in each direction | | `uvscale SCALE` (optional) | If specified and the material has `tileSizeS` and `tileSizeT` properties, scales UV coordinates by `SCALE/tileSize` in each direction. Defaults to 1. |
## Notes ## Notes

View file

@ -458,7 +458,7 @@ void cubeProjectSingleFace(aiMesh* mesh, std::set<aiFace*>& faces, double sTile,
for (unsigned i = 0; i < face->mNumIndices; ++i) { for (unsigned i = 0; i < face->mNumIndices; ++i) {
aiVector3D vertex = mesh->mVertices[face->mIndices[i]]; aiVector3D vertex = mesh->mVertices[face->mIndices[i]];
vertex = rotation.Rotate(vertex) + translation; vertex = rotation.Rotate(vertex);
minLeft = std::min(minLeft, vertex * left); minLeft = std::min(minLeft, vertex * left);
minUp = std::min(minUp, vertex * up); minUp = std::min(minUp, vertex * up);

View file

@ -272,7 +272,8 @@ enum AnimationSoundType {
AnimationSoundTypeLightRail, AnimationSoundTypeLightRail,
AnimationSoundTypePiston, AnimationSoundTypePiston,
AnimationSoundTypeArm, AnimationSoundTypeArm,
AnimationSoundTypeStairs AnimationSoundTypeStairs,
AnimationSoundTypeDoor
}; };
struct AnimationInfo { struct AnimationInfo {

View file

@ -259,6 +259,8 @@ int getChamberDisplayNumberFromLevelIndex(int levelIndex, int roomIndex){
return 13; return 13;
case 9: case 9:
return 14; return 14;
case 10:
return 15;
default: default:
return 0; return 0;
} }
@ -291,6 +293,8 @@ int getLevelIndexFromChamberDisplayNumber(int chamberNumber) {
return 8; return 8;
case 14: case 14:
return 9; return 9;
case 15:
return 10;
default: default:
return 0; return 0;
} }

View file

@ -29,7 +29,7 @@ struct Chapter gChapters[] = {
{images_chapter4_rgba_16b, 6, 10}, {images_chapter4_rgba_16b, 6, 10},
{images_chapter5_rgba_16b, 8, 13}, {images_chapter5_rgba_16b, 8, 13},
{images_chapter6_rgba_16b, 9, 14}, {images_chapter6_rgba_16b, 9, 14},
{images_chapter7_rgba_16b, -1, 15}, {images_chapter7_rgba_16b, 10, 15},
{images_chapter8_rgba_16b, -1, 16}, {images_chapter8_rgba_16b, -1, 16},
{images_chapter9_rgba_16b, -1, 17}, {images_chapter9_rgba_16b, -1, 17},
{images_chapter10_rgba_16b, -1, 18}, {images_chapter10_rgba_16b, -1, 18},

View file

@ -21,6 +21,7 @@ struct AnimatedAudioInfo gAnimatedAudioInfo[] = {
{.startSoundId = SOUNDS_DOORMOVE1, .loopSoundId = SOUND_ID_NONE, .endSoundId = SOUND_ID_NONE, .pitch = 0.4f}, {.startSoundId = SOUNDS_DOORMOVE1, .loopSoundId = SOUND_ID_NONE, .endSoundId = SOUND_ID_NONE, .pitch = 0.4f},
{.startSoundId = SOUNDS_TANK_TURRET_START1, .loopSoundId = SOUNDS_TANK_TURRET_LOOP1, .endSoundId = SOUNDS_ELEVATOR_STOP1, .pitch = 0.5f}, {.startSoundId = SOUNDS_TANK_TURRET_START1, .loopSoundId = SOUNDS_TANK_TURRET_LOOP1, .endSoundId = SOUNDS_ELEVATOR_STOP1, .pitch = 0.5f},
{.startSoundId = SOUNDS_APC_START_LOOP3, .loopSoundId = SOUNDS_DOOR_METAL_MEDIUM_OPEN1, .endSoundId = SOUNDS_APC_SHUTDOWN, .pitch = 0.5f}, {.startSoundId = SOUNDS_APC_START_LOOP3, .loopSoundId = SOUNDS_DOOR_METAL_MEDIUM_OPEN1, .endSoundId = SOUNDS_APC_SHUTDOWN, .pitch = 0.5f},
{.startSoundId = SOUNDS_DOOR_METAL_THIN_CLOSE2, .loopSoundId = SOUND_ID_NONE, .endSoundId = SOUND_ID_NONE, .pitch = 0.5f},
}; };
void sceneAnimatorInit(struct SceneAnimator* sceneAnimator, struct AnimationInfo* animationInfo, int animatorCount) { void sceneAnimatorInit(struct SceneAnimator* sceneAnimator, struct AnimationInfo* animationInfo, int animatorCount) {