More features added to zame-haxe-particles:
- Support for embedded textures (both zipped or not)
- Sprites renderer added, which allows to use some color-effects for flash target
- Fallback to drawTiles renderer when WebGL is not available for html5 target
- Fix problem, when buttons under particle renderer was not clickable (for html5 target)
And two minor things:
Some time ago I wrote a post about an idea, how StringMap could be implemented (for js target) to have ability to iterate fast. I continued to work in this direction, and finally idea evolved into nearly final implementation.
- Tests were added;
- Special iterators implementation for case when there is no data in the map;
- Benchmark code instantiate a specific class now (instead of using creator function), to give Haxe ability to optimize map usage and inline functions;
- Haxe 3.2 (from development branch) was used to compile benchmark;
- Another idea was tested (CachingKeysStringMap);
- Constant time complexity.
StringMap is probably most used class in Haxe (I think only Array is used more often). Probably you never use it directly, rather you use Map<String, SomeType>, which use haxe.ds.StringMap under the hood.
zame-haxe-particles updated again.
Code refactored, minor bugs fixed.
To go to the stress test click on image at top of the post (11 particle emitters, 9776 individual particles).
- Code refactored a little
- Bug with radial emitter fixed
- Support for .json format added
- Support for .pex and .lap formats added
When I need particles for one of my games, I searched a bit, and found excellent Particle Designer 2 for mac. Although this app is a little expensive (€36.99) and sometimes crashes, it allows you to create particle systems in an easy way.
Then I started looking for particle emitter, compatible with OpenFL, but all I found – it is old and abandoned projects.
I decide to create my own library.
1. Non-consistent utf-8 support across platforms
There is excellent haxe.Utf8 class, which allows us to work with utf-8 in a cross-platform way.
But what about cross-platform toLowerCase() or toUpperCase()? What regular expression should I write to replace all non-letters (including unicode ones) with, say, spaces?
To solve this problems, I created zame-haxe-stringutils library.