6 Haziran 2016 Pazartesi

Daily Update 6

I haven't been blogging much the last few days, but I kept working on an animation system for the engine. I've been spending most of my time on a flexible tweening mechanism for scripting complex behaviour with minimal code. I exploited JavaScript's functional programming capabilities, and since Nashorn handles most of the interfacing, the implementation was pretty straightforward. However, I still need some time to make things feel more natural for the user.

This week and the next I'm supposed to develop the internal representation of animations in GIFScript, meaning I'll improve the translation process in the background. With this in mind, I set up cleaner error handling for scripts. I also worked on the rendering code, the previous naive implementation would occasionally fill up the Java heap space for GIFs with large dimensions and 500+ frames. Now using up all heap space is much more difficult, and probably a heap error won't be a problem for mainstream GIFs.

Finally, I did some profiling to help me decide where to head later. I'm actually happy with the performance, but as the frame count increases to more than 500, the run time can jump to a noticeable few seconds. It turns out that roughly 95% of the program time is spent on writing frames to a GIF file, the cost of interpretation is very small even with complex mathematics involved. While Nashorn is working pretty efficiently, Java's standard image exporting functionality seems to be slow. I'll optimize this later next week, for the time being I'll focus on more urgent tasks in my schedule.

Hiç yorum yok:

Yorum Gönder