Repository navigation
klyph 1.4.0: Let's get physical. Add it to a game with
plugins { id("com.eventslooped.klyph") version "1.4.0" }
klyph { entryPoint = "mygame.main" }
kotlin {
sourceSets.nativeMain.dependencies {
implementation("com.eventslooped.klyph:klyph:1.4.0")
implementation("com.eventslooped.klyph:klyph-physics:1.4.0") // optional
}
}or start from klyph-template. The guide and API reference are at https://inemtsev.github.io/klyph/, and the Physics guide covers the new module.
klyph-physics is the work of @pererikbergman, who wrote the engine, the eighteen-scene playground and the explainers in #55. Thank you, Per-Erik!
Rigid and soft bodies in one world: crates squash blobs, blobs knock crates over, and a net of links cradles a crate.
Hinges, sliders, welds and motors (left), and cloth that flaps and tears (right).
The playground's stress scene: 1 000 crates, 5 000 grains of sand and 50 blobs in one world. Run it with ./gradlew :games:physics:runRelease, the optimized build, and press the keys to switch scenes.
Let's get physical: klyph-physics, an optional module where crates stack and tumble, blobs
squash, ropes tear and sand pours.
Added
klyph-physics, a new module: a 2D physics engine with rigid and soft bodies, particles and sand,
ropes and cloth that tear, joints and motors, a level of solid tiles with slopes, contact and
sensor events, raycasts and queries; see the Physics guide.App.addPhysicssteps it in the fixed step,PhysicsBodymoves an entity with its body, and
PhysicsWorld.rigidBody(collider, transform)builds a body from a klyphCollider.games/physics: a playground of eighteen physics scenes, from a blob garden to a 5 000-grain stress test.



