Commit graph

1519 commits

Author SHA1 Message Date
Matt Penny 08db90d929 Chamber 14 lighting 2024-03-29 00:55:11 -04:00
Matt Penny 0ddb70f8e6 Add plastic/plasticwall003a material to materials.blend 2024-03-29 00:55:03 -04:00
Deconimus 56672ff562 grabRotation: snap all grabbed object rotation to cube normals
+ some related code refactoring
2024-03-29 00:35:51 +01:00
GiacomoGarbin f15aa17f42 Valve intro video: try to load a MOV file if the BIK file doesn't exist.
The macOS Portal version uses a .mov file, so if the .bik file doesn't exist, let's try that.
2024-03-28 18:43:00 +01:00
Matt Penny 8b69564561
Merge pull request #48 from mwpenny/chamber-14
Chamber 14 stair pit
2024-03-28 01:10:12 -04:00
Matt Penny 32f430fcab Fix chamber 14 room boundaries 2024-03-28 01:08:31 -04:00
Matt Penny 65120989ed Debounce chamber 14 stair raise signal
When loading a save file, the cube_retrieved signal is not immediately
set, which causes the stairs to raise.

Require the signal to be set for a few frames to avoid this.
2024-03-28 01:08:29 -04:00
Matt Penny 7dcd6432ec Show pit beneath chamber 14 stairs
A transparent portal surface allows portalability when the stairs are
lowered while not blocking visibility when they are raised.

During the descent, animated collisionless floor geometry is used as
cover so the real stairs can be moved out of the way.
2024-03-28 01:08:25 -04:00
Matt Penny 5603a1a23f Add material for transparent portal surfaces 2024-03-27 23:37:22 -04:00
Giacomo Garbin 22f017722d Remove libnustd from setup files. 2024-03-28 02:35:32 +01:00
Giacomo Garbin c605fd18d3 Updates the usage status of proprietary libraries. 2024-03-27 23:53:02 +01:00
Giacomo Garbin 70193f33c4 Also link libm for the C Standard Library math functions.
Remove isnan as it conflicts with the one defined in <math.h>.

TODO: Replace math functions defined in Mathf.c with those from the standard library.
2024-03-27 23:45:12 +01:00
Giacomo Garbin 62be2a497a Use glibc instead of libnustd.
TODO: Remove libnustd from setups as well.
2024-03-27 03:16:02 +01:00
Matt Penny 43f07a1766
Merge pull request #46 from GiacomoGarbin/replace_floor_function
Use floorf defined in mathf.c instead of the C standard library floor function.
2024-03-26 12:52:51 -04:00
Matt Penny 1fb2390a57
Merge pull request #43 from Deconimus/issue38_fizzler_width
Apply blender object scale to fizzlers
2024-03-26 12:47:36 -04:00
Giacomo Garbin 4449ccf723 Use floorf defined in mathf.c instead of the C standard library floor function. 2024-03-26 01:07:41 +01:00
Deconimus 72c0220a3e tools/level_scripts/entities.lua: take fizzlers' mesh bounding box width into account, instead of only scale factor 2024-03-25 22:39:09 +01:00
Matt Penny 72b4607ac4
Merge pull request #44 from GiacomoGarbin/master
Fix typo in header file name.
2024-03-24 21:07:42 -04:00
Matt Penny 7a45772600
Merge pull request #45 from mwpenny/confirm-leave
Confirm with player before leaving current game
2024-03-24 21:02:11 -04:00
Matt Penny bba7d9add1 Confirm when loading game while in a level 2024-03-24 20:50:03 -04:00
Matt Penny f3ab06c9dc Confirm when starting new game while in a level 2024-03-24 20:50:01 -04:00
Matt Penny a3cde0c690 Confirm before quitting 2024-03-24 20:49:47 -04:00
Giacomo Garbin 243682f1bf Fix typo in header file name. 2024-03-25 00:40:33 +01:00
Matt Penny 03034a3868 Re-enable freecam
Previous camera changes caused the freecam transform to not be applied
2024-03-23 22:45:22 -04:00
Matt Penny 2f5a377b7f Add decals, observation room decor, and indicator lights to chamber 14 2024-03-23 22:43:24 -04:00
Matt Penny fb4fe2a251 Add autosave and water death triggers to chamber 14 2024-03-23 19:02:54 -04:00
Matt Penny 3c3f79a839 Prevent platform in chamber 11 from closing portal 2024-03-23 18:45:29 -04:00
Matt Penny 686fb284b6 Chamber 9 level object reorganization
No changes to the level itself
2024-03-22 20:27:41 -04:00
Matt Penny fb418a9816 Add autosaves to chambers 11 and 12 2024-03-22 20:23:03 -04:00
Matt Penny 8b4a128756 For all chambers, start ambient sound at elevator 2024-03-22 20:10:07 -04:00
Matt Penny 9d1ea7ecfe
Merge pull request #20 from hackgrid/ambience-sound-1
add ambience sound to test_chamber_08/09
2024-03-22 18:59:02 -04:00
Matt Penny b4e65fc4d2 Start chamber 14 ambience in elevator 2024-03-22 18:53:39 -04:00
Matt Penny 4109701d66 Merge branch 'master' into ambience-sound-1 2024-03-22 18:37:48 -04:00
Deconimus 5e6425075d make fizzler width scale with blender scale & fix rendering bug which used to cause fizzlers from disappearing at some viewing angles 2024-03-21 22:54:42 +01:00
Matt Penny c15576dfa7
Merge pull request #42 from mwpenny/chamber-14
Chamber 14 stairs first iteration
2024-03-20 23:21:56 -04:00
Matt Penny eaf1a3012d Finalize chamber 14 stairs first iteration
Next iteration will focus on making the pit beneath the stairs visible
while ideally allowing portals to be placed during the descend
animation.

Ideas include a transparent portal surface with either separately
animated step collision (to hide it beneath the level) or an animated
piece of floor geometry to act as a cover.
2024-03-20 22:16:09 -04:00
Matt Penny 236e7993c4 More performant collision detection between portals and moving dynamic collision
Short circuit if bounding boxes do not intersect
2024-03-20 22:12:00 -04:00
Matt Penny 1318e8ec4b Don't cull animated objects in rooms where many exist
Calculating whether or not to cull many objects can be more expensive
than rendering them
2024-03-20 21:14:11 -04:00
Matt Penny 8e6a854b8a Portal placement on descended chamber 14 stairs
This is currently implemented by having the stairs simply descend
beneath the floor. The floor cannot disappear/reappear dynamically until
issue #40 is fixed and portals work properly on dynamic collision. For now,
the behind-the-scenes pit is not shown as a result.

To do:
* Investigate engine optimization opportunities
* Reduce static element count if proven to be necessary
* Look into other ways to handle the floor
2024-03-16 19:22:41 -04:00
Matt Penny 2b09deb1fe Fix off by one error which omitted final frame of animations 2024-03-16 00:47:29 -04:00
Matt Penny 35e9d433a4 Read level animation sound from first specifying bone, and play from armature center
Removes multi-bone animation dependency on bone order for audio, and
allows the sound to play as long as one bone is still moving. The center
is also a more natural sound position.

This is needed for the chamber 14 stairs.
2024-03-13 01:03:41 -04:00
Matt Penny f16f88a73a Close portals touched by moving dynamic collision
This allows collision brushing up against portals to close them, such as
the stairs in chamber 14, making it more difficult to get underneath.

Dynamic collision part of the same animation as the portal is excluded.
2024-03-12 22:18:41 -04:00
Matt Penny 54f0666045
Merge pull request #35 from Deconimus/pr31split_keep_objects_in_front
Keep grabbed objects in front of player & savegame grab through portals fix
2024-03-12 12:09:15 -04:00
Deconimus 7d48221146 rotate grabbed objects towards players' forwards direction (XZ-plane) instead of looking direction 2024-03-12 14:19:50 +01:00
Deconimus b6afce6e0a Merge branch 'master' into pr31split_keep_objects_in_front 2024-03-12 12:25:53 +01:00
Matt Penny 87af5a059c
Merge pull request #36 from Deconimus/encapsulate_decorIdFromCollisionObject
Encapsulate looking up a decorId from CollisionObjects
2024-03-11 23:29:16 -04:00
Matt Penny ef5b032fc6 Add sound to chamber 14 stair animations 2024-03-11 21:25:49 -04:00
Matt Penny 020b181499 Animate chamber 14 stairs
Added ascend/descend animation, triggers, and dynamic collision.

Next steps:
* Simplify collision (currently quite expensive)
* Destroy portals during ascend animation
2024-03-11 19:38:53 -04:00
Deconimus 64bcfe30aa encapsulate the hacky way of looking up a decor type id from CollisionObjects into the function decorIdForCollisionObject(struct CollisionObject*) 2024-03-09 14:42:14 +01:00
Deconimus b6fdc1116e keep grabbed objects in front of player.
fix grabbed objects being let go of when loading a savegame in which the player was grabbing through a portal.
2024-03-09 13:46:38 +01:00