Commit graph

1526 commits

Author SHA1 Message Date
Matt Penny ae3c70750e Enable room 2 and 9 fizzlers in chamber 15
At 42/48 dynamic collision objects without portals or energy balls.
2024-06-07 00:02:03 -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 93d3d7c602 Simplify tiled fizzler height calculations and name variables more clearly 2024-06-02 17:53:54 -04:00
Matt Penny f35bf3d2a2 Enable fizzlers in first room of chamber 15
Very close to dynamic object limit
2024-05-30 00:25:19 -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 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 134be543ba Fix typo: frustrum -> frustum 2024-05-28 01:44:52 -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
Giacomo Garbin 6c791e0ae0
Further abstract time types and functions. (#68)
* replace OSTime with Time
* replace osGetTime with timeGetTime
* replace OS_CYCLES_TO_USEC with timeMicroseconds
* replace OS_CYCLES_TO_NSEC with timeNanoseconds

also
* lastReportStart of ProfileData was used to store both cycles and microseconds, now it stores only microseconds
* fix typo: ns instead of us
2024-05-28 00:59:29 -04:00
Giacomo Garbin 855f798a18
Decouple time interface from libultra (#66)
* Wrap OSTimer usage into sleep function.

* Remove unused gLastTime.

This makes time.h independent from libultra, so let's rename time.c to time_libultra.c.

TODO: should we move time.h and time_libultra.c to the src/system folder?

* Add time unit to macro name.

* Move time initialization call to main function.

* Move time.h and time_libultra.c to src/system folder.
2024-05-17 01:09:08 -04:00
Matt Penny 35f03488ef Fix static_export error message 2024-05-08 21:40:29 -04:00
Matt Penny 1f2258f86c Add plastic/plasticwall004a material 2024-05-08 21:20:36 -04:00
Matt Penny 3270d0a9ad Add material for Aperture decal 2024-05-08 21:13:58 -04:00
Matt Penny 78107866ce Allow static overriding portalability on a per-surface basis 2024-05-08 20:46:42 -04:00
Giacomo Garbin e12354556f
Move the definition of MatrixFromBasisL to debug_render.c which is the only file that uses it. (#64) 2024-05-08 20:30:27 -04:00
Matt Penny 65daf71fa9 Do not use absolute library paths in chamber 14 2024-05-05 18:34:16 -04:00
Matt Penny 64e2f0e5bf Doors block energy balls 2024-05-05 18:31:34 -04:00
Matt Penny fa26ac449e Support rotated doors and remove some unused door code 2024-05-05 18:26:30 -04:00
Matt Penny aecbda3071 Fix debug include for libultra controller 2024-05-04 12:07:36 -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
Giacomo Garbin 167269c5d1
Decouple controls interface from libultra. (#60)
* Decouple controls interface from libultra.

* Use enums instead of defines for constant values.

* Get both controller stick axes with a single function call.

* Move controller .h\.c files to src/system folder and rename controller.c to controller_libultra.c.

* Adhere to enum and struct naming convention of the codebase.

* Fix typo: the N64 controller only has one analog stick.
2024-05-02 17:49:38 -04:00
Matt Penny ad6b32d022 Fix indicator light UVs in chamber 14
Strip near button was slightly stretched
2024-04-30 22:42:49 -04:00
Matt Penny e1ba9f20ef Properly mirror door textures in Blender
Matches in-game appearance
2024-04-30 22:39:21 -04:00
Deconimus 247e66fb62
Grab rotation flags (#58)
* introduced "enum GrabRotationFlags" for type-based grab behavior and added grab_rotation.c/.h to offload grabRotation code from player.c

* grab_rotation snap cube normals fix

* grab_rotation: some cleanup

* grab_rotation.c: simplify grabRotationInitBase + some cleanup
2024-04-22 18:44:18 -04:00
Matt Penny 86915350b8 Add newlib to Docker image (#59) 2024-04-14 11:21:54 -04:00
Matt Penny a1c2cc5407 Update development progress doc to indicate chamber 14 completion 2024-04-13 17:07:25 -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 bf5b8e0d28
Merge pull request #47 from GiacomoGarbin/replace_libnustd_with_glibc
Use newlib instead of libnustd.
2024-04-12 19:01:12 -04:00
Matt Penny 7005450479 Fix indicator lights for active signals across save/load 2024-04-11 22:44:03 -04:00
Matt Penny 9401198969 Use water hazard wall material in relevant chambers 2024-04-11 20:55:38 -04:00
Matt Penny 685f818114 Add material for water hazard wall 2024-04-11 19:55:34 -04:00
Matt Penny 73e81b3308
Merge pull request #56 from Deconimus/issue41_fizzler_frame_collision
Add collision for fizzler frames
2024-04-11 19:54:38 -04:00
Matt Penny a551de9890 Minor fizzler frame collision cleanup 2024-04-11 19:44:42 -04:00
Matt Penny f2eaa9483d
Merge pull request #57 from Deconimus/issue52_grab_y_offset
Tweak y offset minimum limit to match original game (and due to issue #52)
2024-04-06 18:30:41 -04:00
Deconimus 8676845cd7 tweak y offset minimum limit to match original game (and due to issue #52) 2024-04-06 23:10:56 +02:00
Matt Penny 4d621b69cc
Merge pull request #54 from Deconimus/issue52_grab_y_offset
Constrain y-offset of grab to match PC version and circumvent buggy behavior
2024-04-05 21:10:22 -04:00
Matt Penny 8abbcb0407 Slightly tweak max grab height
Original game allows a height of ~1 wall panel
2024-04-05 21:09:06 -04:00
Matt Penny 7129deec4a
Merge branch 'master' into issue52_grab_y_offset 2024-04-05 20:31:11 -04:00
Matt Penny d5fea9a796
Merge pull request #50 from Deconimus/grab_rotation_snap_cubenormals
Snap grab rotations to cube normals
2024-04-05 20:21:10 -04:00
Matt Penny 62c49ddcdf Remove collisionSceneGetPortalRotation() 2024-04-05 20:18:25 -04:00
Deconimus 97b31b4579 grab_rotation: simplifying playerInitGrabRotationBase() 2024-04-05 13:00:23 +02:00
Deconimus 4ca1c484f1 player grab rotation cleanup 2024-04-04 12:12:58 +02:00
GiacomoGarbin 0e240507e7 Math functions are part of libultra and not libnustd. 2024-04-03 00:02:43 +02:00
GiacomoGarbin 8bed9b6238 Address GH-47 issues raised in the comments.
Specifically:
* append all include search paths to LCINCS
* add LDDIRS to group all library search paths
* avoid link libm as math funtions are actually inside libultra
* use the shorthand -lc instead of -l:libc.a to link libc
2024-04-02 23:02:25 +02:00
Deconimus 83e94af894 add collision for fizzler frames 2024-04-02 22:52:10 +02:00
Deconimus 3c8c0d3234 Merge branch 'master' into grab_rotation_snap_cubenormals 2024-04-02 13:27:27 +02:00
Deconimus 70019f281a Merge branch 'master' into issue52_grab_y_offset 2024-04-02 13:26:52 +02:00
Matt Penny 618f147da6 Halve ball catcher sound volume (#51) 2024-04-01 18:17:09 -04:00
Matt Penny e81fa6f28a Extend, do not repeat plastic/plasticwall003a material
Reflect what the material actually looks like in-game
2024-04-01 17:31:15 -04:00