Skip to main content

2 posts tagged with "ember"

View All Tags

Version 5.2.0 Released - ParticleEffectSerializer & Ember Fixes

· 3 min read
Christopher Whitley (AristurtleDev)
MonoGame.Extended Maintainer

Hi everyone,

MonoGame Extended version 5.2.0 is now available, along with Ember 1.0.4. This release addresses some critical bugs in Ember's file serialization and introduces a new unified ParticleEffectSerializer class that aligns with standard .NET serialization patterns.

What's Changed

New ParticleEffectSerializer

The ParticleEffectReader and ParticleEffectWriter classes have been consolidated into a single static ParticleEffectSerializer class. This brings the particle system's serialization in line with how other .NET serializers work, like JsonSerializer.

The new API is cleaner and more intuitive:

// Loading a particle effect
ParticleEffect effect = ParticleEffectSerializer.Deserialize(filePath, contentManager);

// Saving a particle effect
ParticleEffectSerializer.Serialize(filePath, effect);

The old ParticleEffectReader and ParticleEffectWriter classes are now marked as obsolete and will be removed in version 6.0.0. If you're using these classes directly in your code, you should migrate to the new ParticleEffectSerializer API.

Reference: https://github.com/MonoGame-Extended/Monogame-Extended/pull/1044

Ember Serialization Fixes

There was a bug in Ember that was causing texture names to be saved incorrectly in the .ember XML files. Additionally, the enabled states for modifiers and interpolators weren't being persisted at all. Both of these issues have been resolved with this release.

If you created particle effects in previous versions of Ember, you may need to verify that texture references are correct when loading them in this version.

XML Utility Improvements

New static utility methods have been added for working with XML attributes, making it easier to read and write particle effect data. These improvements are used internally by the ParticleEffectSerializer but are also available if you're extending the particle system or creating custom serialization logic.

Additional Fixes

This release also includes a few smaller fixes:

  • FastRandom Upper Bounds: The FastRandom.Next methods now correctly treat the upper bound as exclusive, matching the behavior of System.Random. This ensures consistent random number generation across the framework.
  • ShapeExtensions Disposal Check: Added a defensive check in ShapeExtensions to prevent ObjectDisposedException when getting textures after a graphics device reset or on Android when the app returns from background.
  • Documentation Cleanup: Removed outdated references to UIBatcher in code comments.

References:

Migration Guide

If you're using ParticleEffectReader or ParticleEffectWriter directly, here's how to migrate:

Old way:

// Reading
using ParticleEffectReader reader = new ParticleEffectReader(filePath, contentManager);
ParticleEffect effect = reader.ReadParticleEffect();

// Writing
using ParticleEffectWriter writer = new ParticleEffectWriter(filePath);
writer.WriteParticleEffect(effect);

New way:

// Reading
ParticleEffect effect = ParticleEffectSerializer.Deserialize(filePath, contentManager);

// Writing
ParticleEffectSerializer.Serialize(filePath, effect);

The static methods handle all resource management internally, so you no longer need to worry about using statements or disposal.

What's Next?

With these fixes in place, the particle system continues in maintenance mode. My focus remains on the tile map system, where I'm working on bringing similar tooling and documentation quality that we've achieved with particles.

As always, if you encounter any issues or have feedback, please open an issue on GitHub. Your input helps make MonoGame Extended better for everyone.

Happy coding!

- ❤️ Chris Whitley (AristurtleDev)

Version 5.1.1 Released - Ember Is Here!

· 3 min read
Christopher Whitley (AristurtleDev)
MonoGame.Extended Maintainer

Hi everyone,

I'm excited to announce the release of MonoGame Extended version 5.1.1, which officially launches Ember, the particle effect editor for MonoGame Extended!

If you've been following along, you may remember that Ember had a soft release for community feedback. Well, that feedback period is over, and I'm thrilled to share that Ember is now ready for its full public release. This 5.1.1 update to MonoGame Extended ensures full compatibility with Ember's file format and workflow.

What Is Ember?

Ember Editor

Ember is a standalone particle effect editor built specifically for the MonoGame Extended particle system. It provides a visual, real-time environment for creating, editing, and fine-tuning particle effects without having to recompile your game every time you want to tweak a value.

The editor is built using MonoGame itself (DesktopGL) with a Dear ImGui interface, which means what you see in Ember is exactly what you'll get in your game.

Key Features

  • Real-time visual editing - See your particle effects update instantly as you adjust parameters
  • Complete particle system support - Full access to all emitters, modifiers, profiles, and parameters
  • Project-based workflow - Save your effects as .ember files that can be loaded directly into your MonoGame Extended projects
  • Accurate rendering - Built on MonoGame DesktopGL to ensure perfect rendering fidelity

Getting Started with Ember

Head over to the Ember documentation to get started. The quick start guide will walk you through downloading Ember, creating your first particle effect, and loading it into your MonoGame Extended project.

For those who have been using the particle system programmatically, you'll find that Ember integrates seamlessly with your existing workflow. Effects created in Ember can be loaded using the ParticleEffect.FromFile() method that was introduced in version 5.1.0.

What's Next?

With Ember officially released and the particle system documentation complete, the particle system will be entering maintenance mode. This means I'll continue to fix bugs and address issues, but no major new features are planned for the immediate future.

My focus is now shifting to the tile map system in MonoGame Extended. There's a lot of exciting work planned there, and I'm looking forward to bringing the same level of polish and tooling to tile maps that we've achieved with the particle system.

Thank you to everyone who provided feedback during the soft release period. Your input helped shape Ember into a tool that I hope you'll find invaluable for your projects.

Happy particle creating!

- ❤️ Chris Whitley (AristurtleDev)