Hi,
Imagine you're writing a mechanic in which player can throw an object. Main requirement for this mechanic is a trajectory line indicator which will show the travel path and the landing point.
Two valid approaches come to my mind - I'll call them physics based approach and fixed path approach.
The physics based approach basically means calculating the travel path using parameters such as force, gravity, initial direction etc. in order to find the travel path of the object.
The fixed path approach is where we draw the path first (can be bezier curve or anything that can generate a curve that can be sampled) and then we move the object along the generated path.
What approach would you use and why? Do you see any other valid approach to this problem? Which approach do you think is used the most in video games? Did you implement such mechanic in any of your shipped titles?
I assume that the physics based approach would be desirable in a simulation type games such as World of Warships? Any game that is heavily physics based would probably do it that way? Although it seems quite hard to implement and even harder when we would like to include the bounce trajectories.
Fixed path approach seems more flexible? Generated path can be more than a curve (can be anything really) also seems easy to use for designers. Shouldn't it be more precise than physics based approach if we assume that the projectiles are traveling in high speed and high range? Bounce trajectory seems to be easier to implement this way as well, since we can detect obstacles along the generated path and generate new path from the bounce point? Do you think that games that seems to be relying on physics would go for such shortcut?
Please let me know what you think and point out any flaws in my thinking.
Thank you, and have a great day!