It was about time to provide a new build, isn’t it? We’re proud to share this one with you. It introduces a top gun feature: a solution to manage multi-resolution game on every screen! We’ve also worked on gamepads support, improved the sound manager and many other improvements.
On 11th October, we participated to the Flash Online Conference #6, it introduces the Citrus Engine and present RaveAI 2D which will be added into CE V3.2. The record is here.
- Starling updated on 1.4.1
- Feathers updated on 1.1.1
- DragonBones updated to 2.4
- Nape updated on 2.0.12
- Removed Spine runtime support. Use it via DragonBones library (easier to maintain only one skeleton lib).
- Updated to latest DynamicTextureAtlas extension.
- StarlingCitrusEngine offers to manage multi-resolutions and test for context3DProfile availability (http://wiki.starling-framework.org/citrus/multi_resolution)
- ISpriteView handleArtReady/handleArtChanged – custom citrus sprite or physics objects can now react when ‘the view is set (or loaded if the view was a url) or changes to add/remove event listeners, transform the art or manipulate its content
- justDid,isDoing,hasDone return the corresponding InputAction object or null (instead of just true or false).
- InputActions carry messages
- new utility functions such as getAction() with phase/controller/channel filtering.
- removed backwards compatibility(isPressed…)
- InputAction’s time property tells how long (in frames) the input action has been active in the input system.
- Changed the way we handle the physics engine’s debug drawers (due to state transition bugs, and the new nape ShapeDebug) see APhysicsEngine.debugView
- MathVector : critical bug fixes (rotate and angle returned wrong results) and new methods (dot product, normalize, copyFrom, setTo)
- Camera :
- the camera will not follow a target within the area defined by the deadZone rectangle property. (the default deadZone is 0,0,0,0 so the camera constantly follows the target unless its rectangle collides with the bounds
- the AABB rectangle of the camera is accessible using camera.getRect()
- camera is disabled by default. calling setUp or setting its enabled property to true will enable it (activate its update calls)
- added contains(x,y) , containsRect and intersectsRect as a way to know if points/objects are on or off screen and how. for objects, use their visual bounds in state space.
- the camera updates its cameraLensWidth/cameraLensHeight by listenting to the CitrusEngine onStageResize signal, no need to update it manually now.
- offset is replaced by “center” which defines the relative position of the camera offset to its width and height. ex: if center is 0.5,0.5 then the offset will be in the middle of the screen (see more info here)
- added a switchToTarget function to tween the camera movement to a new target’s position with duration and onComplete callback (see the cameramovement example)
- SoundManager :
- on stage deactivate, all sounds are paused (because of Air being able to run in background on mobiles)
- removeAllSounds accepts exceptions, fixed stack underflow error
- UI sound group added by default.
- you can preload an entire sound group by calling preloadSounds() on it and listen for the ALL_SOUNDS_LOADED event on that group
- revamp of the entire system (see below), sounds can be played more than once.
- AnimationSequence :
- removeAllAnimations method
- addTextureAtlasWithAnimations to support AssetManager objects
- using starling, an animation loaded from a .swf will be transformed into an AnimationSequence using AnimationSequence.fromMovieClip
- with the flash display list CitrusEngine mode, swfs are wrapped into the new spriteview.AnimationSequence to allow for animation tracking, onAnimationComplete like the starlingview.AnimationSequence – as long as the .fla has the format described in the documentation for spriteview.AnimationSequence or is constructed the same way as patch_character-SpriteArt.fla in the citrus examples.
- use addEntity instead of add to add entity to state.
- nape Platform oneWay fixed.
- box2D Reward fixed (updates by default).
- Added a LoaderContext for SpriteArt and StarlingArt, we are able to load swf on iOS.
- Added rotation parameter in TmxObject coming from latest Tiled Map Editor builds.
- Fixed a bug where using StarlingCitrusEngine we had to set it up directly.
- state.getObject* functions include results from searches in the pool objects.
- Known bugs can be found on the github issues list.
We’ve also updated and added articles to the wiki because some new features do require explanations but we can’t go through each of them in this blog post. Have a look!
- Multi-resolution support (new)
- SoundManager (new)
- Camera (new)
- Object pooling (updated)
- Input system (updated + gamepad support explanation)
The citrus engine examples have also been looked at individually to ensure they actually run ok. if you find a bug not listed above please report it!
Make sure you’ve reviewed all elements of the changelog. There are some very important changes that could mean a small part of your project might need updating if you want to upgrade.
if you need help or even have trouble understanding what actually changed and need more details, we welcome questions on the forum and even appreciate any kind of feedback or criticism.