Adding a way for "dynamic" camera

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
Rafiz
Inserter
Inserter
Posts: 31
Joined: Sun Jan 17, 2021 9:28 am
Contact:

Adding a way for "dynamic" camera

Post by Rafiz »

I wanted to write mod that would allow to shift camera forward into direction that player is looking... However I've come to think that it might be impossible with current modding API. While maybe I could come up with some hacky idea of using cutscene, while forwarding movement keys somewhere, so that player character is moving, I don't think there's way to know where's player cursor in relation to game-window, or if it's near some border.

As to why I think that would be useful - 1) for QoL.. instead of zooming out (and looking at ant-sized entities), or going to map view (do you have area of interest in your radar range?), player could just look a little bit forward. I would often find it useful, when I'm looking at biters from far and I want to see their stats. If they're ant-sized it's hard to hover mouse over them and read stats, but if I'm close... They are.. Biting me... And player "build-in" radar has smaller range than just eyes. 2) for modding weapons with big range 3) there are some RPG-feel mods that could benefit from that. 4) I think I would spend less time on max zoom-out, which helps with immersion a little bit.

Player should just be able to "move" camera up to point where you can see tile that is 100 tiles away from player. Right now you can see in-game around 110 tiles to left/right and ~70 tiles to top/bottom which is un-even and (I guess) also dependent on resolution ratio... So over-all pretty arbitrary.

It could be either vanilla in-game toggle-option ("Settings->Graphics->dynamic camera [x] (default:false)", or something), or adding new "https://lua-api.factorio.com/latest/def ... ontrollers", or just adding some other way of moving player-camera.

PFQNiet
Filter Inserter
Filter Inserter
Posts: 289
Joined: Sat Sep 05, 2020 7:48 pm
Contact:

Re: Adding a way for "dynamic" camera

Post by PFQNiet »

This definitely feels like it would be better as a suggestion on the base game. As it involves the cursor position (which isn't part of the game state) and the rendered camera (which just renders the game state) it would be very difficult to get it in a mod since mods are all about working with the game state!

mmmPI
Smart Inserter
Smart Inserter
Posts: 2783
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Adding a way for "dynamic" camera

Post by mmmPI »

It made me think of binoculars, player would place them in power armor. Then when holding a key down, the mouse cursor reaching the border of the window would "scroll" the map like on RTS style game maybe the max distance is set with the number of binocular you wear like exoskeletons or roboport, and releasing the key would reset the view.

I think it would enable aiming weapons like sniper rifle, and i found it funny to think that you could use it to check if your blueprint is pasted correctly in that area where you don't have radar coverage yet, or when some alerts appear there due to biters.

Sounds like a temporary map view, which requires to detect when the cursor is near an edge to scroll. Unless the player is allowed to move the character with WASD key while looking elsewhere with the mouse cursor ?

Post Reply

Return to “Modding interface requests”