Replies: 2 comments 2 replies
-
Are you 100% sure? Imagine I want to show a basin of water in a cave. but, lets say, when im making the camera object region (im guessing like climbing has its region and secret area has a region you can move around) i accidentally make it (instead of 16:9 ratio) like 2480:1313 or something really awkward - how will the camera adjust for that? I'm not exactly clear on how exactly this camera object zone will translate. |
Beta Was this translation helpful? Give feedback.
-
Working on cutscenes for SuperTux's Story Mode, I more and more discover that our camera is a mess. An absolute mess! If we wish to not aim for an entire re-work, which I know some people are hesitant about due to retro-compatibility, instead expanding on the pre-existing camera modes might help? Currently using the camera for anything that is not a basic, static movement (left/right/up/down) through I don't see a point in adding a work around here. Another camera mode cannot be the solution here. If anything I worry it will just cause us ignoring what has been broken in the first place rather than tackling the actual issues. So my approach would be to actually think about how we can improve our current camera system and expand on it for more usage and functionality. I did mention a few things in #2405 so I'll be mentioning them here again, plus a few other things:
There may be evn more things that could be added but these are all the suggestions/ideas I have on this topic as of now! |
Beta Was this translation helpful? Give feedback.
-
This is an effort initiated by #2095.
(First header is the motivation for the change, see the second header for the actual proposal)
Camera.set_pos()
considered harmfulCameras scale poorly across screen resolutions and require manual intervention from level designers to exploit features such as zooming. Most importantly, certain features, such as transitioning the camera to hot points (
Camera.set_pos()
), require to fetch the appropriate camera coordinates either by complex thoughtwork or, most often, by trial-and-error and tolerance to approximation.This has several disadvantages:
Camera.set_pos(2200, 143.5)
does not say that a given level designer wanted to show the animation of a door that opens.This list is probably non-exhaustive.
In sum, these methods can be difficult, tedious, imprecise and unintuitive, and tend to give rough, messy and unclean results.
I would like to propose a somewhat unusual idea that would help level designers, even the less skilled ones, manage the camera in a more resilient way.
Camera management: A proposal
Often, when using the
Camera.set_pos()
function (or similar), the point is to show one or more "points of interest". The idea with this new feature is that instead of having level designers (or coders) provide positions to the functions, they will provide the points of interest, and the camera will deal with the data it receives.The what
Please note that this is NOT a replacement, it is an addition; since some users will still prefer to keep full control for themselves (and for retrocompatibility as well), it would be unwise to impose this as the only way of doing things; although generally, it should be meant to become the new standart way of doing things.
The
"interest"
is meant to be a new camera mode alongsidenormal
,autoscroll
, etc. This is how users would activate the new feature: by setting the camera's mode to "interest". (Or any other string considered suitable)The how
The camera would receive an array of one or more "points of interest". Such points can be described by two variables:
Since manually inputting numbers directly in the code would be 1) tedious (even more so than the current system) 2) un-verbose 3) difficult to calculate without tools and 3) un-reusable (one would have to rewrite the same coordinates each time a certain point of interest is used in the code), I would recommend using game objects to create and draw zones to cover the various points of interest.
The screen proportions would be optional and would allow the coder to specify an offset for certain points of interest. The offset would be calculated based on the size of the screen to ensure the desired effect works on all screen resolutions. This variable would not be bound to the points' game objects themselves, but rather to a specific function call, to allow achieving different effects using the same point of interest.
The camera would automatically position itself smoothly based on the point(s) it receives. It can take care of finding what is the optimal position, and possibly zooming, so as to satisfy all constraints; it would then manage the movement, with any movement method wanted (immediate, linear, easing, weighted, etc.) and fit all the points of interest on the screen, at the wanted position.
The why
This methods presents a solution to all issues listed above (proudly):
1/3
's and2/3
's!)campfire
, it will be easy to understand the intention for this call without needing to run the level or to investigate a sector's layout.In general, this proposal puts much less responsibilities on the level designers and is more resilient against mistakes, and offers a much easier path to achieving desired effects without testing users' patience.
I would like to ask for further issues that this method could be tested against, as to keep them in mind when developing the solution further.
Beta Was this translation helpful? Give feedback.
All reactions