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_FIXED
to 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
STATIC
and moved to a property ofig.EntityExtended.PERFORMANCE
- deprecated
MOVABLE
and moved to a property ofig.EntityExtended.PERFORMANCE
- deprecated
DYNAMIC
and moved to a property ofig.EntityExtended.PERFORMANCE
- removed
NEEDS_BOUNDS
Z_INDEX_OVERLAY
renamedZ_INDEX_BELOW_ALL
- added
SCALE_MIN
,SCALE_MAX
to 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
shapesPasses
is now a plain object that takes property:value pairs instead of an array- added
playerManager
andplayerManagerClass
properties (see ig.PlayerManager) getPlayer
will no longer search for player by class unlesscanSearchForPlayerByClass
is enabled (defaults to true)getPlayer
will no longer search for player by type unlesscanSearchForPlayerByType
is enabled (defaults to true)- changed all instances of
respondInput
tohandleInput
- 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.slope
is now guaranteed to be a boolean, instead of changing between boolean and object - collision map result's
.collision.slope
object is now stored in the result's.slope
property - 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
pause
andunpause
methods - fixed invalid positions when keeping camera in level
ig.TimerExtended
- removed, timer pausing now handled by entity during
pause
method (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
animRelease
toname
to allow for releasing only when override matches name - shifted original first parameter of
animRelease
,silent
, to second parameter - added
frame
andstop
options toanimOverride
method - added
collisionMapResult
property to hold collision map collision results - removed
needsBounds
,bounds
,getBounds
,boundsDraw
, andgetBoundsDraw
as they are ignored in all calculations and are causing confusion distance
methods now account for fixed entities- entities now set
movingY
correctly 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
hidden
property andhide
/unhide
methods - setting grounded is now handled differently internally for top down mode
last
is 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
onPaused
andonUnpaused
signals for better stability (was causing issues with entities that persisted between levels) - removed
updateCleanup
method - removed
checkStop
method intersectWith
method now setsintersecting
property, make sure to call parent when you override this method!- all properties modified by collision checks should now be reset via the
cleanupCollision
method (called automatically before new collisions) - added
flipWith
property tomoveTo
settings object, which controls whether following entity flips with the followed entity - In addition to per entity scaling, entities now have
scaleMin
andscaleMax
properties to clamp scaling - Added
scaleToSystemScale
for entities that should scale themselves based on system scale on a ratio other than 1:1
ig.Character
- fixed incorrect examples in docs
- added
clearPath
method 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
collides
defaults tolite
instead ofactive
- removed
holdActivate
input 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
handleInput
covers move, jump, and climb by default, and attempts to call the managed entity'shandleInput
method - added settings to disable default gesture input handling in case you need hold or swipe
ig.Creature
collides
defaults tolite
instead ofpassive
- added
detectHiddenPrey
anddetectHiddenPredator
to control findinghidden
entities
ig.Spawner
- added
unspawnSilently
to allow unspawned entities to play death animation - added
onSpawnedAll
andonUnspawnedAll
signals - added
spawnAtFirstTarget
for 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 === -1
and optionallyrespawnDelay
- added
propertiesTarget
to check for truthy values of properties in spawn targets to complete tutorial
ig.EntityTrigger
- added
getCanTrigger
method to find out if the trigger can be triggered - added
autoComplete
to allow triggers to manually call complete (fixes confusing behavior wherecomplete
is called twice) - added
teardownWhenComplete
to defer teardown until deactivate or cleanup
ig.Switch
canOpen
renamedgetCanOpen
canClose
renamedgetCanClose
- 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
lock
tolocked
ig.Hierarchy
- removed
execute
- added
activate
convenience method - added
setEntity
convenience method - added
setEntityOptions
convenience method - added
setEntityTarget
convenience method - added
setEntityTargetFirst
convenience method - added
getUsing
convenience method
ig.Ability
typeTargetable
andgroupTargetable
now 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 === 0
andgroupTargetable === 0
- added
once
property (default false) to control whether ability keepsactivated === true
after activate - added
activateStrict
property (default true) to double check distance after all activate casting execute
deprecatedactivate
now does whatexecute
used to do (to be more in line with rest of library)- i.e. use abilities by calling
activate
instead ofexecute
activateComplete
now does whatactivate
used to dodeactivate
now does whatdeactivateSetup
used to do (to be more in line with rest of library)- i.e. deactivate abilities by calling
deactivate
instead ofdeactivateSetup
deactivateComplete
now does whatdeactivate
used to do- abilities now check if in use (i.e. casting or channelling) to avoid chain executions that would block proper use
entityTarget
now automatically retained when ability ischannelled
retainTargetChannel
removedisEntityTargetable
now accounts for and returns false when ability entity and entityTarget are in same groupgroupTargetable
overridesisEntityTargetable
to allow for same group targetscast
now looks for animation settings incastSettings.animSettings
instead ofcastSettings
itself
ig.AbilityMelee
- animation is now casted during setup instead of when passed
- settings changed from
activateCastSettings
toactivateSetupCastSettings
ig.EntityAbilityExecute
- renamed to
ig.EntityAbilityActivate
ig.UIElement
- moved
onActivated
andonDeactivated
to ig.UIInteractive
ig.UIInteractive
- added
enabled
state - added
activateComplete
anddeactivateComplete
, which are called duringactivate/deactivate
if element is enabled - added
onActivated
andonDeactivated
signals, called during their respective complete methods
ig.UIButton
- added simple buttons with automatic animation handling!
ig.UIToggle
- removed properties
animNameActivate
andanimNameDeactivate
in preference of using overriding animation - refactored to use
activateComplete
anddeactivateComplete
due 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
autoRefreshText
to 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
DYNAMIC
renamedMOVING
KINEMATIC
renamedDYNAMIC
AUTO_SORT_LAYERS
addedPRERENDER_MAPS
addedCANVAS_WIDTH_PCT
renamedGAME_WIDTH_PCT
CANVAS_HEIGHT_PCT
renamedGAME_HEIGHT_PCT
DEBUG
removed, useless config valueCAMERA.BOUNDS_
andCAMERA.TRAP_BOUNDS_
renamed toCAMERA.BOUNDS_TRAP_
MIN_TIME_STEP
added (automatically caps fps on mobile)
Physics
- Box2D physics removed from Impact++, performance is not acceptable for mobile web
EntityShapeEdge
andig.utilsphysics
removedig.utilstile.shapesFromCollisionMap
returns shapes withsolids
instead 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
getEntitiesByType
now searches by an entity's type property (instead of by class as the method does in vanilla ImpactJS)getEntitiesByClass
now searches by entity class (to help avoid confusion)getEntities*
all usegetEntitiesMatching
getEntitiesMatching
settings object refactored fromsettings.x/y
tosettings.from.x/y
getEntitiesMatching
settings now accepts adistanceSquared
to 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
reset
now called at end ofinit
method (instead of at start)initVisuals
removed and functionality moved toresetExtras
methodrecordResetState
moved intoresetExtras
method- no longer reliant on
bounds
, usepos
+size
properties instead - no longer reliant on
boundsDraw
, useposDraw
+sizeDraw
properties instead bounds/boundsDraw
now opt-in and null by defaultupdateBounds
no longer recalculates bounds or vertices by defaultverticesNeeded
renamedneedsVertices
getTotalPosX/Y
renamedgetDrawX/Y
totalSizeX/Y
renamedsizeDraw.x/y
flip
from boolean to objectflip.x/y
flip.x/y
now controlled by propertiescanFlipX/Y
- dynamics updates, such as gravity and collisions with collision map moved into
updateDynamics
method - all animation names are now directional, i.e. "spawn" is now "spawnX/Y/Left/Right/Up/Down" based on
flip.x/y
andfacing.x/y
addAnim
now takes only animation name and settings as parameterscollideWith
replacesig.Entity.seperateOnX/YAxis
for better control of collisionscollideWith
parameters changedig.Entity.COLLIDES
renamedig.EntityExtended.COLLIDES
to be consistent withig.EntityExtended.TYPE
pointInside
removedrefresh
added and called by reset (instead of ready)ready
now called by way of adding for proper execution order_ungroundedFor
renamedungroundedFor
ungroundedFor
no longer increases when climbingmoveToEntity
renamedmoveTo
and automatically handles moving to entity or positionmovingToEntity
removedmovingTo
property now holds a reference to what the entity is moving to rather than true/falsemoveToHere
renamedmoveToStop
- textured now creates textures on first draw call instead of when animations first added
castShadows
renamedcastShadow
project
renamedprojectShadow
- fixed entities can now collide with each other safely!
ig.Entity.checkPair
renamedig.EntityExtended.checkPair
to preserve original functionalityig.Entity.solveCollision
renamedig.EntityExtended.solveCollision
to preserve original functionality
ig.AnimationExtended
init
now takes only animation sheet and settings as parameters- can now play in reverse
update
reworked so stop pauses instead of sets frame to endchanged
added to keep track of when animation changes tiles
ig.Character
moveToLocation
removed and replaced with pathfindinganims.run
renamedanims.move
- no longer restores stats on
ready
by default, as no longer needed respawn
method 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
tetherToSpawner
andig.CONFIG.CREATURE.TETHER_TO_SPAWNER
to set - can find predator and prey by entity name, class, or group (as opposed to only group)
groupPrey
renamedpreyGroup
entityPrey
renamedprey
groupPredator
renamedpredatorGroup
entityPredator
renamedpredator
- 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
deathDelay
moved 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/y
based on velocity - particle now automatically sets
currentAnim
to "move" + direction based on facing
ig.Projectile
updateCurrentAnim
moved toig.Particle
placeholdAnims
moved 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
activate
instead ofsetup
anddeactivate
instead ofteardown
- to define temporary modifications, use
setup
instead ofactivate
andteardown
instead ofdeactivate
triggering
added to help prevent triggers from infinitely looping- actual activation of all targets now handled by
handleTargets
for easier overriding
ig.Spawner
spawnAtTarget
removed- use
spawnTargetSequence
instead oftargetSequence
when referencing spawn locations - unspawned entities are now automatically unlinked to be consistent with spawning automatically linking
- added
respawnDelay
to allow a pause between endless spawning (ex: checkpoints)
ig.EntityLight
- settings now determined by
ig.CONFIG.LIGHT
for easier control createLight
renameddrawLight
createCache
renamedresizeCache
- canvas caches created in
initProperties
method for better garbage handling castShadows
renameddrawShadows
castShadows
now handles casting each item in light bounds (and called bydrawShadows
)
ig.EntityDestructable
- now no longer damageable or targetable or collidable
ig.EntityDestructableCollide
is now collidableig.EntityDestructableDamage
is now damageable and targetable
ig.Door
locked
andautoLock
added
ig.EntitySwitch
stuck
renamedbroken
autoStuck
renamedautoBreak
ig.UIElement
- ig.UIElement has been significantly changed!
refresh
moved to ig.EntityExtendedresize
moved to ig.EntityExtendedreposition
moved to ig.EntityExtendedrebuild
moved to ig.EntityExtendedlink/unlink
moved to ig.EntityExtendedvertical
moved to ig.UIMeter- size now includes margins and alignment and calculated in
reposition
- ui elements will revert
pos
toresetState.pos
unless 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.UIText
no longer positions to center by default (but still aligns to center by default)
ig.EntityConversation
- ig.EntityConversation has been significantly changed!
pausing
now split intopausing
andlocking
to 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
suicidal
property as expected
ig.UIMeter
- size now includes bar size and is calculated in
resize
- meters will revert
size
toresetState.size
when refreshed
ig.Ability
castSettings.entity
renamedcastSettings.entityClass
castSettings.entityClass
is 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
.getUsing
and whether ability is being interrupted.getInterrupted
ig.Camera
- settings moved from ig.CONFIG to ig.CONFIG.CAMERA
bounds
renamedboundsTrap
boundsPct
renamedboundsTrapPct
boundsTrapPct
is off by default, useig.CONFIG.CAMERA.BOUNDS_TRAP_AS_PCT
orig.Camera.boundsTrapAsPct
to toggle on
Utils
- `ig.utilsdraw...
r4
First release of Impact++ (stability questionable)