Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Rotate 3D pickups #253

Closed
aredfan opened this issue Nov 26, 2021 · 13 comments · Fixed by #914
Closed

Feature: Rotate 3D pickups #253

aredfan opened this issue Nov 26, 2021 · 13 comments · Fixed by #914
Assignees
Labels
Data Requires injecting content / files that are not a part of the original game Feature New functionality TR1
Milestone

Comments

@aredfan
Copy link
Collaborator

aredfan commented Nov 26, 2021

The four 3D pickups surrounding the obelisk are facing the same direction, would it be possible to rotate these so that all four pickups are facing outwards from the obelisk towards the respective drawbridges?

1

@oziphantom
Copy link
Collaborator

The problem is they are billboards in the original so there is no correct angle mapped for them, as they always rotate to the camera. This means we would need to detect and set their rotations, possible, however you get down to "if item number is X and level number y" type shenanigans which then break if you modify the game flow, do a randomizer etc.

The level files have no data for this, so one can't "patch the game files". Maybe @rr- has some ideas on said data can be added?

@rr- rr- added Feature New functionality Data Requires injecting content / files that are not a part of the original game labels Nov 30, 2021
@ANoDE85
Copy link

ANoDE85 commented Dec 10, 2021

If you find a solution (maybe configurable in a config file, so that the above mentioned features just use their default or have other values), there's another instance that makes the game a bit harder than it should - especially on high resolutions:
The underwater cog in The Lost Valley faces with it's side to the player, rendering it very hard to see, compared to the original sprite, which always faces the camera nicely:

Tomb 1 Main Screenshot 2021 12 10 - 13 48 45 09

Tomb 1 Main Screenshot 2021 12 10 - 13 49 39 99

Can you detect which side is front or back of the 3D objects? Because if so, maybe something like this would work:

  • Detect which walls are closest to the pickup.
  • If there is a winner, have the pickup's back directly face that wall (i.e. the front points into the same direction as the wall)
  • If there are walls with the same distance to the pickup, use the one, where the opposite wall is away the farthest.
  • If all are the same, just keep the "default" rotation (there's nothing one can do)

@rr- rr- added the Help wanted Extra attention is needed label Dec 10, 2021
@ANoDE85
Copy link

ANoDE85 commented Dec 27, 2021

I was thinking about this a bit further, and saw how the "pyramid secret fix" was implemented.
Would something similar also work for this issue - I was thinking about an entry in the gameflow json:

        // level 3
        {
            "title": "Lost Valley",
            "file": "data\\level3a.phd",
            "type": "normal",
            "music": 57,
            "sequence": [
                {"type": "start_game"},
                {"type": "fix_item_rotation", "room": 48, "item": "puzzle1", "rotation_x": -90},
                {"type": "loop_game"},
                {"type": "stop_game"},
                {"type": "level_stats", "level_id": 3},
                {"type": "exit_to_level", "level_id": 4},
            ],
            "strings": {
                "puzzle1": "Machine Cog"
            },
            "demo": true,
        },```

@rr-
Copy link
Collaborator

rr- commented Jan 4, 2022

That's a good suggestion and I think we can go with this approach. Can someone post a complete list of pickups that need to be rotated?

@aredfan
Copy link
Collaborator Author

aredfan commented Jan 14, 2022

3D pickup items in general seem to face south so this is just a trial list for the obelisk keys. I will do a replay of TR1/UB soon and can do a complete list if someone isn't doing it already.

  • Eye of Horus - rotate to west
  • Seal of Anubis - rotate to east

The Ankh is already facing the correct direction which is south. The Scarab should face north but it looks the same on both sides, is your approach to leave it alone or rotate?

Edit: Type a list like this?

  • Eye of Horus (r: 90)
  • Seal of Anubis (r: -90)

@rr-
Copy link
Collaborator

rr- commented Jan 14, 2022 via email

@Rapora9
Copy link
Contributor

Rapora9 commented Jan 14, 2022

I would say let's leave such items alone, since it's impossible to tell which way is the frontside or the backside for many other items. Even if we were to invest effort into this, it would have zero impact on the gameplay, so I don't see the point. Even custom levels, if they replace the objects with things that clearly have a distinguishable frontside and backside, they can also fix the item rotation by themselves.

Rotating 3D pickup items in (Tomb) Editor doesn't do anything for the items in the game itself. They always stay in the same orientation.

I was looking forward to this fix since right now I've had to design some parts of my level to take into account that you cannot rotate the pickups, and it's also a nice quality update. For example, keys are hard to see from a certain angle, and it would also be nice to have medpacks etc. face the direction the player is coming from without having to design the rooms around that.

@ANoDE85
Copy link

ANoDE85 commented Jan 14, 2022

I've found another pickup (minor priority) that should be rotated:
Level: "St Francis Folly" (Level4.phd)
Room: Damocles Key Room (Room 38)
Item: Damocles Key (Item 71)
(Room and Item numbers taken from trview)
Tomb 1 Main Screenshot 2022 01 14 - 19 03 45 96

@aredfan
Copy link
Collaborator Author

aredfan commented Jan 15, 2022

@aredfan
Copy link
Collaborator Author

aredfan commented Jan 19, 2022

@rr- just a heads up that I've made a full list of pickups to rotate for TR1 only, these are mainly plot items. I've also included screenshots for each pickup which can be viewed in the previous (edited) comment. The list also include all items mentioned in this thread.

TR1 pickups.txt

Update: Added large medi pack from Palace Midas to list.

I'll try and get Unfinished Business list done soon.

@aredfan
Copy link
Collaborator Author

aredfan commented Jan 23, 2022

Unfinished Business pickups list is done!

TRUB pickups.txt <= Updated to correct item number

Unfinished Business gallery

@rr- if the list looks good, and if you need someone to test the game after implementing the changes, I'm happy to do that 👍

@rr- rr- added Easy first ticket This should be easy to implement for new contributors and removed Help wanted Extra attention is needed labels Feb 8, 2022
@Rapora9
Copy link
Contributor

Rapora9 commented Feb 9, 2022

What about the Scion in Tomb of Qualopec? There are 3 "cinematic cameras" related to it. If you look at the Scion through the first door after avoiding the boulder, you can barely see the item with the current rotation.
cin1

When you come from the tunnel after the 3 doors and the dart traps, the Scion is shown well.
cin2

And when entering the chamber, either rotation could work.
cin3

So which rotation should be prioritised? On the other hand I think the current one is good because it feels to be more important for it to be visible when you're about to enter the room (2nd image). But on the other hand the camera would soon switch to the third angle (3rd pic) and the item could be seen well or better with 90 rotation, and also the first impression (1st image) – should player happen to take a look at the room after avoiding the boulder – would be a proper one instead of what it is now.

Edit: Maybe 45 / 135 / whatever rotation could work if that's supported, or is it possible to only rotate by 90 / 180 / etc?

@aredfan
Copy link
Collaborator Author

aredfan commented Feb 9, 2022

The advantage of having the sprite before is that the scion would appear presentable from both directions. I can see the case for having the scion facing towards the first camera position, as to appear presentable for luring thieves into the boulder trap.

Personally I'm in favour of keeping to the status quo because the second camera flips and pulls away from Lara before revealing the circular form of the scion, which is cool.

@aredfan aredfan changed the title 3D pickups should face outwards from obelisk Feature: Rotate 3D pickups Feb 11, 2022
@walkawayy walkawayy self-assigned this Aug 10, 2023
@walkawayy walkawayy added this to the 2.16 milestone Aug 10, 2023
@walkawayy walkawayy linked a pull request Aug 12, 2023 that will close this issue
2 tasks
@walkawayy walkawayy removed the Easy first ticket This should be easy to implement for new contributors label Aug 12, 2023
walkawayy added a commit that referenced this issue Aug 12, 2023
rr- pushed a commit that referenced this issue Aug 15, 2023
@rr- rr- added the TR1 label Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Data Requires injecting content / files that are not a part of the original game Feature New functionality TR1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants