V3.1.5 performances, comments, EazeTween

It was about time to have a new update, right?

We hope there wasn’t this 3.1.5 but directly a 3.2 with all the features, but the time is going very fast this last weeks. So we decided to publish this udpate right now. Maybe it is better, people will have time to check the changelog and update their game accordingly.

In brief we have added comments in the SWC, added EazeTween as the default tweening engine, updated on DragonBones V2.0 and added lots of flags (boolean) to improve performances!

    Changelog

  • SWCs include comments!
  • Added EazeTween as the default tweening engine.
  • Update on DragonBones V2.0
  • No more duplicated code between States class, all use the same basis: MediatorState. Now States class are just wrapper.
  • When Starling is set up it picks up fullScreen dimension if it’s running on mobile. The Context3DProfile parameter is also added.
  • Added updateCallEnabled property to CitrusObject: This property prevent the update method to be called by the enter frame, it will save performances. Set it to true if you want to execute code in the update method.
  • Added updateArtEnabled property to Art object. Set it to false if you want to prevent the art to be updated. Be careful its properties (x, y, …) won’t be able to change!
  • Add physics flags to prevent running contact if not necessary (beginContactCallEnabled, endContactCallEnabled, etc.).
  • Now physics is added to objects only when they are added to a state class. It’s called addPhysics function.
  • ACitrusView.update has the delta time in argument (and so its children).
  • Instead of a simple parallax property, now there are two: parallaxX and parallaxY
  • SoundManager can handles more than 32 sounds.
  • StarlingArt handles Texture view. It creates an Image.
  • AnimationSequence can add new animations and remove them.
  • Added a FluidBox into complex objects using ThresholdFilter, metaballs effect.
  • Removed set velocity on Box2D and Nape dynamic objects since we already use a reference.
  • Nape MovingPlatform’s default speed is 30.
  • Improved Box2D Hills.
  • Fixed a bug on Nape Missile’s angle.
  • Prevent to add several time the same object to the state.
  • Added a PolarPoint math class.
  • Added an Accelerometer Input Controller.
  • Added a ScreenTouch Input Controller for Starling.

EazeTween
We didn’t want to reinvent the wheel, so we took a look over the existant tweening engine and grab the best one!
Why using EazeTween instead of the very famous TweenMax? EazeTween has a MIT licence whereas TweenMax hasn’t. TweenMax isn’t free if you’re publishing your game on the App Store and sell it.

Flags?
We have added several flags (boolean) into the engine to prevent lots of unuseful function call: for example a Coin object doesn’t need its update function to be called. On mobile it will save lots of performances! No worries, all the examples have been updated with the last engine code!

Alef
It was about time to prove that the Citrus Engine could also be used for several type of games, and even apps! Let’s take a look on Alef.

Happy coding!

12 thoughts on “V3.1.5 performances, comments, EazeTween

  1. It’s cool to have new updates :), but maybe you should define better the changes when they can break existing projects, for example now the enemies classes in my game, that simply have code like

    public function Bird(name, params)
    {
    super(name, params)
    this._body.setShapeFilters(new InteractionFilter(PhysicsCollisionCategories.Get(“BadGuys”), PhysicsCollisionCategories.GetAllExcept(“BadGuys”)))
    this.view = new EnemyBirdSkin()
    }

    Throws an error and the levels doesn’t start anymore, and it’s hard to understand the problem considering that the only error is a “null object reference” in a code that with version 3.1.3 and 3.1.4 was working πŸ˜€

  2. Hey, thanks for the feedback.

    It was on the changelog: “Now physics is added to objects only when they are added to a state class. It’s called addPhysics function.” but maybe I should highlight what will be an issue for updated.

    • Hey thanks for the reply! Yeah, maybe some sample of what could give problems can be useful (even if I understand it can be hard to explain / show the possible situations, that are a lot!)

      BTW aldo commenting that part of code, with version 3.1.5 I receive also an error of an “undefined setTo method for flash.geom.Point at src\citrus\math\MathUtils.as:54” … just to know πŸ™‚

  3. Thanks Ameryc, yeah solved the problem.
    For physics, I moved the setshapeFilters in the overriding of addPhysics function like you made me notice, thanks!

    setTo instead was a method added from player 11.0, while for major compatibility I was exporting for player 10.1 from flashdevelop. It’s a little pity have less compatibility with player 10 for this method, but it’s not a tragedy πŸ˜€

    Now the game exports and works again, thanks for the help πŸ™‚

  4. Thx for update. I noticed, that with the new function addTextureAtlasWithAnimations in AnimationSequence – no longer work correctly clone method. Because, the sequence – save only the initial atlas and list of the animations. Is that correct?

  5. Oh, I saw a note in the comment to function. Maybe it makes sense to make the vector of all used atlases in this class? Then it will be able to completely clone object.

Leave a Reply

Your email address will not be published. Required fields are marked *