Sunday, 23 January 2011

Engine 5.08 released

Engine5.08

Converted my old (2 years ago) Space invaders code over to the current engine (two complete revisions of changes). This has found quite a few bugs with some core components. So this update should be considered a serious.

I also took the opportunity to add some useful additions to various aspects of the engine.


Bugs fixed in this release
==========================

Audio001: PlayEffect now works properly, it will automatically create multiple instances of your sound effects if they are already playing

Audio002: RemoveAllManagedEffects, duplicate effect instances were not having there updated names logged, so were impossible to remove, infinite removal loop could occur

EngineManager018: I think I have fixed this but I the whole update logic has fundamental flaws which must not be carried into the XNA4 version of the engine.

TextManager002: Issues with applying sprite attributes has now been partially fixed.

EngineManager019: Sprites with no type set caused various erratic behaviours, so a a new type noType has been added and all sprites are defaulted to this.

changes

===============
Audio
===============

RemoveThisActiveSoundEffect() - added, this will attempt to remove any sound effect instances that use a particular sound effect. This is different to the RemoveManagedEffect which can only get rid of a specific instance name of a sound effect.

===============
Event
===============

Event() - added, a quick event constructor that allows all 3 values, time, name and event subroutine to be stated in one go

===============
Limit
===============

OnLimit() - added, Allows you in combination with LimitAction.fireEvent to run a subroutine when a sprite reaches its limit box (left,right,front,back,top,bottom). I should of added this functionality ages ago.
RemoveOnLimit() - added, Allows you to remove the OnLimit event
LimitAction.fireEvent - added, allows you to specify a subroutine to run when limit box is reached, this removes the need for checking code in an OnUpdate() handler
OnLimitHandler - added, returns the update routine specified for the event or null if does not exist

===============
SpriteType
===============

added the following types, noType, on, off, pointer

===============
TextProperty
===============

StockLeft - added, give simple textproperties in white so you can produce quicker code, others included are

StockRight
StockCentred
StockBottomLeft
StockBottom
StockBottomRight
StockTopLeft
StockTop
StockTopRight

Wednesday, 19 January 2011

Engine 5.07 released

Engine5.07

Another quick update

Bugs fixed in this release
==========================

Timing002: If a timer action was set in an OnShow() Sprite update handler, the TimerAction would be set and when the OnShow handler finished the timerActions subroutine would then immediately run.


changes

===============
audioM
===============

CurrentSong - added, This gives the name of the currently playing song, if this is empty then no song (according to the audio manager is playing)

PlaySongUnlessPlaying - added, Will try and play a song, but if it is already active it will not restart, if you want to restart the song then you should use PlaySong()

Tuesday, 4 January 2011

Engine 5.06 released

Engine5.06

Another quick update

Bugs fixed in this release
==========================
TextStore003: when checking for renderlength of text (how many pixels) I wasn't skipping the line break ~ tilda characters so this was considerd part of the font with no texture region to support it.

Menu004: hadn't made use of new renderlength code for all tag alignment cases

changes

============
Engine
============
focalLength - added, determines the focal length for perspective projections

ZRange - added, lets you specify the depth of Z values that are acceptable to render, this value is halfed to form the -ve Z back value and +ve front value. The default is 10,000 which give -5000 to 5000 as the range

ZFront - added, retrieves the current maximum allowable Z value for rendering, sprites with values larger than this will not be rendered

ZBack - added, retrieves the current minimum allowable Z value for rendering, sprites with values smaller than this will not be rendered
============
TextureProcessor
============
GetRegionAlphaList() - added, gets a byte array for a given transparent region of a processed texture

GetRegionAlphaGrid() - added, does same as above but produces a 2d array of alpha bytes

============
TextManager
============
GetCharacterAlphaGrid() - added, gets the 2d array of alpha values for a particular character in a particular font

============
Sprite
============
AutoFadeFront - added, this lets you dynamically change the front fade value

AutoFadeBack - added, this lets you dynamically change the back

PerspectiveProjectionOn() - added, lets you turn on perspective rendering for a sprite - EXPENSIVE in terms of CPU

PerspectiveProjectionOff() - added, turns off perspective rendering