Repository navigation
v3.4
3.3 was published on GitHub; this section is everything after it.
-
Release tooling and documentation:
publish.bat,make_release.bat <version> [publish],docs/RELEASING.md.publish.bat v3.4 "what changed"builds, runs ctest, checks (withgit grepover every file git would commit) that the Windows user name is nowhere in the files and that git has an author e-mail, commits, pushes and makes the GitHub release withgh; without the message it only builds, tests and checks.make_release.battakes the version (it was fixed at v3.1), writes the release notes from the version's## New insection of this file torelease-notes.md, and withpublishrunsgh release createwith the zip.docs/RELEASING.mdhas the one-time setup (tools,gh auth login, a commit identity that is not yours, the remote), each step by hand, and a table of what to do when a step stops. -
Fix: TNT crashed with the gravity zone (
removeBlocks: attempt to compare nil with numberinmakeExplosion). The game's explosions go through everything in their radius and compare itsstrengthanddefence; the zone's sensor circle has neither (it is not a block), so a TNT near the zone raised a script error (first seen on level 2-20). The mod now gives the zonestrengthanddefenceof 1e9. Reproduced on level 1-1 with a TNT next to the zone (error with the mod, none without it or with the zone off; none with the fix, the TNT explodes and scores). -
Concave and large polygons everywhere, a no-limit shape cast, and star / wedge / chevron wood blocks. (1) Physics:
createPolygon(and the polygon parts of compound objects) used to give Box2D a concave outline as it was (it made the convex hull) and cut an outline of more than 8 points into a fan from the first point (right only for convex shapes). A concave outline is now split into the fewest convex pieces of at most 8 points (src/physics/polygon_decompose.h: ear clipping, then Hertel-Mehlhorn merging), one fixture each on the one body; convex outlines keep the old paths, so existing levels are unchanged. Checked: a 10-point star of outer radius 2 / inner radius 1 and an L of area 7 get masses 5.878 and 7 (their real areas), a cast into the notch of the L hits the arm and not the hull. (2) Shape cast: the 8-vertex cap is gone,{points = ...}takes any convex or concave outline (up to a few hundred points; each convex piece is swept with the time of impact, the earliest touch counts) and{sides = n}goes to 128. A T-shaped caster sent down at a star stops with its spike tip on the star's top point (y = -35.075 for a tip 3 below the centre and a star top at -32). (3)createPolygonSprite(newName, source, points [, outline [, darken [, fill]]]): a copy of a sprite cut to a polygon (anti-aliased, optional darkened edge, optional fill of the source's holes). (4) Shape blocks (extra_scripts version 16, section 5):WoodBlock13(star),WoodBlock14(wedge) andWoodBlock15(chevron) are registered inblockTable.blocksas polygon blocks with their own cut sprites for the four damage stages, and the wood group'slastIndexis raised for the editor's keys; add your own inshapeBlocks.blocks. Spawned over level 1-1 they fall and come to rest on their real edges (the star on two points, the chevron on its legs). Needs a rebuild. -
Shape cast:
rayCasttakes a shape (newShapeCastAllin the physics), and the laser is an octagon.rayCast(x1, y1, x2, y2, all, shape)with ashapetable ({radius=},{sides=, radius=},{w=, h=}or{points={...}}, plusangleandskip; seedocs/SCRIPTING.md) sweeps that shape along the segment instead of a bare ray. Box2D has no shape cast, so it is built fromQueryAABBover the swept area andb2TimeOfImpactagainst each fixture (the bundled 2.1 solver reports onlyt, the 2.2 one a state; both are handled); the hit comes with the centre of the shape at the moment of contact (cx,cy), the contact point and the normal. Withoutshapenothing changes. Checked on level 1-1 with a horizontal cast at a plank column: ray hit at x = 39.47, circle of radius 2.5 stops with its centre at 36.92, an octagon of radius 2.5 at 36.82, a 5 x 5 box at 36.82. Inextras/extra_scripts.lua(version 15) the laser is now an octagon the size of the bird (laserMod.shapeSides = 8,shapeRadius, nil = the bird's own radius;shapeSides = 0gives the old thin ray), so it is stopped by rock and immovable things at the width of the bird, and it eases in to the cursor position cached when it fires: the head travels there inlaserMod.beamTime(0.15 s) withlaserMod.beamEase("inCubic"), and whatever it crosses is hit as the head passes it. Needs a rebuild.