Repository navigation
klyph 1.1.0: Movement, jumps and floors
klyph 1.1.0: Movement, jumps and floors. Add it to a game with
plugins { id("com.eventslooped.klyph") version "1.1.0" }
klyph { entryPoint = "mygame.main" }
kotlin { sourceSets.nativeMain.dependencies { implementation("com.eventslooped.klyph:klyph:1.1.0") } }or start from klyph-template. The guide and API reference are at https://inemtsev.github.io/klyph/.
Movement, jumps and floors: the engine moves your entities and stops them at walls and floors,
so a platformer takes as little code as a shooter.
Added
Solid: makes a boxCollidera wall or floor, or a one-way ledge withPassable.FROM_BELOW.KinematicBody(dx, dy): moved by the engine each fixed step and stopped at solids, reporting
isOnFloor,isOnWall,isOnCeiling,floorOrNullandhasLanded, withdropThrough()for
ledges. Gravity and jumps stay game code; see the
Platformers guide.- Sweeps against solids:
Collisions.sweepBox,sweepBoxTo,sweepColliderandfloorBelowOrNull. - Planning a move without a body:
Collisions.slideBoxandslideCollider, into a reusableBoxSlide. Velocity(dx, dy): applied to the entity'sTransformeach fixed step.ParticleEmitter.burst(region, count, ...)andCommands.spawnBurst(x, y, emitter)for one-shot effects.Animation.speedandSpriteAnimation.speed: a playback rate multiplier.Collider.scalesWithTransform: set tofalseto keep the hitbox at scale 1 while the sprite squashes or spins.Time.fixedStepCount.- Gradle plugin:
com.eventslooped.klyph.libraryfor a game's shared module, read-onlyklyph { }
membershostTarget,supportedTargets,configuredTargetsandsdl3IncludeDir, and
klyph.sdl3.download=falseto stop the build instead of downloading SDL3.
Changed
isJustPressedandisJustReleasedcount fixed steps insideFIXED_UPDATE: each press is seen
by exactly one step. A game that latched presses fromINPUTfor the next step can drop the latch.- Rooftop Roller runs on
KinematicBodyandSolid; its own physics code is gone. Collisions.toStringincludessolids=N.