Particle effects demo video
As announced in the last post, here is a short video of the new particle effect engine in action. Enjoy! :)
UI and particle effect improvements
The last two weeks brought nothing completely new, but big improvements to already existing stuff.
The first improved area is mouse handling. A few smaller fixes were applied that should make fluorescence behave more like the OSI client. Most prominent of those fixes are the direction changing mouse cursor and the correct handling of transparent gump pixels.
The second reworked subsystem are particle effects. The xml definition format changed quite a bit, as lots of cool new features were added. With the new code, you can now define keyframe based timelines for the emitter properties, and e.g. blend or interpolate them. Plus, the particles can now change their texture over time, thus enabling animated particles. I’ll try and make one or two nice demo effects in the next few days; for now there are only several proof of concept effects for the various timeline elements.
And, last but not least, the paperdoll gump has grown its first few buttons. Nothing fancy, but for me, this improves the “feel” of fluorescence a lot :)
Water shader
fluorescence now contains a simple water shader.
Rendering improvements and zoom
Aside from enjoying the easter break, I spent the last two weeks improving the rendering process. The new version of the renderer is using texture atlases to efficiently batch opengl calls. I also refined the clipping code (only re-draw the parts of the screen that have changed) to use the stencil buffer, making it both more efficient and “more correct”.
All in all, I am pretty happy with the rendering process now. On my 3 year old Notebook (2 x 2.5GHz mobile CPU, NVIDIA 9600M), fluorescence reaches an average of ~500 fps while running around in Britain. Memory usage is approx. 100 MB.
As reorganizing and improving existing code can get a bit boring, I implemented zoom for the world view as a fun experiment. You can see the result in the video below. This is just a tech demo, so please forgive the few graphic bugs (textures are not mipmapped, bleeding edges, some loading time on very far zoom levels). A more refined version of this will most likely be included in a final version, but this has no priority at the moment.
Sound working
In the last 2 days I implement sound effects and music in fluorescence. There are no additional features compared to the OSI client, just loading sound effects from sound.mul and the mp3 files from music/digital, according to the music config file. At some point in the future I’ll probably extend the music capabilities to something more useful :) Of course, you can also turn off sound and music in the config.
This adds a new dependency to the project, fmod. If you are are already compiling fluorescence yourself, check the wiki on how to integrate the fmod libraries. An updated Visual Studio build is not yet available.
Effects (again)
With the latest commit, the standard OSI effects can be substituted with the new particle effects. There is a simple def file providing the translation from the art ID to the effect name. As a demo, the effect used for teleporting on RunUO is substituted with a very simple particle effect.
I’m not really happy with the definition format for particle effects yet, so you can expect some changes there. The current xml format is a bit tedious, inconvenient and allows only basic effects. Suggestions and ideas are very welcome. However, the basic principle works, so I am moving on to other things for now.
Effects
Just a short development update: The most recent version supports basic graphical effects. You can now fling around fireballs and enjoy sparkling healing effects in fluorescence.
Walking, mounts and windows build
Today, a new version was pushed to the project repository. In this version walking (and, of course, running) was implemented. You can now move around similar to the OSI client.
Also, I implemented mount animations. The translation from mount item id to anim id is done in a config file and thus can be customized for new mounts.
Thirdly, the windows build has been reorganzied by StaticZ. The required dependency libraries are now available in the download section, and finally there is a proper VS project setup. Thanks!
New rendering published
The new rendering code is now available on the google code project website. I will also update the winbuild tag today, so you can try it on both platforms. A few minor bugs still pop up sometimes, but I’ll leave them for the time being.
Now I can finally take care of the walking code :)
Edit: The new winbuild tag is now online.
Rendering rewrite
Although it looks like nothing is happening at the moment, there is a big change going on: I’m rewriting big parts of the rendering code. The rewrite started because I needed quick access to map/statics at a given location for walking, which works quite slow in the current master branch. So while I changed the underlying data structures, the rendering stopped working correctly. And as the current rendering is sub-par anyways (slow and buggy), I decided to fix it.
I went back from batching the sprites to the classic painter’s algorithm, but now I only update areas that have changed, and reuse the results from the last rendering. That takes care of the rendering issues reported in the bug tracker (and a few more), while increasing the fps significantly.
Before I push the changes to master, I need to take care of a few issues with the new rendering. Specifically, clicking objects does not work at the moment, and there are a few early-version errors. But the new rendering is definitely a big improvement and a step towards usability on older hardware. I expect the changes to arrive in the master branch somewhen in the next week.
