Commit graph

37 commits

Author SHA1 Message Date
Matt Penny ab56ffb380 Add can_see argument to whitelist visible rooms
Useful for room shapes which cannot be handled by standard visibility
checks.

Normally this can be addressed with additional rooms and doorways, but
sometimes a room is required to be a complex shape (for example, to
accomodate animated static geometry).

These instances should be few and far between, so leaving this as an
opt-in feature that can be used during level authoring.
2024-08-20 19:52:50 -04:00
Matt Penny e85ac2fdf1 Fix side room door visibility issue in chamber 15, and enforce one doorway per room pair
More doorways can be supported but it complicates the culling logic. It's
easy to work around so leaving unsupported for simplicity until needed.
2024-08-19 17:19:59 -04:00
Matt Penny d6af2ebb46 Clarify @doorway example in docs 2024-08-04 10:49:21 -04:00
Matt Penny 9822ffeac9 Support precise (i.e., rotated) culling of static geometry (#73)
Standard culling is quite coarse, for performance reasons:
* Only uses axis-aligned bounding boxes
* One visible object in a BVH node will make all others in the same node visible

These properties allow the bounding boxes of rotated objects to clip through
the back of portals to be considered visible, causing improper rendering.

This commit introduces a new optional argument for `@static` level
objects: `precise_culling`. Static geometry marked for precise culling
will be culled based on its exact (i.e., rotated) bounding box, in the
same way dynamic/animated geometry is.

Precise culling is more expensive than standard culling so it is opt-in.
It is intended only for the few situations that can hit the edge cases
described above.
2024-07-26 18:47:58 -04:00
Matt Penny 7964ae17db Update collision docs and clarify player roll correction edge case in comment 2024-06-12 02:09:47 -04:00
Matt Penny 1e8275eec3
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>
2024-05-28 01:53:02 -04:00
Matt Penny 220dd585b4 Improve room visibility culling
When determining room visibility, the camera's frustum was previously
used for all recursive doorway checks, meaning rooms were considered
visible even if they were occluded. With the right level and camera
angle, all rooms could be considered visible at once.

Now, for each recursive check, a new frustum is created from the previous
doorway's bounds.

This helps significantly in larger levels, but there is still room for
improvement. Each new frustum is not clipped to the previous, and so it
is still possible for unseen rooms to be included.

It's important to consider performance here. Some checks may be too
expensive for realtime. At a minimum, a worthwhile improvement is to
precompute at compile time which rooms are potentially visible from a
given room. At runtime, other rooms can be quickly skipped.
2024-05-28 01:44:52 -04:00
Matt Penny 78107866ce Allow static overriding portalability on a per-surface basis 2024-05-08 20:46:42 -04:00
Matt Penny efb3f8da65 Detach door_02 frame from model
Door without frame is needed for chamber 15
2024-05-02 23:21:20 -04:00
Matt Penny f4cb8ddd31 Finish cutscene step documentation 2024-04-13 17:03:54 -04:00
Matt Penny 1a91f840c0 Document more cutscene steps
* set_signal
* clear_signal
* wait_for_signal
* teleport_player
* load_level
* label
* goto
* start_cutscene
* stop_cutscene
* wait_for_cutscene
2024-04-13 01:13:07 -04:00
Matt Penny 685f818114 Add material for water hazard wall 2024-04-11 19:55:34 -04:00
Matt Penny 5603a1a23f Add material for transparent portal surfaces 2024-03-27 23:37:22 -04:00
Matt Penny ef5b032fc6 Add sound to chamber 14 stair animations 2024-03-11 21:25:49 -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 26e39d0353 Clarify Blender version in file formats documentation 2024-03-06 21:10:30 -05:00
Matt Penny 6a1a7994b9 Avoid unnecessary signal definition
* Don't generate button cube signal if -1 or omitted
* Require button press, door, and box dropper signals to be specified
2024-03-02 22:03:13 -05:00
Matt Penny 754273d955 Update fizzler docs, and consistent spacing 2024-03-02 16:06:26 -05:00
Matt Penny 672d4b558d Document delay and open/close portal cutscene steps 2024-02-26 22:30:57 -05:00
Matt Penny 1aa3903b85 Document sound-related cutscene steps 2024-02-26 22:30:56 -05:00
Matt Penny 614ebf25e4 Clarify in docs how signal operators are evaluated 2024-02-23 11:23:17 -05:00
Matt Penny c90b8ba428 Add descriptions to level object summary page and clarify room/door behavior 2024-02-21 20:44:29 -05:00
Matt Penny 6d42e417bb Start documenting cutscenes
Move summary page to subdirectory, to prepare for individual pages for
each cutscene step (similar to level objects).
2024-02-21 18:33:02 -05:00
Matt Penny d99af47d09 Document ambient and point light sources 2024-02-19 20:07:31 -05:00
Matt Penny 5d31381a07 Document level objects relating to decor and triggers
* Box dropper
* Decor
* Fizzler
* Security camera
* Trigger
2024-02-17 15:47:22 -05:00
Matt Penny f2a9065eb8 Document pedestal level object 2024-02-15 19:25:20 -05:00
Matt Penny 940f42d731 Document elevator and signage level objects 2024-02-15 19:06:07 -05:00
Matt Penny 8d26f31ecb Document ball launcher and catcher level objects 2024-02-12 20:52:25 -05:00
Matt Penny 3bcf1371e9 Level object documentation around geometry and collision
* Anim
* Dynamic box
* Static
2024-02-11 18:28:04 -05:00
Matt Penny 3a99d714cf More clear level object argument capitalization
Lower case for literal values, upper case for variable values
2024-02-04 21:30:33 -05:00
Matt Penny 9bff60262c More level object documentation
* Collision
* Door
* Doorway
* Location
* Room
2024-02-03 16:06:23 -05:00
Matt Penny 834f2ef877 Fix link to signals doc in level file formats doc 2024-02-01 00:21:43 -05:00
Matt Penny 1885688090 Start documenting level objects
* Button
* Clock
* Switch
2024-02-01 00:08:35 -05:00
Matt Penny 124aa46267 Document level file formats 2024-02-01 00:08:34 -05:00
Matt Penny 4eb6165941 Rename levels.md to README.md so GitHub shows it while browsing 2024-01-14 00:13:09 -05:00
Matt Penny 7921fe10d8 Document level signals 2024-01-14 00:10:47 -05:00