Commit graph

127 commits

Author SHA1 Message Date
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 b29b5c2b8d Autogenerate static collision for fizzler sides (#70)
Eliminates the two stationary dynamic collision objects that were
previously used.

This change refactors entities.lua and collision_export.lua to support
autogenerated static collision for any object which may need it in the
future.
2024-06-06 23:39:56 -04:00
Matt Penny 3ed8552a9c Support vertically tiled fizzlers
Reduces dynamic object and dynamic collision object count.
2024-05-30 00:13:01 -04:00
Matt Penny 35f03488ef Fix static_export error message 2024-05-08 21:40:29 -04:00
Matt Penny 78107866ce Allow static overriding portalability on a per-surface basis 2024-05-08 20:46:42 -04:00
Matt Penny 685f818114 Add material for water hazard wall 2024-04-11 19:55:34 -04: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 5603a1a23f Add material for transparent portal surfaces 2024-03-27 23:37:22 -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
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 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
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 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 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
Deconimus 984dd65d2c fix fizzler optional signals generating unnecessary signals.
in test_chamber blender files, renamed @fizzler objects to not cause generation of unused signals.
removed "parse_trigger_signal" in trigger.lua, added "optional_signal_index_for_name", which is used for both trigger signals and fizzler signals.
added check in fizzler.c if signal is -1
2024-03-02 03:19:44 +01:00
Deconimus 3d37c2504c enabled fizzler objects to send signals on cube contact, the "@fizzler" objects in blender files now can have an argument for the signal name to send.
test_chamber_00: added level logic to trigger voice lines whenever the cube in the first room is fizzled.
added missing voice lines
box_dropper.c: fixed typo "DROPPER_.." instead of "DROOPER_.."

(Issue #13)
2024-02-28 13:32:44 +01:00
Matt Penny 79e77030c1 Fail explicitly when level armatures nest bones
Level animations use global coordinates, but sk_animation uses relative
offsets for child bones. Updating sk_animation to use global coordinates
works, but would break support for model animations (which use relative
offsets).

Although model animation export logic is currently implemented on the
C++ side and would not be immediately affected, eventually it'd be worth
it to move it over to Lua for simplicity and consistency.

So to avoid a future breaking change, and since complex armatures for
level animations are not likely to be needed, I'm leaving the current
behavior as-is until it is proven to be useful/necessary. Levels which
break this rule will now fail to export, to avoid surprises for anyone
who tries.
2024-02-11 18:41:14 -05:00
Matt Penny 725afb48c8 Do not use platform default encoding when generating subtitles
Windows uses cp1252, but we need UTF8. Specify it explicitly.
2024-01-08 22:42:05 -05:00
James Lambert ee42238411 Work on test chamber 08 2023-12-29 21:48:16 -07:00
Matt Penny 4f1a322c46 Confirm before deleting or overwriting save 2023-12-24 13:35:39 -05:00
Matt Penny 4e4a5e6ed0 Add menu icons and text for save/load/delete 2023-12-24 11:40:59 -05:00
James Lambert e32c299941 fix animated objects after small refactor 2023-12-02 15:53:04 -07:00
James Lambert 00cb4d0018 Prevent merging non flat meshes together 2023-12-02 13:58:08 -07:00
lambertjamesd 897abb9e4e
Merge pull request #508 from hackgrid/fix-make-6
allow dynamic generation of subtitles
2023-11-29 19:44:52 -07:00
hackgrid 9655bd29a7
fix text language sorting 2023-11-29 21:48:13 +01:00
James Lambert 68c1eb4f5f Prefer win32 translations over x360 2023-11-28 21:33:30 -07:00
hackgrid 1997d612c2
allow dynamic generation of subtitles 2023-11-28 21:27:52 +01:00
James Lambert 516b30b0b4 Only offset portal surface when trying decals are on the same surface 2023-11-26 21:20:11 -07:00
James Lambert 6da0f30719 Implement signage power on cutscene triggers 2023-11-25 15:34:48 -07:00
James Lambert 7ea13d6c2b Have subtitle generation script fail loudly when it fails 2023-11-23 20:31:26 -07:00
hackgrid 53619715a5
remove unused from import 2023-11-13 11:06:09 +01:00
James Lambert 58f851d3d4 Add bad google translate placeholder translations 2023-11-12 21:35:02 -07:00
hackgrid b1a03c4512
Merge branch 'master' into translate-hints 2023-11-13 00:18:19 +01:00
James Lambert c60b29c23d Encode extra subtitles as utf-8 2023-11-12 15:46:04 -07:00
James Lambert 0c678d15c0 Fix issue where menu changes when binding controls 2023-11-12 15:12:13 -07:00
hackgrid 47e7f5ba46
extract hints 2023-11-12 18:36:59 +01:00
James Lambert 5d29af1321 Get gamepad menu ready for translations 2023-11-11 15:35:13 -07:00
James Lambert 8c1e7d535c Remove duplicate settings
relayout audio options
add translations support for gameplay options
2023-11-11 14:42:53 -07:00
James Lambert dd05a3897e build out video options tab 2023-11-11 14:08:19 -07:00
James Lambert 335bde9482 Translate use defaults button 2023-11-11 10:12:27 -07:00
James Lambert 9d07965582 translate controls menu 2023-11-09 21:42:50 -07:00
James Lambert 7a37be91c9 Translate load and save game menu 2023-11-08 21:49:27 -07:00
James Lambert 60a0e39d1d Add translations for new game menu 2023-11-07 22:10:41 -07:00
James Lambert 1b3c1c9aa4 Translate most of the option tabs 2023-11-06 22:02:38 -07:00
hackgrid cc38baffbc
fix language typo 2023-11-04 10:03:12 +01:00
James Lambert bab60422bf Add some translations to the audio menu 2023-11-03 22:15:01 -06:00
James Lambert 94f9622861 Add main menu translations 2023-11-02 21:56:36 -06:00
James Lambert a1c70bbeb1 Fix bvh problems in test chamber 11 #394 2023-11-02 17:34:44 -06:00