Skip to content

silversquirl/phyz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Phyz

Phyz is a work-in-progress physics engine for 2D games, written in Zig. Goals are simplicity, speed and ease of use, in that order.

Progress

  • GJK algorithm
  • Continuous collision detection
    • Dynamic-Static
    • Dynamic-Dynamic
  • Fully customizable collision resolution
  • Broad phase
  • Queries
    • Nearest object
    • Raycast
    • Objects in shape
  • Handle intersecting colliders
  • Collision masking
  • Temporary collider disable flag
  • Collider deletion
  • More interesting actuators
    • Forcefields/magnetism
    • Constraints
  • General purpose resolver
    • Friction
    • Bounce

Non-goals

To keep the engine simple and fast, a number of things are purposefully not supported:

  • Rotation and angular velocity
  • Soft bodies
  • Non-convex colliders (can be approximated using multiple convex colliders)
  • Multiple colliders per object (can be approximated using constraints)

If you need support for these things, I recommend using a more complex physics engine such as Chipmunk2D or Box2D.

About

2D game physics for Zig

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages