AdamsLair / duality

a 2D Game Development Framework
https://adamslair.github.io/duality
MIT License
1.41k stars 289 forks source link

Introduce a Way to Adjust the Duality Coordinate System and Internal Unit Conversion Rates for Advanced Users #541

Open ilexp opened 7 years ago

ilexp commented 7 years ago

Summary

Duality currently uses a world space unit scale that has been chosen to match pixels at 1:1 camera zoom. While nice for some games, this screws up a significant number of physics conversion rates and is a somewhat arbitrary choice for most other games. Investigate whether it makes sense to switch all of Duality over to a MKS (meter-kilogram-second) scale.

Analysis

This issue is to be investigated and discussed. Whether or not it should be implemented still needs to be figured out. Feedback appreciated, please join the discussion in the comments.

What that means

Things to take note of

What needs to be done

How to proceed

ilexp commented 7 years ago

Feedback so far raises some valid points against this change:

Leaving this open for now, but this change increasingly seems like a bad idea, or at least one to be very very careful with.

ilexp commented 7 years ago

Thought about this a bit more and I think a better way to go about this is a route similar to what @SirePi mentioned a chat discussion: Rather than switching over from one default to the next, keep the old default and gradually provide the means to allow advanced users to adjust the global coordinate system for their project. Approaching it this way, 99% of users will likely keep the default and enjoy all the benefits of having that shared default, while the 1% who really do build a game that could benefit heavily from a custom coordinate system can achieve this in their projects self-contained universe.

This would essentially involve two things:

Renaming the issue accordingly. Even though it will no longer be breaking for content when approached this way, it will likely require public API changes and thus still be a breaking change on a binary level, although a greatly smaller one.

ilexp commented 6 years ago

Moving this to the Future milestone, as it doesn't seem to be crucial or urgent.