gameQuery 0.7
position override for collsision(): the collision() function will take a new optional parameter that will make it possible to override the position and size of the selected element. This is typically used to detect a collision before the sprites moves to this position, or to create a collision box that is smaller or bigger than the sprite.
API Change: a new parameter is added to the collision() function.
'buffered' tile-maps: currently the tilemap are created once for all and all the tiles added to the DOM. The hidden tiles are not animated to speed things up. This new feature will mean that only the visible tiles are created as well as a 'security' border around to avoid visible poping of tiles. There would be a parameter that defined how big the border is to allow for performance fine tuning. This will make possible to have very big tile-maps without to much impact on the preformance.
API Change: The API will not change much, just additional optional parameter for the addTilemap
function
scenegraph clean up: Two new functions will make it possible to clean the scenegraph and/or the resources (animations and sounds).
API Change:
cleanScengraph()
remove all visible sprite, groups and tilemapcleanAll()
remove all visible sprites. groups, tilemap, animations and sound.
resource loader that works after game start: Currently the resource loader works only before a call to startGame()
. This news function will allow to create animations and sound after the game is started. There are two mode for this a 'single resource' and a 'on hold' mode.
With 'single resource' the animation or sound will be loaded imediatly and there will be the possiblity to have a callback that is called once it's done. Sprites, Groups and Tilemaps are directly added to the scenegraph. This is typically use to load a single element during a level.
The 'on hold' mode reproduce the state of the API before the call to startGame
all the above mentioned functions will produce a result only after a call to continueGame()
. The scenegraph is hidden so the new sprites, groups and tile are not visible. This new function will behave exactly like startGame(). This mode is typically used to load a new level.
API Changes:
pauseGame()
: will pause all the callbacks and the animations and hidde the scenegraph. Set the resource manager to work in 'on hold' mode.continueGame()
: will load all the resource on hold and make the scenegraph visible.$.gameQuery.Animation
and$.gameQuery.Sound
will now take an optional callback function that will be called if the resource manager is working in 'single resource' mode.
Comments