Pitch and roll, and slope equivalents #84

Merged
Chearii merged 9 commits from Saturn-pitch-roll into Saturn-Next 2024-01-02 00:08:59 +01:00
Chearii commented 2024-01-01 20:57:05 +01:00 (Migrated from github.com)

Adds the 2.2 sprite pitch and roll variables and all relevant visual effects.

  • kartpitch
  • kartroll

Along with that, rotation on slopes has recieved an overhaul:

  • sloperoll now has a brother: slopepitch. All visuals related to these variables are now handled in the renderers, and not the game logic.
  • During saltyhops, sloperoll and slopepitch are not updated. This is mostly because the player's sprite tilting mid-hop looked strange to me.
  • sloperoll and slopepitch affect 3D models now (only in midair).
    • modelpitchroll
  • More objects aside from players now rotate on slopes.
    • orbi
    • jawz
    • banana
  • Related to the above, the Player Distortion option is now Sprite Distortion, and any relevant rotation options have also been renamed.
    • kart0005
    • kart0006
  • Toggleable consvar for a player's drift sparks and boost trails to rotate on slopes: cv_sparkroll
    • sparkrolling
    • trailroll1
    • trailroll2
  • Addition of the P_RollPitchMobj(mobj) function, which is exposed to Lua. I cannot verify if usage in Lua is netsafe.
  • pitch, roll, slopepitch, and sloperoll now all have interpolation.

Tested on 64bit on OpenGL (with models on and off), and on software. Also tested on a local netgame with a vanilla 1.6 client, with no issues discovered.

Adds the [2.2 sprite pitch and roll variables](https://git.do.srb2.org/STJr/SRB2/-/merge_requests/1514) and all relevant visual effects. * ![kartpitch](https://github.com/Indev450/SRB2Kart-Saturn/assets/110704015/859a9ffe-4fc5-46d4-a86b-49b4ea26e1ce) * ![kartroll](https://github.com/Indev450/SRB2Kart-Saturn/assets/110704015/e895123e-feed-41e5-99a6-b3b3fcb01ff3) Along with that, rotation on slopes has recieved an overhaul: * ``sloperoll`` now has a brother: ``slopepitch``. All visuals related to these variables are now handled in the *renderers*, and not the game logic. * During saltyhops, ``sloperoll`` and ``slopepitch`` are not updated. This is mostly because the player's sprite tilting mid-hop looked strange to me. * ``sloperoll`` and ``slopepitch`` affect 3D models now (only in midair). * ![modelpitchroll](https://github.com/Indev450/SRB2Kart-Saturn/assets/110704015/b3b29332-504c-4c0a-a36b-fc816a4c8fe6) * More objects aside from players now rotate on slopes. * ![orbi](https://github.com/Indev450/SRB2Kart-Saturn/assets/110704015/d4ca320a-8a14-43b5-b57e-2bbc9f7051e6) * ![jawz](https://github.com/Indev450/SRB2Kart-Saturn/assets/110704015/060a894a-bdb5-443f-8a96-791edc43ff1e) * ![banana](https://github.com/Indev450/SRB2Kart-Saturn/assets/110704015/322558b7-0332-40b0-8463-44522a2fba48) * Related to the above, the **Player Distortion** option is now **Sprite Distortion**, and any relevant rotation options have also been renamed. * ![kart0005](https://github.com/Indev450/SRB2Kart-Saturn/assets/110704015/95fe7155-82b9-4917-a251-ea2b93bf4d7d) * ![kart0006](https://github.com/Indev450/SRB2Kart-Saturn/assets/110704015/c055180f-c5d9-4509-bc31-f5583853f1b4) * Toggleable consvar for a player's drift sparks and boost trails to rotate on slopes: ``cv_sparkroll`` * ![sparkrolling](https://github.com/Indev450/SRB2Kart-Saturn/assets/110704015/6f9e6283-46e1-4ee9-a9b4-4a83a3c31c8f) * ![trailroll1](https://github.com/Indev450/SRB2Kart-Saturn/assets/110704015/822162c1-7c1a-4b01-91e8-ff31deb9931e) * ![trailroll2](https://github.com/Indev450/SRB2Kart-Saturn/assets/110704015/62bb84a9-9749-49b6-abd3-274cedb6fc9e) * Addition of the ``P_RollPitchMobj(mobj)`` function, which is exposed to Lua. *I cannot verify if usage in Lua is netsafe.* * ``pitch``, ``roll``, ``slopepitch``, and ``sloperoll`` now all have interpolation. Tested on 64bit on OpenGL (with models on and off), and on software. Also tested on a local netgame with a vanilla 1.6 client, with no issues discovered.
alufolie91 commented 2024-01-01 22:09:43 +01:00 (Migrated from github.com)

finally.... rotated bananas X)

actually wanted slope rotation for non player mobjs since quite a while c:
tested it quickly and everything looks very good.
this even fixes the issues looking back and splitscreen player rotation had before
really nice c:

however since this changes alot of things i really want to test it thoroughly so its gonna be merged into Saturn-Next instead for now just in case
788599892280606820

finally.... rotated bananas X) actually wanted slope rotation for non player mobjs since quite a while c: tested it quickly and everything looks very good. this even fixes the issues looking back and splitscreen player rotation had before really nice c: however since this changes alot of things i really want to test it thoroughly so its gonna be merged into Saturn-Next instead for now just in case ![788599892280606820](https://github.com/Indev450/SRB2Kart-Saturn/assets/136046486/bd486544-2430-4cc6-b5d6-90bc535e2c9c)
alufolie91 (Migrated from github.com) reviewed 2024-01-01 22:18:52 +01:00
@@ -3224,95 +3231,61 @@ static INT32 K_FindPlayerNum(player_t *plyr)
return i;
}
return 0; // technically defaulting to player 1 but fuck it
alufolie91 (Migrated from github.com) commented 2024-01-01 22:18:52 +01:00

one thing i did notice however, the camspin divisior change from 3 to 1 was just a workaround since sprites used to rotate based on the lookangle before and thus looked very weird when looking back
since this is not the case anymore this could probably be removed now unless its used for something else now

one thing i did notice however, the camspin divisior change from 3 to 1 was just a workaround since sprites used to rotate based on the lookangle before and thus looked very weird when looking back since this is not the case anymore this could probably be removed now unless its used for something else now
Chearii (Migrated from github.com) reviewed 2024-01-01 22:58:16 +01:00
@@ -3224,95 +3231,61 @@ static INT32 K_FindPlayerNum(player_t *plyr)
return i;
}
return 0; // technically defaulting to player 1 but fuck it
Chearii (Migrated from github.com) commented 2024-01-01 22:58:16 +01:00

Ah, I thought this was for the camera tilting, hence the name on the boolean. I can probably just push a commit to change that.

Ah, I thought this was for the camera tilting, hence the name on the boolean. I can probably just push a commit to change that.
alufolie91 (Migrated from github.com) reviewed 2024-01-02 00:08:50 +01:00
@@ -3224,95 +3231,61 @@ static INT32 K_FindPlayerNum(player_t *plyr)
return i;
}
return 0; // technically defaulting to player 1 but fuck it
alufolie91 (Migrated from github.com) commented 2024-01-02 00:08:50 +01:00

was just a little hack X)
anyways, played a little with it today and everything seems to work very well
ty much for this c:

was just a little hack X) anyways, played a little with it today and everything seems to work very well ty much for this c:
Chearii (Migrated from github.com) reviewed 2024-01-02 00:23:48 +01:00
@@ -3224,95 +3231,61 @@ static INT32 K_FindPlayerNum(player_t *plyr)
return i;
}
return 0; // technically defaulting to player 1 but fuck it
Chearii (Migrated from github.com) commented 2024-01-02 00:23:48 +01:00

np!

np!
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: saturn/SRB2Kart-Saturn#84