-
Notifications
You must be signed in to change notification settings - Fork 10
Create a 2D physics engine #211
Copy link
Copy link
Open
Labels
Big taskThis can take months to complete and may generate sub tasks.This can take months to complete and may generate sub tasks.Low priorityNo rush to have this done, because other things are more urgent.No rush to have this done, because other things are more urgent.
Metadata
Metadata
Assignees
Labels
Big taskThis can take months to complete and may generate sub tasks.This can take months to complete and may generate sub tasks.Low priorityNo rush to have this done, because other things are more urgent.No rush to have this done, because other things are more urgent.
2D games generating distance maps from pixels for collisions with the world would consume too much memory when the maps are big, and only colliding with square tiles would prevent designing diagonal obstacles. Many 2D games abuse 3D physics engines with constrained depth, which is terrible for both performance and numerical stability. So the SDK folder needs a 2D physics engine as an example of how it can be implemented using the math types that already exist in the framework.
Trying to store a complete copy of the entire world using physical shapes would be highly inefficient use of memory, or error-prone procedural creation and destruction of nearby obstacles. It would be easier to just provide a function pointer asking the game for collision shapes overlapping with a rectangular region in the world directly from the data structure already used to compress the level in memory.
Useful features:
A 2D physics editor with a script engine would allow quick prototyping of game concepts.