Releases: collinhover/impactplusplus
Releases · collinhover/impactplusplus
r7
General
- A whole slew of bug fixes.
- Scaling enhancements for retina devices.
- 9 tutorials added to docs (thanks @Pattentrick).
r6
General
- Added lots more examples, warnings, and tips to docs.
- More successful bug hunting!
- UI now intercepts and blocks tap input (no more ui + abilities firing on same tap!)
- Player control has undergone a significant change to decouple the player entity and input (see ig.PlayerManager)
- Hellovetica pixel font replaced with modified Impact++ version called Helloplusplus (includes extra characters such as numbers)
CONFIG
- added
COLLISION.ALLOW_FIXEDto allow control of fixed to fixed collisions - added
CREATURE.MOVE_TO_PREY_SETTINGS - added
CREATURE.MOVE_TO_PREDATOR_SETTINGS - added
CREATURE.MOVE_TO_TETHER_SETTINGS - added
CREATURE.MOVE_TO_WANDER_SETTINGS - deprecated
STATICand moved to a property ofig.EntityExtended.PERFORMANCE - deprecated
MOVABLEand moved to a property ofig.EntityExtended.PERFORMANCE - deprecated
DYNAMICand moved to a property ofig.EntityExtended.PERFORMANCE - removed
NEEDS_BOUNDS Z_INDEX_OVERLAYrenamedZ_INDEX_BELOW_ALL- added
SCALE_MIN,SCALE_MAXto general, entity, ui, and font config
ig.GameExtended
- core properties of the game (such as layers) are now guaranteed to be ready regardless of init order
shapesPassesis now a plain object that takes property:value pairs instead of an array- added
playerManagerandplayerManagerClassproperties (see ig.PlayerManager) getPlayerwill no longer search for player by class unlesscanSearchForPlayerByClassis enabled (defaults to true)getPlayerwill no longer search for player by type unlesscanSearchForPlayerByTypeis enabled (defaults to true)- changed all instances of
respondInputtohandleInput - methods that get entities now account for whether an entity is
hidden - resize is now called after each level is built to account for config screen size changes
ig.CollisionMap
- entities now each have their own collision map result property,
collisionMapResult, to reduce garbage - collision map result's
.collision.slopeis now guaranteed to be a boolean, instead of changing between boolean and object - collision map result's
.collision.slopeobject is now stored in the result's.slopeproperty - major bug fixes for collision map checks
- entities should no longer get stuck at corners of a slope and a flat tile
- entities should no longer fall through one way tiles when coming down a slope
- slope assistance velocity is now added to the entity's position instead of velocity
ig.Camera
- added
pauseandunpausemethods - fixed invalid positions when keeping camera in level
ig.TimerExtended
- removed, timer pausing now handled by entity during
pausemethod (override when you have your own timers to pause)
ig.EntityExtended
- entities always update the current animation, even when off screen, so animation overrides always complete as expected
- changed first parameter of
animReleasetonameto allow for releasing only when override matches name - shifted original first parameter of
animRelease,silent, to second parameter - added
frameandstopoptions toanimOverridemethod - added
collisionMapResultproperty to hold collision map collision results - removed
needsBounds,bounds,getBounds,boundsDraw, andgetBoundsDrawas they are ignored in all calculations and are causing confusion distancemethods now account for fixed entities- entities now set
movingYcorrectly in top-down mode (thanks @Pattentrick for finding) - one way collision check now properly accounts for the velocity of both entities, instead of ignoring one way's velocity
- added
hiddenproperty andhide/unhidemethods - setting grounded is now handled differently internally for top down mode
lastis now always contains last position instead of current- colliding with an entity that functions as a moving platform now works as expected in all cases
- removed
onPausedandonUnpausedsignals for better stability (was causing issues with entities that persisted between levels) - removed
updateCleanupmethod - removed
checkStopmethod intersectWithmethod now setsintersectingproperty, make sure to call parent when you override this method!- all properties modified by collision checks should now be reset via the
cleanupCollisionmethod (called automatically before new collisions) - added
flipWithproperty tomoveTosettings object, which controls whether following entity flips with the followed entity - In addition to per entity scaling, entities now have
scaleMinandscaleMaxproperties to clamp scaling - Added
scaleToSystemScalefor entities that should scale themselves based on system scale on a ratio other than 1:1
ig.Character
- fixed incorrect examples in docs
- added
clearPathmethod for better control of path clearing - fixed incorrect invulnerability modifying alpha when character has alpha other than 1
- characters should climb properly again
ig.Player
collidesdefaults toliteinstead ofactive- removed
holdActivateinput response from default input handling - ig.PlayerManager now handles basic input to action for the player character
- player now only handles input to the basic interaction ability
ig.PlayerManager
- new abstracted way to control characters, allowing you to easily swap the character the player controls with input!
- playerManager's
handleInputcovers move, jump, and climb by default, and attempts to call the managed entity'shandleInputmethod - added settings to disable default gesture input handling in case you need hold or swipe
ig.Creature
collidesdefaults toliteinstead ofpassive- added
detectHiddenPreyanddetectHiddenPredatorto control findinghiddenentities
ig.Spawner
- added
unspawnSilentlyto allow unspawned entities to play death animation - added
onSpawnedAllandonUnspawnedAllsignals - added
spawnAtFirstTargetfor cases when you have several targets to move to, but you always want to start at first
ig.Tutorial
- removed all loop methods in place of using ig.Spawner respawn system
- to properly loop, set
duration === -1and optionallyrespawnDelay - added
propertiesTargetto check for truthy values of properties in spawn targets to complete tutorial
ig.EntityTrigger
- added
getCanTriggermethod to find out if the trigger can be triggered - added
autoCompleteto allow triggers to manually call complete (fixes confusing behavior wherecompleteis called twice) - added
teardownWhenCompleteto defer teardown until deactivate or cleanup
ig.Switch
canOpenrenamedgetCanOpencanCloserenamedgetCanClose- added 'blocked' property for cases when a switch is not broken but blocked by external factors
ig.Door
- animation name for when locked renamed from
locktolocked
ig.Hierarchy
- removed
execute - added
activateconvenience method - added
setEntityconvenience method - added
setEntityOptionsconvenience method - added
setEntityTargetconvenience method - added
setEntityTargetFirstconvenience method - added
getUsingconvenience method
ig.Ability
typeTargetableandgroupTargetablenow match only when target has ALL types/groups matching instead of any one- target is now checked after setup cast instead of before
- removed check for invalid target as is already doing that in target check
- abilities can now target any type or group if
typeTargetable === 0andgroupTargetable === 0 - added
onceproperty (default false) to control whether ability keepsactivated === trueafter activate - added
activateStrictproperty (default true) to double check distance after all activate casting executedeprecatedactivatenow does whatexecuteused to do (to be more in line with rest of library)- i.e. use abilities by calling
activateinstead ofexecute activateCompletenow does whatactivateused to dodeactivatenow does whatdeactivateSetupused to do (to be more in line with rest of library)- i.e. deactivate abilities by calling
deactivateinstead ofdeactivateSetup deactivateCompletenow does whatdeactivateused to do- abilities now check if in use (i.e. casting or channelling) to avoid chain executions that would block proper use
entityTargetnow automatically retained when ability ischannelledretainTargetChannelremovedisEntityTargetablenow accounts for and returns false when ability entity and entityTarget are in same groupgroupTargetableoverridesisEntityTargetableto allow for same group targetscastnow looks for animation settings incastSettings.animSettingsinstead ofcastSettingsitself
ig.AbilityMelee
- animation is now casted during setup instead of when passed
- settings changed from
activateCastSettingstoactivateSetupCastSettings
ig.EntityAbilityExecute
- renamed to
ig.EntityAbilityActivate
ig.UIElement
- moved
onActivatedandonDeactivatedto ig.UIInteractive
ig.UIInteractive
- added
enabledstate - added
activateCompleteanddeactivateComplete, which are called duringactivate/deactivateif element is enabled - added
onActivatedandonDeactivatedsignals, called during their respective complete methods
ig.UIButton
- added simple buttons with automatic animation handling!
ig.UIToggle
- removed properties
animNameActivateandanimNameDeactivatein preference of using overriding animation - refactored to use
activateCompleteanddeactivateCompletedue to ig.UIInteractive changes
ig.UITogglePause
- now uses
media/buttons_states.png(don't forget to copy over the new media)
ig.UIText
- added property
autoRefreshTextto update text elements when their text properties are changed
ig.UIOverlay
- automatically updates
message(UIText elemen...
r5
General
- Load up Impact++ by requiring
'plusplus.core.plusplus'instead of several separate modules - Impact++ now appropriately handles various game screen sizing options, including:
- fixed pixel size (static scale)
- pecent of screen (static scale)
- minimum number of pixels in view (dynamic scaling)
- Impact++ now allows per entity scaling, which can be particularly useful for UI and text when dynamically scaling
- Impact++ now works for both 2D sidescrolling and top-down (see ig.CONFIG.TOP_DOWN)
- Added SUPER COLLIDER! demo as a test suite / kitchen sink (~130 features as of release)
- Added more warnings and tips to docs to avoid confusion.
- Heavy bug hunting completed!
CONFIG
DYNAMICrenamedMOVINGKINEMATICrenamedDYNAMICAUTO_SORT_LAYERSaddedPRERENDER_MAPSaddedCANVAS_WIDTH_PCTrenamedGAME_WIDTH_PCTCANVAS_HEIGHT_PCTrenamedGAME_HEIGHT_PCTDEBUGremoved, useless config valueCAMERA.BOUNDS_andCAMERA.TRAP_BOUNDS_renamed toCAMERA.BOUNDS_TRAP_MIN_TIME_STEPadded (automatically caps fps on mobile)
Physics
- Box2D physics removed from Impact++, performance is not acceptable for mobile web
EntityShapeEdgeandig.utilsphysicsremovedig.utilstile.shapesFromCollisionMapreturns shapes withsolidsinstead ofedges
Tiles
- Collision tiles completely reworked, all half tiles removed (use offset instead)
- Climbable collision tiles are now climbable AND stairs
- Collision visualization tiles now in 4 sizes: 64 px, 32 px, 16 px, and 8 px
ig.BackgroundMap
- ig.BackgroundMap expanded to ig.BackgroundMapExtended
ig.GameExtended
getEntitiesByTypenow searches by an entity's type property (instead of by class as the method does in vanilla ImpactJS)getEntitiesByClassnow searches by entity class (to help avoid confusion)getEntities*all usegetEntitiesMatchinggetEntitiesMatchingsettings object refactored fromsettings.x/ytosettings.from.x/ygetEntitiesMatchingsettings now accepts adistanceSquaredto search by distance
ig.EntityExtended
- ig.EntityExtended has been significantly changed!
- entities now stick to slopes by default, but all other gravity response cases remain the same
- persistent entity swapping handled by game instead of entity's staticInstantiate method
resetnow called at end ofinitmethod (instead of at start)initVisualsremoved and functionality moved toresetExtrasmethodrecordResetStatemoved intoresetExtrasmethod- no longer reliant on
bounds, usepos+sizeproperties instead - no longer reliant on
boundsDraw, useposDraw+sizeDrawproperties instead bounds/boundsDrawnow opt-in and null by defaultupdateBoundsno longer recalculates bounds or vertices by defaultverticesNeededrenamedneedsVerticesgetTotalPosX/YrenamedgetDrawX/YtotalSizeX/YrenamedsizeDraw.x/yflipfrom boolean to objectflip.x/yflip.x/ynow controlled by propertiescanFlipX/Y- dynamics updates, such as gravity and collisions with collision map moved into
updateDynamicsmethod - all animation names are now directional, i.e. "spawn" is now "spawnX/Y/Left/Right/Up/Down" based on
flip.x/yandfacing.x/y addAnimnow takes only animation name and settings as parameterscollideWithreplacesig.Entity.seperateOnX/YAxisfor better control of collisionscollideWithparameters changedig.Entity.COLLIDESrenamedig.EntityExtended.COLLIDESto be consistent withig.EntityExtended.TYPEpointInsideremovedrefreshadded and called by reset (instead of ready)readynow called by way of adding for proper execution order_ungroundedForrenamedungroundedForungroundedForno longer increases when climbingmoveToEntityrenamedmoveToand automatically handles moving to entity or positionmovingToEntityremovedmovingToproperty now holds a reference to what the entity is moving to rather than true/falsemoveToHererenamedmoveToStop- textured now creates textures on first draw call instead of when animations first added
castShadowsrenamedcastShadowprojectrenamedprojectShadow- fixed entities can now collide with each other safely!
ig.Entity.checkPairrenamedig.EntityExtended.checkPairto preserve original functionalityig.Entity.solveCollisionrenamedig.EntityExtended.solveCollisionto preserve original functionality
ig.AnimationExtended
initnow takes only animation sheet and settings as parameters- can now play in reverse
updatereworked so stop pauses instead of sets frame to endchangedadded to keep track of when animation changes tiles
ig.Character
moveToLocationremoved and replaced with pathfindinganims.runrenamedanims.move- no longer restores stats on
readyby default, as no longer needed respawnmethod removed, as no longer needed- checking if any abilities are in use is now as easy as
myCharacter.abilities.getUsing
ig.Creature
- creatures no longer tether to spawner by default, use
tetherToSpawnerandig.CONFIG.CREATURE.TETHER_TO_SPAWNERto set - can find predator and prey by entity name, class, or group (as opposed to only group)
groupPreyrenamedpreyGroupentityPreyrenamedpreygroupPredatorrenamedpredatorGroupentityPredatorrenamedpredator- creatures now properly search for prey/predator by distance instead of doing an AABB intersection test
- creatures no longer wander while using abilities unless ability allows movement
ig.Player
deathDelaymoved toig.EntityCheckpoint.respawnDelay- player no longer handles respawning self, now handled by checkpoint
- player no longer handles camera movement to self when respawning, now handled by camera
ig.Particle
- particle now automatically sets
facing.x/ybased on velocity - particle now automatically sets
currentAnimto "move" + direction based on facing
ig.Projectile
updateCurrentAnimmoved toig.ParticleplaceholdAnimsmoved toig.Particle
ig.EntityTrigger
- ig.EntityTrigger has been significantly changed!
- now properly chains triggers (if you are getting strange behavior, check your trigger targets and check your activate/deactivate overrides)
- to define repeated actions, use
activateinstead ofsetupanddeactivateinstead ofteardown - to define temporary modifications, use
setupinstead ofactivateandteardowninstead ofdeactivate triggeringadded to help prevent triggers from infinitely looping- actual activation of all targets now handled by
handleTargetsfor easier overriding
ig.Spawner
spawnAtTargetremoved- use
spawnTargetSequenceinstead oftargetSequencewhen referencing spawn locations - unspawned entities are now automatically unlinked to be consistent with spawning automatically linking
- added
respawnDelayto allow a pause between endless spawning (ex: checkpoints)
ig.EntityLight
- settings now determined by
ig.CONFIG.LIGHTfor easier control createLightrenameddrawLightcreateCacherenamedresizeCache- canvas caches created in
initPropertiesmethod for better garbage handling castShadowsrenameddrawShadowscastShadowsnow handles casting each item in light bounds (and called bydrawShadows)
ig.EntityDestructable
- now no longer damageable or targetable or collidable
ig.EntityDestructableCollideis now collidableig.EntityDestructableDamageis now damageable and targetable
ig.Door
lockedandautoLockadded
ig.EntitySwitch
stuckrenamedbrokenautoStuckrenamedautoBreak
ig.UIElement
- ig.UIElement has been significantly changed!
refreshmoved to ig.EntityExtendedresizemoved to ig.EntityExtendedrepositionmoved to ig.EntityExtendedrebuildmoved to ig.EntityExtendedlink/unlinkmoved to ig.EntityExtendedverticalmoved to ig.UIMeter- size now includes margins and alignment and calculated in
reposition - ui elements will revert
postoresetState.posunless linked or pos as pct of screen size - ui elements that are linked begin at the center of the element they are linked to!
- linkAlign now controls how far inside or outside of linkedTo a linked UI element is offset, where 0 is the center
- resize renamed refresh
- onResized renamed onRefreshed
- refresh calls (in order) resize and reposition
ig.UITextno longer positions to center by default (but still aligns to center by default)
ig.EntityConversation
- ig.EntityConversation has been significantly changed!
pausingnow split intopausingandlockingto give finer control- steps can now define whether the speaker for that step is locked
- steps can now define the speaker's talk animation name (defaults to talk)
- no longer kills self on complete by default, listens to
suicidalproperty as expected
ig.UIMeter
- size now includes bar size and is calculated in
resize - meters will revert
sizetoresetState.sizewhen refreshed
ig.Ability
castSettings.entityrenamedcastSettings.entityClasscastSettings.entityClassis no longer stored for reuse- casting now account for facing of entity using ability and appends direction to casting animation name
- casting can now automatically stop the movement of the entity using ability based on
autoStopMoving - added methods to check for whether ability is being used
.getUsingand whether ability is being interrupted.getInterrupted
ig.Camera
- settings moved from ig.CONFIG to ig.CONFIG.CAMERA
boundsrenamedboundsTrapboundsPctrenamedboundsTrapPctboundsTrapPctis off by default, useig.CONFIG.CAMERA.BOUNDS_TRAP_AS_PCTorig.Camera.boundsTrapAsPctto toggle on
Utils
- `ig.utilsdraw...
r4
First release of Impact++ (stability questionable)