Commit graph

1383 commits

Author SHA1 Message Date
Deconimus df9d4acaac Merge branch 'chamber14_trapped_check' of https://github.com/Deconimus/portal64-still-alive into chamber14_trapped_check
Reverted commits related to deactivating buttons.
2024-02-29 13:20:26 +01:00
Deconimus d5b7d16f01 added cube_near_button trigger to chamber14
cleaned up level logic of chamber14
fixed buttons sending cubeSignals when colliding with triggers
2024-02-29 13:18:02 +01:00
Deconimus e3206fdf6e disabled movement of button if deactivated to match behavior in Portal 2024-02-28 21:54:42 +01:00
Deconimus 20b253ec33 Added functionality to deactivate buttons via signals. A third argument can be provided for button objects in .blend files, the new syntax is: "@button <signalIndex> <cubeSignalIndex> <deactivateSignalIndex>"
Chamber14: deactivate button if escape_hatch signal is turned on (via either escape hatch cutscene or exploding door cutscene)
2024-02-28 21:35:17 +01:00
Deconimus 2ae683d6f4 chamber14: added cutscene for exploding door when taking the cube off the button 2024-02-28 19:04:32 +01:00
Deconimus a22f255bb0 Merge branch 'master' into chamber14_trapped_check 2024-02-27 22:02:09 +01:00
Deconimus 0d268b3885 test chamber 14: added a trigger to check for cube placement on top of piston, added CHECK_TRAPPED cutscene to simulate behavior of the original game when placing the cube on top of the piston 2024-02-27 22:00:39 +01: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 b060487dee
Merge pull request #12 from Deconimus/master
Fix Test Chamber 13 Escape Hatch cutscene triggers (issue #10)
2024-02-24 12:30:04 -05:00
Deconimus 591e5958aa (Issue #10) Simplified operators for more clarity and activate different signal in cutscene to prevent exit_door from being closed by button logic afterwards. 2024-02-23 17:55:36 +01:00
Matt Penny 614ebf25e4 Clarify in docs how signal operators are evaluated 2024-02-23 11:23:17 -05:00
Deconimus 35e29e26e6 Fix Test Chamber 13 Escape Hatch cutscene triggers (issue #10) 2024-02-23 15:06:05 +01: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 a8f9e9144c Make exit elevator cutscene condition more clear
Elevator destination is taken into account when initializing
cutscenePreventingMovement, so the else block (intended for end of level
elevators) will not be mistakenly entered for start of level elevators
when voice lines are playing.

However, not nesting the condition makes it look like there is a bug
here, and makes the intention of the code (one branch for each elevator
type) less clear. Moved the voice line condition to inside the if body to
avoid this. There is no functional change.

Eventually the elevator logic as a whole should be refactored as it has
grown to be unnecessarily complex.
2024-02-15 19:11:06 -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 d5bd90f7b2 Fix incorrect copy size in armature initialization 2024-02-11 19:19:17 -05: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 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 7521ab9a44 Fix clock digit position
The clock in the original is formatted as:
    min:sec:hund:tenthou

Previously, the game used:
    00:min::sec::hund

This change updates it to match the original.
2024-02-03 16:30:37 -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 5d817b67a8
Merge pull request #9 from Bobbar/sound_distance_tweak
Tweak for 3D sound attenuation.
2024-01-23 19:44:55 -05:00
Bobby Lovell 1ba19f1f44
Use the square root of the distance for volume attenuation. 2024-01-23 08:19:24 -05:00
Matt Penny ebd7d341f7 Clarify that the build should not be run as root (#3) 2024-01-21 22:30:30 -05:00
Matt Penny 52bbd22c61 Fix cube and ball launcher/catcher texture generation
Previously used Imagemagick 7 functionality, but the Ubuntu repos
(and thereby the machines of users following the readme) contain
version 6.
2024-01-21 22:21:33 -05:00
Matt Penny ace52fe72d
Merge pull request #6 from mwpenny/build-time-assets
Get all textures from VPK
2024-01-21 00:55:11 -05:00
Matt Penny bd3dc02c56 Get all textures from VPK
Some textures cannot be used in their current form, and so they are
transformed at build time by Imagemagick commands (e.g., add shapes,
crop and merge different portions, etc.).

For a very small number of textures, making them usable takes more than
a few simple commands. For example, Chell's eyes and ears are detached
from her face in the texture image, and there are not enough polygons in
her model or pixels in an N64 texture to make a good UV map.

For these few complex textures, James worked around the problem by
checking in pre-edited images. This commit removes those images and
instead performs the necessary transformations at build time. As a result,
some textures are now slightly different (ball launcher/catcher, cube,
Chell). Chell's UV map is redone to accomodate this - for the better.
2024-01-21 00:42:52 -05:00
Matt Penny 8881e688ae
Merge pull request #2 from mwpenny/portable-builds
Fixes to make builds more portable and customizable
2024-01-14 00:53:13 -05:00
Matt Penny 394398b864 Support building Skeletool on Windows
* Do not include execinfo / backtrace (should implement Windows
  equivalent in the future)
* Define YAML_CPP_STATIC_DEFINE, which should have been set anyway
2024-01-14 00:37: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
Matt Penny 7e699a4324 Dynamically get level count for all levels cheat 2024-01-14 00:09:40 -05:00
Matt Penny bf482724bc Create progress document 2024-01-13 14:30:50 -05:00
Matt Penny 7b39da9774 Document libultra API usage and migration strategy 2024-01-13 14:30:31 -05:00
Matt Penny 94be65409d Update readme with Still Alive info 2024-01-13 11:27:25 -05:00
Matt Penny 77a17ab022 Rename boot obejct file to have a more generic name
We use the 6102 boot code by default, but this can be changed (for
example, if flashing to a cartridge with a different CIC).

As with the microcode, the path cannot be easily passed to the
linker script and so the hard-coded name should not be specific to
particular boot code.
2024-01-08 23:08:18 -05:00
Matt Penny 8aa8e0f331 Allow changing base location of N64 toolchain
Environment variable N64_ROOT optionally sets the root directory of
the N64 toolchain.

To enable this to work with the linker script, the microcode object
files are now copied to the build directory before linking (since
there is no easy way to pass the path to the script dynamically).
An added benefit to this approach is that different microcode can
now be used easily if desired.
2024-01-08 23:08:17 -05:00
Matt Penny e176966be8 Ignore skeletool and vtf2png binaries with file extensions
On Windows, these binaries will have a .exe extension
2024-01-08 22:43:20 -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
lambertjamesd b0c02a33f7
Merge pull request #591 from mwpenny/save-fix
Do not save partial savefile on first boot (fixes #583)
2024-01-07 13:53:42 -07:00
Matt Penny 3d5b1b860f Do not save partial savefile on first boot (fixes #583)
With the implementation of save file deletion, I refactored
savefileNew() to re-use the common save file deletion code.

However, savefileDeleteGame() has the side effect of writing
the save back to SRAM. Since the rest of savefileNew() does
not write to SRAM, this means that on first boot it was
possible to get a partially-written save file if the game
was powered off before the first real save (some options had
zero/null values).

To fix this, I created a helper function to update a save file
in memory without writing it back to SRAM. This has the added
benefit of not unnecessarily re-ordering the slots in savefileNew().

I chose not to add a savefileSave() to the end of savefileNew()
since it is called from savefileLoad(), and saving while loading
doesn't seem intuitive. I also don't think it's a good idea to save
in the middle of initialization, in case a user is able to cut
power at the (im)perfect time. The operation should be atomic.
2024-01-07 14:03:31 -05:00