WIP changelog for BAR105 branch
== Misc ==
- building the engine now requires GCC 7.0
- add
/endGraph 2 to bring the player back to the menu (1 still quits)
- keybinds: same action with different arguments now differentiated
math.random() now correctly accepts arguments when parsing defs
- command cache increased 1024 → 2048 (FIXME: why? does BAR reach this? sanely designed commands shouldn't!)
wupget:GameProgress interval 10 → 5 seconds
- basecontent now provides the
treetype0 to treetype15 features with a model and some customparams
- spring-dedicated now correctly shows output on Windows when not redirected (spring-headless already worked correctly)
- added a Load Game button to the raw spring.exe menu
- fix height bounds calculation, it now reflects the actual heights rather than the historical min/max (for example if the highest point went 100 -> 90 -> 110 -> 100, previously
Spring.GetGroundExtremes would return 100 -> 100 -> 110 -> 110)
- enabling globallos reveals unseen terrain changes
- buildings can be placed inside other buildings' open yardmap gaps
- fix a crash when trying to add enemy units to a control group (e.g. selected via /godmode)
- allow
nil as the first arg to Spring.SetCameraState
Spring.{Add,Get,Remove}Grass now works even if grass rendering is disabled (also fixes desync)
Spring.AddGrass now has a 3rd param, grass intensity (returned by Get; putting 0 equivalent to using Remove)
- native AI interface: add
Feature_getResurrectDef and Feature_getBuildingFacing
- native AI interface: add
spherical param to Get{Friendly,Enemy,Neutral,}{Units,Features}{In,}
Spring.SetWMIcon new 2nd arg, bool force: ignores the 32x32 icon restriction on Windows
- allow empty argument for
Spring.GetKeyBindings to return all keybindings
- fix a desync caused by locale-dependent string sorting (in some languages the order is
ABab, in others AaBb)
- fix a crash trying to load a save done on a map with LuaGaia when currently playing on a map without it (LuaGaia shared C functions with LuaRules and they took precedence when saving due to alphabetical sorting)
- fix resources sometimes getting into the negative (on the order of 1e-15) due to float inaccuracies; in particular this caused units that cost 0 resources to shoot to be unable to fire due to insufficient resources
Spring.SpawnExplosion works inside Projectile{Created,Destroyed} and no longer crashes on some valid data
- fix "zombie torpedoes" bouncing under the map
- seaplanes can now be built on water if either they can submerge or float (previously floating blocked buildability)
- add
Spring.{Set,Get}UnitBuildParams(unitID, "buildDistance"/"buildRange3D", valueToSet) about unit build range (number) and whether it's spherical (bool)
- add
/setSpeed x to set game speed directly, still obeys min/max
- allow shallow recursion (up to 16) for: CreateUnit/DestroyUnit/CreateFeature/DestroyFeature/GiveOrder
== TKPFS ==
- new pathfinder, TKPFS (id 2)
- same as default except partially multi-threaded
- direct commands still calculated immediately for responsiveness, only passive unit repathing is relegated
- FIXME: any other differences, new springsettings, caveats?
== Radar icons stuff ==
- new springsetting
UnitIconsAsUI and an ingame /iconsAsUI command (all below have a /command variant without the "Unit"). Set to 1 to make radar icons behave like UI elements instead of in-world objects (e.g. no obscuring by terrain, distance fog, blurring or reflection in the water etc. FIXME: some other important effects? different relationships with DrawFoo lua callins?)
- new springsetting
UnitIconScaleUI. Scaling for the above
- new springsetting
UnitIconsHideWithUI. Whether icons get hidden via F5.
- new springsettings
UnitIconFadeStart and UnitIconFadeVanish, for making icons fade smoothly (FIXME: how does this interact with /disticon? override, both apply independently?)
== GL Texture Atlases ==
- add
gl.CreateTextureAtlas(number x, number y, number? allocType, string? atlasName) -> string texName.
x and y have to be between 256 and the value of the (FIXME: new?) springsetting MaxTextureAtlasSizeX (Y respectively).
allocType is a number between 0 and (FIXME), defaults to 0 if not specified, the meanings are (FIXME).
atlasName is an optional name for the atlas, defaults to (FIXME).
- add
gl.FinalizeTextureAtlas(string id) -> bool success. FIXME: is this ID the same as texName above? the atlasName? different?
- add
gl.DeleteTextureAtlas(string id) -> bool success.
- add
gl.AddAtlasTexture(string id, string luaTex, string? subAtlasTexName). Adds texture luaTexStr to sub-atlas subAtlasTextureName (defaulting to same name as luaTex if not specified) of atlas id. (FIXME: describe sub-atlases) The lua tex has to be a regular 2D RGBA/UNORM texture. DDS textures can also be put into the atlas.
- add
gl.GetAtlasTexture(string texName, string luaTex) -> (number s, number p, number t, number q). Query an atlas texture for the UV coordinates (minU, maxU, minV, maxV) of a texture saved with AddAtlasTexture
== Particles ==
- CEGs from allied projectiles now visible in the fog
- add
/softParticles toggle and SoftParticles springsetting to make particles (esp. groundflashes) clipping into the ground fade a bit instead of having a jagged edge; set to 2 for "extra unsafe softness" (FIXME: what does that mean?)
- add
Spring.SetNanoProjectileParams(r, v, a, randR, randV, randA). All params are numbers, and default to 0 when not given. The first three are starting rotation in deg, rotation speed in deg/s, and rotation acceleration in des/s^2. The other three are the same but multiplied with a random (-1; +1) before being added to the former (rolled once per particle at the start of its lifetime) and the appopriate Get (FIXME: theres rotation but no speed? that's the more important part)
- add
/drawOrderParticles command which makes particles obey draw order, supplied in CEG definition under the drawOrder key
- add
rotParams key to CSimpleParticleSystem and CBitmapMuzzleFlame CEGs, a vector of 3 floats: rotation speed, rotation acceleration, starting rotation, in degrees per second ^1/^2/^0 respectively (FIXME: looks like american timestamps, why isn't it start/speed/accel or accel/speed/start? the starting value probably doesnt matter so it makes sense though)
- weapons: add bool
smokeTrailCastShadow, number smokePeriod (default 8), number smokeTime (default 60), number smokeSize (default 7), and number smokeColor (default 0.7, single value for all three RGB channels tint) to things with smoke trails (FIXME: just missile and starburst? do torpedoes count for bubble trails?)
- weapons: add bool
castShadow, for the projectile itself (FIXME: only missiles too? does it work with say cannons that use a model?)
== shaders, VAO, GL4 and other advanced graphics stuff ==
- add
gl.GetVAO which returns an object with a bunch of methods (FIXME: link to some wiki with a list and descriptions, ideally also examples)
- add
gl.GetVBO (FIXME: ditto)
- add
Spring.GetSelectedUnitsCount to the shader container (use case: F2 pathmap replacement)
- add
Platform.glHave{AMD,NVidia,Intel,GLSL,GL4} bools
- remove
Platform.glSupport24bitDepthBuffer and add Platform.glSupportDepthBufferBitDepth instead (FIXME: any neat usage examples, probably from some bar widget?)
- add
gl.{Unit,Feature}{,Shape}GL4 temporary functions
- added a ton of uniforms for shaders (FIXME: I'm not competent enough to say much about this, probably should at least be listed, this is the most major change actually!!)
- add the following constants to
GL: LINE_STRIP_ADJACENCY, LINES_ADJACENCY, TRIANGLE_STRIP_ADJACENCY, TRIANGLES_ADJACENCY, PATCHES (FIXME: for VAO?)
- add the following constants to
GL: [UNSINGED_]BYTE, [UNSINGED_]SHORT, [UNSINGED_]INT[_VEC4], FLOAT[_VEC4], FLOAT_MAT4
- add the following constants to
GL: ELEMENT_ARRAY_BUFFER, ARRAY_BUFFER, UNIFORM_BUFFER, SHADER_STORAGE_BUFFER
- add the following constants to
GL: READ_ONLY, WRITE_ONLY, READ_WRITE
- add a fuckton of image type specifiers (
RGBA32 etc) to GL (FIXME: wiki link probably? also for the above too i guess)
- add a fuckton of barrier bit constants to
GL (FIXME: ditto)
== general rendering-adjacent stuff ==
- fix sky reflections on the ground (skyReflectModTex)
- smoother area-command circle, vertices 20 → 100
- add
Spring.{Set,Get}{Unit,Feature}AlwaysUpdateMatrix which makes the unit "always update matrix" (FIXME: what does that mean, what matrix? when to use this?)
- add
/reloadTextures [lua, smf, s3o, ceg] to reload textures, all groups if none specified. (FIXME: any groups not contained here?)
- filling the nano wireframe works on the current model heights (meaning units with pieces hidden high above but moved downward work correctly)
- add
gl.GetFixedState that returns a shitton of various GL constants and tables (FIXME: it does a lot, document here? probably link to wiki. maybe returning 5-element tables is also bad and should be done on the stack?)
DeprecatedGLWarnLevel springsetting default value 2 → 0 (to reduce spam)
- add
gl.AlphaToCoverage(bool enable, bool? force) -> nil, defined only if GLEW_ARB_multisample is supported by the platform, and otherwise the func itself is nil; force makes it apply even if MSAA level is under 4 (FIXME: what does that mean, what are the practical effects of setting it for msaa 3 or less?)
- improve AMD gfx card detection (looks for more strings, eg. "radeon", and in more places)
- add
gl.ClipDistance(number clipID, bool enabled) -> nil, clipID is 1 or 2 (FIXME: what does either of those numbers mean?)
- change
TextureMemPoolSize springsetting default value 256 → 512 MB
- expose
windSpeed to Spring.{Get,Set}WaterParams
- new bumpwater params: waveOffsetFactor (0.0), waveLength (0.15), waveFoamDistortion (0.05), waveFoamIntensity (0.5), causticsResolution (75.0), causticsStrength (0.08)
WIP changelog for BAR105 branch
== Misc ==
/endGraph 2to bring the player back to the menu (1 still quits)math.random()now correctly accepts arguments when parsing defswupget:GameProgressinterval 10 → 5 secondstreetype0totreetype15features with a model and some customparamsSpring.GetGroundExtremeswould return 100 -> 100 -> 110 -> 110)nilas the first arg toSpring.SetCameraStateSpring.{Add,Get,Remove}Grassnow works even if grass rendering is disabled (also fixes desync)Spring.AddGrassnow has a 3rd param, grass intensity (returned byGet; putting 0 equivalent to usingRemove)Feature_getResurrectDefandFeature_getBuildingFacingsphericalparam toGet{Friendly,Enemy,Neutral,}{Units,Features}{In,}Spring.SetWMIconnew 2nd arg, boolforce: ignores the 32x32 icon restriction on WindowsSpring.GetKeyBindingsto return all keybindingsABab, in othersAaBb)Spring.SpawnExplosionworks insideProjectile{Created,Destroyed}and no longer crashes on some valid dataSpring.{Set,Get}UnitBuildParams(unitID, "buildDistance"/"buildRange3D", valueToSet)about unit build range (number) and whether it's spherical (bool)/setSpeed xto set game speed directly, still obeys min/max== TKPFS ==
== Radar icons stuff ==
UnitIconsAsUIand an ingame/iconsAsUIcommand (all below have a/commandvariant without the "Unit"). Set to 1 to make radar icons behave like UI elements instead of in-world objects (e.g. no obscuring by terrain, distance fog, blurring or reflection in the water etc. FIXME: some other important effects? different relationships with DrawFoo lua callins?)UnitIconScaleUI. Scaling for the aboveUnitIconsHideWithUI. Whether icons get hidden via F5.UnitIconFadeStartandUnitIconFadeVanish, for making icons fade smoothly (FIXME: how does this interact with /disticon? override, both apply independently?)== GL Texture Atlases ==
gl.CreateTextureAtlas(number x, number y, number? allocType, string? atlasName) -> string texName.xandyhave to be between 256 and the value of the (FIXME: new?) springsettingMaxTextureAtlasSizeX(Y respectively).allocTypeis a number between 0 and (FIXME), defaults to 0 if not specified, the meanings are (FIXME).atlasNameis an optional name for the atlas, defaults to (FIXME).gl.FinalizeTextureAtlas(string id) -> bool success. FIXME: is this ID the same as texName above? the atlasName? different?gl.DeleteTextureAtlas(string id) -> bool success.gl.AddAtlasTexture(string id, string luaTex, string? subAtlasTexName). Adds textureluaTexStrto sub-atlassubAtlasTextureName(defaulting to same name asluaTexif not specified) of atlasid. (FIXME: describe sub-atlases) The lua tex has to be a regular 2D RGBA/UNORM texture. DDS textures can also be put into the atlas.gl.GetAtlasTexture(string texName, string luaTex) -> (number s, number p, number t, number q). Query an atlas texture for the UV coordinates (minU, maxU, minV, maxV) of a texture saved with AddAtlasTexture== Particles ==
/softParticlestoggle andSoftParticlesspringsetting to make particles (esp. groundflashes) clipping into the ground fade a bit instead of having a jagged edge; set to 2 for "extra unsafe softness" (FIXME: what does that mean?)Spring.SetNanoProjectileParams(r, v, a, randR, randV, randA). All params are numbers, and default to 0 when not given. The first three are starting rotation in deg, rotation speed in deg/s, and rotation acceleration in des/s^2. The other three are the same but multiplied with a random (-1; +1) before being added to the former (rolled once per particle at the start of its lifetime) and the appopriateGet(FIXME: theres rotation but no speed? that's the more important part)/drawOrderParticlescommand which makes particles obey draw order, supplied in CEG definition under thedrawOrderkeyrotParamskey toCSimpleParticleSystemandCBitmapMuzzleFlameCEGs, a vector of 3 floats: rotation speed, rotation acceleration, starting rotation, in degrees per second ^1/^2/^0 respectively (FIXME: looks like american timestamps, why isn't it start/speed/accel or accel/speed/start? the starting value probably doesnt matter so it makes sense though)smokeTrailCastShadow, numbersmokePeriod(default 8), numbersmokeTime(default 60), numbersmokeSize(default 7), and numbersmokeColor(default 0.7, single value for all three RGB channels tint) to things with smoke trails (FIXME: just missile and starburst? do torpedoes count for bubble trails?)castShadow, for the projectile itself (FIXME: only missiles too? does it work with say cannons that use a model?)== shaders, VAO, GL4 and other advanced graphics stuff ==
gl.GetVAOwhich returns an object with a bunch of methods (FIXME: link to some wiki with a list and descriptions, ideally also examples)gl.GetVBO(FIXME: ditto)Spring.GetSelectedUnitsCountto the shader container (use case: F2 pathmap replacement)Platform.glHave{AMD,NVidia,Intel,GLSL,GL4}boolsPlatform.glSupport24bitDepthBufferand addPlatform.glSupportDepthBufferBitDepthinstead (FIXME: any neat usage examples, probably from some bar widget?)gl.{Unit,Feature}{,Shape}GL4temporary functionsGL:LINE_STRIP_ADJACENCY,LINES_ADJACENCY,TRIANGLE_STRIP_ADJACENCY,TRIANGLES_ADJACENCY,PATCHES(FIXME: for VAO?)GL:[UNSINGED_]BYTE,[UNSINGED_]SHORT,[UNSINGED_]INT[_VEC4],FLOAT[_VEC4],FLOAT_MAT4GL:ELEMENT_ARRAY_BUFFER,ARRAY_BUFFER,UNIFORM_BUFFER,SHADER_STORAGE_BUFFERGL:READ_ONLY,WRITE_ONLY,READ_WRITERGBA32etc) toGL(FIXME: wiki link probably? also for the above too i guess)GL(FIXME: ditto)== general rendering-adjacent stuff ==
Spring.{Set,Get}{Unit,Feature}AlwaysUpdateMatrixwhich makes the unit "always update matrix" (FIXME: what does that mean, what matrix? when to use this?)/reloadTextures [lua, smf, s3o, ceg]to reload textures, all groups if none specified. (FIXME: any groups not contained here?)gl.GetFixedStatethat returns a shitton of various GL constants and tables (FIXME: it does a lot, document here? probably link to wiki. maybe returning 5-element tables is also bad and should be done on the stack?)DeprecatedGLWarnLevelspringsetting default value 2 → 0 (to reduce spam)gl.AlphaToCoverage(bool enable, bool? force) -> nil, defined only ifGLEW_ARB_multisampleis supported by the platform, and otherwise the func itself is nil;forcemakes it apply even if MSAA level is under 4 (FIXME: what does that mean, what are the practical effects of setting it for msaa 3 or less?)gl.ClipDistance(number clipID, bool enabled) -> nil,clipIDis 1 or 2 (FIXME: what does either of those numbers mean?)TextureMemPoolSizespringsetting default value 256 → 512 MBwindSpeedtoSpring.{Get,Set}WaterParams