Duality v2.0 is now feature-complete and, until more testing has been done, awaiting its binary release. This posting contains the full changelog since the previous v1.x release.

Framework

  • There is a new backend abstraction layer, which separates the core and its plugins from platform-dependent backend implementations of graphics, audio, input and system integration.
  • Duality is now completely independent from OpenTK, which has been moved into backend plugins. There is no direct dependency on OpenTK anymore.
  • The Duality core, as well as all core plugins and the default game plugin template are now Portable Class Libraries using Profile 111.
  • Introduced a more newbie-friendly folder structure to the Duality Visual Studio solution file. Added two reduced versions of the Duality solution file with only editor or core projects, so it is more obvious which projects are critical, and which are optional.
  • Updated all projects from .Net 4.0 to .Net 4.5.

Editor

  • Added a new AssetManagement system and API that allows more complex import operations than before. A single importer can now use any amount of files to generate a single Resource, allowing to fully support multi-file Assets. The new API also makes certain hacks unnecessary and simplifies the implementation of custom importers.
  • Tweaked the License Acceptance dialog’s button descriptions to be more clear about either accepting the license, or not using the package that requires it.
  • Fixed an editor crash that occurred when SDL2 is added to the PATH variable of the user’s machine.
  • Fixed a Project View display bug where Resources with dot-separated names would only be displayed by their first token.
  • Fixed the Project View failing to update when deleting a folder with a dot-separated name.
  • Fixed random editor exceptions due to Bitmaps with closed underlying Streams, which apparently violates their usage restrictions.
  • Fixed context menu entries for creating objects not being removed properly from Project and Scene View after their plugin has been disposed.
  • Renamed Helpers directory to Utility in order to have a common naming scheme with the core.
  • Removed the Ionic.Zip dependency in favor of System.IO.Compression.
  • Removed the auto-generated GameRes.cs file in the users game plugin, as this is severely slowing down the editor for big projects and also deemed a bad practice from a code quality perspective.

Core

  • Added a new DualityPrimitives assembly which defines basic data types such as Vector2/3, ColorRgba and others.
  • Added a new Point2 struct as an integer version of Vector2 with different semantics.
  • Added a new Duality.Input namespace, which now provides a full abstraction of mouse, keyboard, gamepad and joystick input devices, independently from OpenTK.
  • Added a lot of classes to the Duality.Drawing namespace, which now provides a full abstraction of most rendering data and configs, independently from OpenTK.
  • Added a new VertexDeclaration class which is used to identify and describe vertex formats to the graphics backend. When possible, vertex declarations are derived automatically from the struct they belong to.
  • Added a new Duality.IO namespace that provides portable mirror implementations of Path, File and Directory classes.
  • Added an IImageCodec abstraction for loading and saving pixel data in various formats.
  • Added a new DontSerialize attribute, which is now used everywhere instead of the non-portable NonSerialized system attribute.
  • Added a new XmlSerializer feature that allows it to serialize arrays of primitive types using comma-separated lists, which is much more concise and readable than one element for each item.
  • Added an abstraction layer for file system operations, so the actual implementation can be loaded from backend plugins for improved portability.
  • Added support for kinematic RigidBodies.
  • Added an optional RigidBody collision filter callback method that can be used to decide which collisions to pass through or ignore on a case-by-case basis.
  • Added a thin IPluginLoader abstraction, which is used by the portable core to pull in backend plugins at startup. It’s the launcher’s job to provide an implementation of this.
  • Changed the previously internal IDrawBatch interface to be public, so games can add custom batch classes.
  • Changed the way default content is loaded to use manifest resource streams rather than a (non-portable) .Net ResourceManager.
  • Changed the default content loading code to be more concise and easier to read.
  • Changed EditorHintImage attributes to use manifest resource streams.
  • Changed all Reflection code to use the new TypeInfo API.
  • Changed PixelData to assume ownership of all color data arrays passed to it, improving performance and memory usage by cutting out the copy step.
  • Changed Fonts to no longer render their glyphs using a TrueType font, but instead rely directly on embedded pixel data. Font Resources are now essentially “bitmap fonts”.
  • Changed the implementation of dictionary serialization to be more performant.
  • Moved all audio-related classes to the Duality.Audio namespace.
  • Renamed all Formatter classes to Serializer.
  • Renamed / Moved  Pixmap.Layer class to PixelData, and moved it to the Duality.Drawing namespace.
  • Renamed plugin and sample projects to indicate whether they’re core or editor plugins, and to resolve duplicate names. This should also fix cyclic dependency errors in other IDEs that managed projects by name instead of by GUID.
  • Updated the OpenTK version that is used in the new backend implementation to match the latest develop branch from the official repository. There are no longer any Duality-specific customizations in OpenTK.
  • Cleaned up the MathF utility class and removed unused methods.
  • Cleaned up core code to stick to the “one class per file” rule more closely and provide a better overview.
  • Cleaned up Rect struct definition.
  • Cleaned up the ReflectionHelper API.
  • Fixed an exception when cleaning up Resources in the main thread, while the Garbage Collection Finalizer added new ones to the schedule.
  • Fixed the XmlSerializer not being able to save arbitrary char data and instead failing on whitespace and invalid XML characters. Note: string serialization was not affected by this.
  • Fixed the XmlSerializer omitting the array length attribute for zero-length arrays even though this would have resulted in ambiguous data.
  • Fixed certain HID devices being enumerated as multiple gamepads and joysticks by adding a Duality-side workaround for the OpenTK quirk causing it.
  • Removed all Serializable attributes from Duality. A type being serializable is the default assumption now. Custom classes no longer need to specify when they’re serializable, but when they’re not.
  • Removed all Animation classes.
  • Removed support for Assembly-level CloneBehavior attributes and solved the only special case that required it with a hardcoded one-liner, yielding minor performance improvements for all cloning operations.
  • Removed ResourceXy.None and ResourceXy.FileExt constants.
  • Removed ContentRef<T>.Null field and replaced it with the actual null keyword.
  • Removed unused and slow preprocessing feature for DrawTechnique Resources.
  • Removed OnLoad methods from core plugins, as they did not provide any added value over the existing OnInit methods.
  • Removed Polygon and QuadStrip vertex modes.
  • Removed all traces of System.Drawing from Duality.

 

You can grab the latest source code version from the master branch on GitHub. There is a project migration guide available here.