Dev Branch Breaking Changes as of v1.4.5@2013-12-18.001

Get the latest news on new features, bug fixes and version updates right here!

Dev Branch Breaking Changes as of v1.4.5@2013-12-18.001

Postby rob » Wed Dec 18, 2013 4:51 am

The dev branch has received some breaking changes that will affect any existing game code. Please read this carefully before you update your dev branch.

Breaking Changes

* IgeEntity
** _geometry has been renamed to _bounds3d
** size3d(x, y, z) has been renamed to bounds3d(x, y, z)
** width(), height(), dimensionsFromCell() and dimensionsFromTexture() will no longer affect the 3d isometric bounds cuboid and now only affect the aabb and texture rendering dimensions
** There is a new bounds2d(x, y) method for setting the width and height of the entity aabb and texture render output, you can also use width() and height()
** anchor(x, y) now sets the texture offset from the center of the image
** mouseEventTrigger() has been removed. A new method triggerPolygon() has been added and takes a method name as a string to call to get polygon data. Use entity.triggerPolygon('bounds3dPolygon'); to do mouse hit testing against the isometric bounds cuboid, or entity.triggerPolygon('aabb'); to use the aabb as the trigger. You can also specify your own method name as long as the method returns either an IgePoly2d or IgeRect instance. The default trigger is the aabb if the entity is 2d and if isometric, it defaults to the bounds3d polygon.

* IgePoint has been renamed to IgePoint3d and there is a new IgePoint2d class now too for 2d (x, y) points.
CEO & Lead Developer
Irrelon Software Limited
http://www.isogenicengine.com
User avatar
rob
Site Admin
 
Posts: 316
Joined: Tue Oct 22, 2013 5:08 pm

Migration Guide

Postby rob » Tue Dec 24, 2013 2:23 pm

Migration from versions <= v1.4.4 to >= 1.4.5

Geometry

_geometry has been removed. In your code it may relate to the new _bounds3d or _bounds2d and this must be checked on a case by case basis. Generally though, if you haven't used any isometric containers in your game then you would be mostly safe converting all instances of "._geometry" to "._bounds2d".

The bounds2d is used when drawing 2d images and calculating AABB. bounds3d is used when defining or reading the 3d bounding cuboid for an entity which is ONLY used if you are doing an isometric or 3d game.

size3d(x, y, z)

The size3d(x, y, z) method has been replaced by bounds3d(x, y, z).

_width and _height

If you were using the _width or _height properties to access width and height of the AABB for an entity, please update these to _bounds2d.x and _bounds2d.y respectively.

mouseEventTrigger

If you used to use mouseEventTrigger to set the trigger on your 3d bounds polygon, use entity.triggerPolygon('bounds3dPolygon'); instead.

IgePoint

Anywhere you used to use IgePoint you can search / replace for either IgePoint2d or IgePoint3d depending on if you need a z value (3d) or not (2d).

I hope that helps anyone doing a migration.
CEO & Lead Developer
Irrelon Software Limited
http://www.isogenicengine.com
User avatar
rob
Site Admin
 
Posts: 316
Joined: Tue Oct 22, 2013 5:08 pm


Return to New Features, Latest Versions & General Updates

Who is online

Users browsing this forum: No registered users and 1 guest
cron