Thursday, 25 February 2010

BAD NEWS

It would appear that the XBOX has suffered a bit of a problem. The power supply is reporting a fault when the XBOX is powered up (RED LIGHT COMES ON).

This is a pain as I was in the middle of testing Dan Barratt's game with the XBOX, now it's started faulting.

I'll need to leave it with IT see if they can get it sorted (I have not got time to mess about with it).

Saturday, 20 February 2010

Engine3.20 released

This is the last release before I do the changes to the collision system only one change (until I decided to add the sprite layer stuff) but important for all those doing shooting (lightgun) style games. Hopefully when I do the collision update I won't completely bork the engine but its a possibility as the entire sprite update code is going to have to change. I've produced a totally new engine project just in case it goes wrong.

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

Changes in this release
=======================

EngineManager
------------
added - PointInFirstSprite(), a further method added (3 in total now) that checks against a range of sprite types, in case you need to check against multiple types.

adjusted - AddSprite(), so it incrementally sets a Z value for each new sprite added (resets when ClearAllSprites called), override by setting a Z position.

added - spriteLayerProperties(), a method for accessing the properties of a specific sprite layer (as detailed below). This is for special effects only collision detection and other systems will not take account (yet!) of the matrices for each of the sprite layers

Here is a quick video showing some square sprites all the squAres are actually the same size but the layers are scaled (Yes I know its a crap example but it's taken from code I was using to test the PointInFirstSprite() code so it was there. I'll do another video to illustrate this better).

SpriteLayerProperties
---------------------
New class added which can globally affect all sprites or text on a specific layer using the following properties. This involved a lot of refactoring which may have introduced some bugs that I haven't picked up (i think I updated all references). This may cause some weird actions (particularly the rotation stuff)

added ScaleFactor - Specifies the scaling effect for the sprite/text layer (float)

added RotationAngle - specifies the rotation angle for the sprite/text layer (float in radians not degrees)

added RotationCentre - Specifies the centre of rotation for the sprite layer (Vector 3)

added DrawMatrix - default matrix which does nothing (as its an identity matrix - look it up)

added CreateMatrix - if true (default is false) creates a transformation matrix for the Sprite/text layer based on the scaleFactor, rotationAngle, rotationCentre values, otherwise the DrawMatrix is used (which defaults to Identity - which does nothing)

access the spriteLayerProperties as follows:

//settings for sprite layer0
//make engine generate matrix
engineM.SpriteLayerProperties(SpriteLayer.layer0).CreateMatrix = true;
//set rotation centre to centre of screen (screen in this case is 800x600)
engineM.SpriteLayerProperties(SpriteLayer.layer0).RotationCentre = new Vector3(400, 300, 0);

//in GameLoop() you can constantly rotate the sprite layer0 at 90 degrees/second:
engineM.SpriteLayerProperties(SpriteLayer.layer0).RotationAngle +=
MathHelper.ToRadians(eventM.ReturnValueForFrame(90));

I've tested this a bit and found a problem with the drawnText (this is where normal text ends up) layer and scaling, scale values over 1.0f stop displaying, I don't know why yet haven't investigated.

Wednesday, 10 February 2010

XBOX360 work

I'm currently testing with the help of Dan Barratt getting your projects working on the XBOX. This will require altering your project so it builds for PC and XBOX and also using a different version of the game engine specifically designed to work on the XBOX (all the same commands and features exist).

This will involve me now producing incremental changes for both PC and XBOX engines (requiring double updates). This is only something you will need to do if you actually want to get your system working on the XBOX.

On the student shared I will be placing the XBOX version of the engine in a folder called XBOXEngine, please do not get this confused with the stock PC one which you already use.

I'll give more information out when I get a system to make this work as easily as possible.

More information in a future post, and I'll post the changes you'll need to make to your project on the help blog at some point in the near future.

Engine3.19 released

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

EngineManager013: GetFirstSpriteOfType() suffered same problem as EngineManager012, now fixed


Changes in this release
=======================

InputManager
------------
added - PadStatePrevious(), gives you the previously tested status of the selected pad

altered - xml description of PadState(), it wrongly said it updated the status when in fact it does not, it just retrieves the status for you.

The following two keyboard methods are provided to make accessing common keyboardstate information more straightforward.

added - KeyDown(), lets you test to see if a key is currently being pressed

added - KeyUp(), lets you test to see if a key is currently not being pressed

The following five game pad methods are provided to make accessing common game pad information more straightforward.

added - ButtonDown(), lets you test to see if a button is currently being pressed on the request pad

added - ButtonUp(), lets you test to see if a button is currently not being pressed on the request pad

added - PadConnected(), lets you test to see if a particular pad is connected, this is useful if you want to display either keyboard or game pad controls

added - Triggers(), retrieves the current trigger state for the selected pad (use inputM.Triggers(1).Left to get the amount of left trigger)

added - TriggersPrevious(), retreives the previous trigger state for the selected pad, useful if you want to determine any difference in pressure on triggers

added - ThumbSticks(), retrieves the current thumbstick state for the selected pad (use inputM.ThumbStick(1).Left.X to get the amount of horizontal movement of the left thumbstick)

added - ThumbSticksPrevious(), retrieves the previous thumstick state for the selected pad.

Engine3.18 released

Just a quick update to activate the Highscore stuff

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

None

Changes in this release
=======================

HighScore
----------

Enabled - this part of the engine had been disabled, now active in this version, see help blog for details

Thursday, 4 February 2010

Engine3.17 released

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

TrackHelper001: Points() now generates correctly the number of points you want across spans of points, fixed PointsForceZ() in same manner.

EngineManager012: RemoveFirstSpriteOfThisType now works, fixed KillFirstSpriteOfThisType() as it sufferred the same flawed logic.

Changes in this release
=======================

EngineManager
-------------

Adjusted - LayerDebug output to include DrawOffset (DrawOff) and DrawPosition (DrawPos) as these were not included

Can't remember why I have both offset and position (as they do the same thing), may need to remove one in near future to avoid confusion.