Skip to content
This repository has been archived by the owner on Mar 5, 2021. It is now read-only.

v0.13.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@elisee elisee released this 04 Jan 01:17
· 807 commits to master since this release

Better 2D support

XZ plane no more!

We've thought long and hard about the XY / XZ plane setting in Arcade Physics 2D. This option allowed working with ArcadePhysics2D in either planes for convenience, for instance when making top-down 2D games, but it came at a high complexity cost in terms of APIs and implementation.

Seeing as there are many more 2D features being added to the API (2D raycasting being one of them), we've decided to enforce working in the XY plane for 2D games.

Rather than making so many APIs configurable and complicated, we've added a new scene editor setting that lets you choose whether the up axis when moving around should be Y or Z. It only affects the editor and has no impact at runtime.

If that breaks your game project, we're sorry, you'll need to make the switch from XZ to XY. (We've already done it for our own game, Fat Kevin.)

2D vectors and 2D raycasting

New Sup.Math.Vector2 and Sup.Math.Ray2D classes has been added.

2D raycasting lets you test for intersections with sprite renderers, tile map renderers, circles and rectangles.

Scene editor improvements

The 2D mode in the scene editor now lets you choose the camera's depth and will try and place the camera at the correct depth when opening a scene.

You can toggle an editor-only ambient light in the scene editor's controls bar, useful when working with prefabs using Phong shading for instance.

When rotating an actor, you can now snap to the nearest 5° by holding Ctrl.

Finally, a configurable grid has been added to help aligning your actors, both in 2D and 3D modes.

TypeScript 1.6

We've upgraded Superpowers to TypeScript 1.6, adding support for abstract classes, local types, stricter object literal assignment checks and more.

Nothing earth-shattering but some very convenient stuff for your scripting pleasure!

Also fixed is the weird [object Object] message you'd sometimes see in the script editor's error reporting pane.

Checking if an actor or a component was destroyed

You can now call .isDestroyed() on actors or components (including behaviors) to test if they've been destroyed.

It's also now impossible to create an actor parented to a destroyed actor.

Gamepad analog trigger support

The new Sup.Input.getGamepadButtonValue function returns a number between 0 and 1 for analog buttons like the triggers on an Xbox 360 game controller.

Noteworthy fixes and improvements

  • The rule about slashes being forbidden in asset and actor names is now consistently enforced.
  • We've reduced garbage creation in the engine by reusing temporary vectors or quaternions.
  • Fixed a bug that reported incorrectly collision touches in ArcadePhysics2D.

Plugin development

A component must now implement the setIsLayerActive(active: boolean): void; method. If active is false, it should hide itself.

Changes have also been made on SupEngine. You must now pass an object to edit as an argument to actor transform methods. this.actorPosition = this.actor.getLocalPosition(); becomes this.actor.getLocalPosition(this.actorPosition); for instance.

This is only for plugin developers, this is not a change in the scripting API for games.