Engine4.05
Massive update includes, Finished Audio Manager, new PreLoading system, and Multi-threading support for PC and XBOX360 making use of the 4 cores on XBOX360
I still need to put some samples up telling you how to use them.
Bugs fixed in this release
==========================
Timing001: Sorted out a long standing bug that was not apparent unless you did some crazy things (which I have been doing lately), anyway it should be fixed but knowing me I probably broke a whole load of other stuff.
Changes in this release
=======================
EngineManager
-------------
added - MultiThreaded, set this to True to tell the engine to make use of threads, by splitting jobs across as many cores as we have available, this may cause bomb outs, so set it to False if it's not stable as there are garbage collector issues. This has involved some major internal changes to update, collision and rendering logic. Please let me know if you have got issues, so I can quickly track them down.
This is a bit simple at the moment, I need to work out how to force the threads onto 360 cores (there are 4 I can use if I can work out how!). With some basic testing with 420 sprites bouncing round the screen (and some background scrolling) I saw a jump from 128fps unthreaded to 156fps threaded.
new PreLoader
-------------
new class added which handles loading game content for you over a period of time, so you do not get a large delay. This is currently running in the same thread as the main game loop so any animation work will stutter. I will in future versions hopefully get this to run in a separate thread (now that I have started work on multi-threading)
added - Start(), starts the pre-loading process, by specifying the delay to build in between each asset to be loaded and specifies the subroutine to run once the loading process is complete. This subroutine has to transfer the texture assets to your Texture2D variables.
added - End(), used to indicate the Pre-loader has finished and its memory assets can be scrapped.
added - AddAsset(), identifies an asset for the pre-loader to load up for you
added - GetLoadedAsset(), used to get the loaded textures
Sprite
------------
added - Velocity2D, gives the X and Y velocity of a sprite, like Position2D gives you the XY position of a sprite (I found myself needing this when I was doing the doppler work in the new audio manager)
AudioManager
------------
I am nearly at a point to show you how to use it.
effect variables
added - SpeedoFsound, sets the speed of sound for the sound effect this simulates how fast waves travel in a substance
added - Dopplersoft, softens the amount the pitch changes when doppler effects are active, this defaults to 10% (0.1f), it should range from 0 (no change to 1- full change). If the pitch changes to much you want be able to hear the sound anything like it was authored
added - Zignore, tells the sound effect manager to ignore the Z values when calculating distances between sprites and positions (or other sprites)
added - MaxVolume, sets a maximum volume for the sound effect
added - ZeroVolumeDistance, sets the maximum distance before total volume drop off occurs,
added - FullPanDistance, sets the distance a sound effect needs to be from the observer before it is played entirely through the left or right channel
sound effect methods
added - PlayEffect(), plays a fire and shoot effect (one that triggers and is forgotten), these cannot be looped or stopped, so don't have long sound effects
added - PlayEffectViewerAtViewPort(), plays a soundeffect associating it with a single sprite, this is automatically puts the viewer at the centre of the viewport (screen centre), effects are then related to this. If you don't supply appropriate audioeffects then the sound effect is played using PlayEffect().
added - PlayEffectViewerAtPosition(), plays a soundeffect associating it with a single sprite, this puts the viewer at the position given, effects are then related to this. If you don't supply appropriate audioeffects then the sound effect is played using PlayEffect().
added - PlayEffectViewerAtSprite(), plays a soundeffect associating it with a single sprite, this puts the viewer at the position given by the viewers sprite, effects are then related to this. If you don't supply appropriate audioeffects then the sound effect is played using PlayEffect().
added - GetManagedEffect(), this retrieves a currently active sound effect, you should not need to use this under normal circumstance
added - PauseManagedEffect(),
added - ResumeManagedEffect(),
added - StopManagedEffect(),
added - RemoveManagedEffect(),
added - RemoveAllManagedEffects(),
added - AddSoundEffect(), loads an effect into the audio manager, this is not required if you use the pre-loading system as it is done automatically
song methods
added - AddSong(), loads a song into the audio manager, this is not required if you use the pre-loading system as it is done automatically.
added - PlaySong(), plays a song (mp3/wma), you control the current song using MediaPlayer.Volume etc...
added - StopCurrentSong(), stops the currently playing song
added - VisualisationInitialise(), activates the production of Visualisation data (frequency and smaple information)
added - VisualisationOn(), turns on the production of the visualisation data (which is expensive)
added - VisualisationOff(), turns off the production of the visualisation data.
added - visData, contains the visualisation data that you requested for the currently playing song this consists of 256 pieces of frequency of sample information for the current time portion of the playing song. The frequency data goes from 0 to 1f and the sample data goes from -1f to 1f.
Sunday, 28 March 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment