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
Tuesday, 23 March 2010
Engine4.04 released
Engine4.04
Bugs fixed in this release
==========================
TrackManager001: Was picking correct location on track and transferring this data back to user. The original intention was that the user then decide what to do with this information, but I have now set the track position automatically. I may need to create a separate method to give track data and not set.
Changes in this release
=======================
EngineManager
-------------
adjusted - TrackDisplayOn(), now uses the track ColorWash to colour the TrackMarker of the track, if you want no colouring (because you have a special sprite then set the track colorWash to color.White - the default)
TrackManager
------------
added - GetAPositionNear(), this returns the nearest track position to the given position on a given track, without affecting the current position and movement of sprite
Bugs fixed in this release
==========================
TrackManager001: Was picking correct location on track and transferring this data back to user. The original intention was that the user then decide what to do with this information, but I have now set the track position automatically. I may need to create a separate method to give track data and not set.
Changes in this release
=======================
EngineManager
-------------
adjusted - TrackDisplayOn(), now uses the track ColorWash to colour the TrackMarker of the track, if you want no colouring (because you have a special sprite then set the track colorWash to color.White - the default)
TrackManager
------------
added - GetAPositionNear(), this returns the nearest track position to the given position on a given track, without affecting the current position and movement of sprite
Sunday, 21 March 2010
Engine4.03 released
Engine4.03
Bugs fixed in this release
==========================
Menu003: after investigation this was a bug with the Shooter menu system and not internally with the game engine
Engine015: temporary solution before final re-write, I altered how sprites were being added to the collisions bins, unfortunately this meant that collision check happened before all sprites had entered the bins doh!, meaning not all sprites were collision visible. if you want a more detailed explanation see me in lesson time. If there are any issues (and there might be) please let me know and revert back to a previous version of the engine which was stable for you.
Changes in this release
=======================
AudioManager
------------
This is a brand new class I have started (decided to do it Sunday afternoon) that implements correctly the new audio features in XNA 3.1 (and hopefully in XNA 4.0), it will eventually replace the SoundManager although they will work side by side. It's gonna have bugs which will need to weedled out but the main reason for doing it is that we don't need XACT anymore (and that is good cause it don't work on my win7 laptop!) we can just have a bunch of WAV's and mp3's.
added - AddSong(), this allows you add an mp3 track to the audio manager. The great thing about this is you can easily control the volume but you also get access to Frequency and sample information (I've got it working - but I have disabled it for now - see this video for a simple test) which could be used to generate music related gameplay ala Sega's REZ.
One thing to mention there is a slight delay when you first contact the MediaPlayer (even to set volume!)
It is not activated by default and requires a little jigging to attach to your projects but it works pretty good, here is the feature list (so far :) )
added - AddSoundEffect(), these work like sound effects in the old sound manager fire and forget, but the new audio manager can also independantly set the volume and more excitingly change the pitch and pan of each version of the same sound effect independantly
added - PlayEffect(), shoots off a sound effect that will play once, you can set the volume, pitch or pan of the effect
added - PlayManagedEffect(), triggers a sound effect, but leaves it managable, which means it can be paused, looped and its various settings changed.
added - PauseManagedEffect(), pauses a currently managed effect.
added - ResumeManagedEffect(), resumse a previously paused effect.
added - StopManagedEffect(), stops a previously playing effect.
added - PlaySong(), plays an mp3 track - be aware there is a slight lag
added - RemoveManagedEffect(), removes an instance of a sound effect
added - RemoveAllManagedEffects(), removes all sound effect instances.
added - StopCurrentSong(), stops media player playing music tracks (you can do MediaPlayer.Stop)
TextManager
-----------
added - pointHandler now part of list of attributes applicable to Text when using DrawAsSprites()
TrackManager
------------
added - TrackPositionNear(), attempts to find the position along the current track that is the closest to the given position. This could be used to allow a sprite to jump from one track to another close by. Not tested this fully (lets face it I haven't tested this at all!) so consider it a ALPHA
added - Remove(), which Removes a track at the given position. The position is the order in which the tracks were added. The first track added is at position 0. If the track removed is being followed by the sprite then it is detached from this track and the end track handler is called if enabled, this may also break your code as it needs extensive testing.
added - CurrentTrackData, this returns a Track containing all the information about the current used track and links back to the base TrackDefinition in use
EngineManager and Sprite
========================
Various - lots of internal changes in preparation for plugging in new collision systems
Adjusted - made the collision checks and collision comparisons keep track of their Maximum values
Bugs fixed in this release
==========================
Menu003: after investigation this was a bug with the Shooter menu system and not internally with the game engine
Engine015: temporary solution before final re-write, I altered how sprites were being added to the collisions bins, unfortunately this meant that collision check happened before all sprites had entered the bins doh!, meaning not all sprites were collision visible. if you want a more detailed explanation see me in lesson time. If there are any issues (and there might be) please let me know and revert back to a previous version of the engine which was stable for you.
Changes in this release
=======================
AudioManager
------------
This is a brand new class I have started (decided to do it Sunday afternoon) that implements correctly the new audio features in XNA 3.1 (and hopefully in XNA 4.0), it will eventually replace the SoundManager although they will work side by side. It's gonna have bugs which will need to weedled out but the main reason for doing it is that we don't need XACT anymore (and that is good cause it don't work on my win7 laptop!) we can just have a bunch of WAV's and mp3's.
added - AddSong(), this allows you add an mp3 track to the audio manager. The great thing about this is you can easily control the volume but you also get access to Frequency and sample information (I've got it working - but I have disabled it for now - see this video for a simple test) which could be used to generate music related gameplay ala Sega's REZ.
One thing to mention there is a slight delay when you first contact the MediaPlayer (even to set volume!)
It is not activated by default and requires a little jigging to attach to your projects but it works pretty good, here is the feature list (so far :) )
added - AddSoundEffect(), these work like sound effects in the old sound manager fire and forget, but the new audio manager can also independantly set the volume and more excitingly change the pitch and pan of each version of the same sound effect independantly
added - PlayEffect(), shoots off a sound effect that will play once, you can set the volume, pitch or pan of the effect
added - PlayManagedEffect(), triggers a sound effect, but leaves it managable, which means it can be paused, looped and its various settings changed.
added - PauseManagedEffect(), pauses a currently managed effect.
added - ResumeManagedEffect(), resumse a previously paused effect.
added - StopManagedEffect(), stops a previously playing effect.
added - PlaySong(), plays an mp3 track - be aware there is a slight lag
added - RemoveManagedEffect(), removes an instance of a sound effect
added - RemoveAllManagedEffects(), removes all sound effect instances.
added - StopCurrentSong(), stops media player playing music tracks (you can do MediaPlayer.Stop)
TextManager
-----------
added - pointHandler now part of list of attributes applicable to Text when using DrawAsSprites()
TrackManager
------------
added - TrackPositionNear(), attempts to find the position along the current track that is the closest to the given position. This could be used to allow a sprite to jump from one track to another close by. Not tested this fully (lets face it I haven't tested this at all!) so consider it a ALPHA
added - Remove(), which Removes a track at the given position. The position is the order in which the tracks were added. The first track added is at position 0. If the track removed is being followed by the sprite then it is detached from this track and the end track handler is called if enabled, this may also break your code as it needs extensive testing.
added - CurrentTrackData, this returns a Track containing all the information about the current used track and links back to the base TrackDefinition in use
EngineManager and Sprite
========================
Various - lots of internal changes in preparation for plugging in new collision systems
Adjusted - made the collision checks and collision comparisons keep track of their Maximum values
Wednesday, 17 March 2010
Engine4.02 released
Bugs fixed in this release
==========================
Changes in this release
=======================
EngineManager and Sprite
========================
Various - lots of internal changes in preparation for plugging in new collision systems
regressed - AddSprite(), was assigning an automatic Z value to stop flickering issues, but this impacted on too many students code. So doesn't do this now.
==========================
Changes in this release
=======================
EngineManager and Sprite
========================
Various - lots of internal changes in preparation for plugging in new collision systems
regressed - AddSprite(), was assigning an automatic Z value to stop flickering issues, but this impacted on too many students code. So doesn't do this now.
Monday, 8 March 2010
Engine4.01 released
Collision system coming forward, fixed some bugs introduced with the start of the new collision changes.
Bugs fixed in this release
==========================
TextManager001: Fixed this bug, it was a doosy, such as deep swine involving multiple sprite references which were not being re-wired to the new text sprite.
EngineManager014: Fixed this, bug due to change in collision preparation code. The engine was not marking sprites as moving when they were. The collision engine was detecting collisions but because all sprites were incorrectly marked as not moving no bounce logic was applied.
Changes in this release
=======================
CollisionHelper
---------------
added - PadAndBounce (used by collisionAction.movingBounce replacing AlignAndBounce) doesn't attempt to align a sprite but applies padding and reflects moving sprite, this may cause further problems, which may be countered by altering the sprites Padding value (which defaults to 1 pixel)
EngineManager and Sprite
========================
Various - lots of internal changes in preparation for plugging in new collision systems
Bugs fixed in this release
==========================
TextManager001: Fixed this bug, it was a doosy, such as deep swine involving multiple sprite references which were not being re-wired to the new text sprite.
EngineManager014: Fixed this, bug due to change in collision preparation code. The engine was not marking sprites as moving when they were. The collision engine was detecting collisions but because all sprites were incorrectly marked as not moving no bounce logic was applied.
Changes in this release
=======================
CollisionHelper
---------------
added - PadAndBounce (used by collisionAction.movingBounce replacing AlignAndBounce) doesn't attempt to align a sprite but applies padding and reflects moving sprite, this may cause further problems, which may be countered by altering the sprites Padding value (which defaults to 1 pixel)
EngineManager and Sprite
========================
Various - lots of internal changes in preparation for plugging in new collision systems
Friday, 5 March 2010
Engine4.00 released
Collision system coming forward, but needed to release this due to some big interesting improvements.
One note of interest ScaleFactors, for tileSheets and sprite layers cannot be scaled further that 2.0f, I need to investigate this a lot further.
Bugs fixed in this release
==========================
none
Changes in this release
=======================
Bin (internal object)
---
altered - simplified bin management so should see a significant speed up (I noticed testing code go from 30fps to 45fps with 1000 large rotating sprites all collision enabled)
EngineManager
-------------
added - BinResolution, this allows you to change the collision detection bin grid size, under the correct conditions changing this value may significantly speed up or slow down the collision system.
altered - OnScreen() internal methods, now take into account sprites layer scaling when determining visibilty.
added - more comprehensive debug output for layers and spritelayers and better organisation of this information. also added some control combinations for dynamically scrolling the display output.
SHIFT and - (not the numpad ones) to scroll the display upwards (so you can see more)
SHIFT and + (not the numpad ones) to scroll the display downwards (so you can move back to the top)
SHIFT and < to scroll the display Left. SHIFT and > to scroll the display Right
LayerManager
------------
added - GetLayers(), returns the list of all the TileSheets currently being managed by the LayerManager, these can then be looped through for any special processing you want to do.
Sprite
------
Lot's of work in preparation for dynamic collision engine, now tracking rotated sprites properly (collision not active properly for them yet)
re-written - Update(), made some significant speed ups and removed lots of uneccesary code ready for new collision system.
Some refactoring work done, to remove some parameter passing for some speed ups
added - Manual(), marks a sprite as static, so no movement logic, animation, history and timeractions are applied
added - ManualWithUpdates(), marks a sprite as static so no movement logic is applied, animation history and timeractions are still applied
added - Automatic(), marks a sprite as a normal updating sprite.
TileSheet
---------
added - Wrap, when set to true (the default) the tile sheet will start drawing tiles from the left or top if we run out of tiles on the bottom or right. This will effect scrolling giving you just the tile sheet as you defined it. The default operates as it did before.
One note of interest ScaleFactors, for tileSheets and sprite layers cannot be scaled further that 2.0f, I need to investigate this a lot further.
Bugs fixed in this release
==========================
none
Changes in this release
=======================
Bin (internal object)
---
altered - simplified bin management so should see a significant speed up (I noticed testing code go from 30fps to 45fps with 1000 large rotating sprites all collision enabled)
EngineManager
-------------
added - BinResolution, this allows you to change the collision detection bin grid size, under the correct conditions changing this value may significantly speed up or slow down the collision system.
altered - OnScreen() internal methods, now take into account sprites layer scaling when determining visibilty.
added - more comprehensive debug output for layers and spritelayers and better organisation of this information. also added some control combinations for dynamically scrolling the display output.
SHIFT and - (not the numpad ones) to scroll the display upwards (so you can see more)
SHIFT and + (not the numpad ones) to scroll the display downwards (so you can move back to the top)
SHIFT and < to scroll the display Left. SHIFT and > to scroll the display Right
LayerManager
------------
added - GetLayers(), returns the list of all the TileSheets currently being managed by the LayerManager, these can then be looped through for any special processing you want to do.
Sprite
------
Lot's of work in preparation for dynamic collision engine, now tracking rotated sprites properly (collision not active properly for them yet)
re-written - Update(), made some significant speed ups and removed lots of uneccesary code ready for new collision system.
Some refactoring work done, to remove some parameter passing for some speed ups
added - Manual(), marks a sprite as static, so no movement logic, animation, history and timeractions are applied
added - ManualWithUpdates(), marks a sprite as static so no movement logic is applied, animation history and timeractions are still applied
added - Automatic(), marks a sprite as a normal updating sprite.
TileSheet
---------
added - Wrap, when set to true (the default) the tile sheet will start drawing tiles from the left or top if we run out of tiles on the bottom or right. This will effect scrolling giving you just the tile sheet as you defined it. The default operates as it did before.
Subscribe to:
Posts (Atom)