2012-03-10 01:10:41

Hi all!

Revision 5 of the BGT engine is here! This revision is a must have for all BGT users. It includes not only some nice new features, but also a whole lot of performance optimizations that make a huge difference when put together. There is also a tutorial on how to optimize your own script code effectively, which I suggest that you read if you have a game that is taking shape and needs a speed boost.

The change log follows below. It's relatively long but worth reading!

Version 1.1 (revision 5):
* Updated the script interpreter to the latest version which fixes some more bugs found by users, and adds the following features:
1. Rather than crashing when there isn't enough memory available to allocate an array, the engine now triggers a regular script runtime error.
2. The script compiler is now separate from the virtual machine, which means that compiled game executables are quite a bit smaller than before.
* Added the ability to store a pack file inside precompiled executables that can be accessed both by the pack_file object and by the set_sound_storage function (sponsored by Marc Andersen).
* Added four new functions (key_up, key_released, keys_up and keys_released).
* Added a method called get_keys to the dictionary.
* Added a method called load_from_memory to the sound object which accepts a buffer of data, rather than a filename.
* Added a method called write_wave_sound to the tone synth object which mixes its data down into a sound object rather than to a wave file.
* Significantly optimized the internal handling of string constants which will give a performance improvement of about 260 % for scripts that use a lot of literals.
* Optimized the dictionary to use a hash map implementation from the Boost C++ libraries rather than the standard map, which increases performance a bit.
* Optimized the string_contains function slightly.
* Added a new function called garbage_collect which allows you to control the internal garbage collector used in BGT a little more precisely.
* Added a new function called file_copy.
* Made the argument to the read method in the file object optional.
* Decreased the number of internal memory allocations that take place when a timer object is created, which gives a slight performance boost.
* Added a new boolean property to the dynamic_menu include class, enable_home_and_end, which enables and disables these extra navigational keys to jump to the start and the end of the menu respectively (thanks Damien).
* Optimized the dynamic_menu include class so that it now only initializes Sapi when it is actually needed (thanks Marc).
* Added some safeguards to catch C++ exceptions during execution and report them with a script runtime error, rather than simply crashing.
* Scripts are now compiled with fewer suspend instructions which increases over-all execution performance.
* Removed the limiter from the mixing chain of the tone synth. A simple peak normalize function is all that's needed to prevent clipping.
* Added a tutorial on how to include a pack file in the executable.
* Added a tutorial on how to optimize the overall performance of BGT games.
* Updated the soundtrack include class to expose the support for triangle waveforms (thanks Felix).
* Fixed a bug where the engine would crash if the user tried to convert an infinite or NaN floating point number into a string (thanks Emanuel and Andreas).
* Fixed a bug where the window event queue wasn't cleared before a question dialog box appeared, which could cause issues with the keyboard in certain cases (thanks Christopher).
* Fixed some spelling errors in the documentation, and updated the change log to indicate which features were sponsored by third parties both in the past and for this release.
* Cleaned up the code in the dynamic_menu include class a great deal, removing a lot of unnecessary parts.
* Changed the BGT version number in the installer from 1.0 to 1.1 (thanks Kevin).

As always, I'd love to hear any feedback you may have. You can always download the latest revision from www.blastbay.com/bgt.php. Enjoy!

Kind regards,

Philip Bennefall

2012-03-10 17:23:11

I am going to get it right now! Thanks Phillip!

Go to Heaven for the climate, Hell for the company. - Mark Twain

2012-03-11 17:35:51

Yay thank you philip! That' cool. I got it!

I post sounds I record to freesound. Click here to visit my freesound page
I usually post game recordings to anyaudio. Click here to visit my anyaudio page