Tuesday, 3 January 2012

Engine7.00 released

Finally finished the first version of the engine working in XNA4.0

I have tested as much as I can the original features kept and the new features. There are some issues that need fixing but these should not affect you at the moment.

I will provide updates to the engine to cover bug fixes and general background updates.

I will maintain a bug list in another blog (I'll update this post to reflect this)

New blog for engine 7 can be found here

Monday, 28 March 2011

Engine 5.17 released

Engine5.17

Very minor update

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

changes in this release
=======================
Menu - added functionality to allow user control of menu movement along tracks
===================
Menu
===================
TrackMenuOffset - added, gives you the offset (spacing) of menu items along the track specified

Friday, 25 March 2011

Engine 5.16 released

Engine5.16

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

changes in this release
=======================

EngineManger - added some functionality to viewer position logic
KeyboardBuffer - made some function changes
Menu - added some track additions

===================
EngineManager
===================

ViewerPositionOverride - if set to true, then the user has to supply the viewers 3d position using the ViewerUserPosition property of the engine. if false then the engine calculates this based on the centre of the viewport and the value ViewerZ.

ViewerUserPosition - Specifies the 3d position of the viewer, this is important for Perspective projection and 3d sound effects, for this to work you need to set ViewerPositionOverride to true to use this.

Engine Debug output Debug.viewer - added, shows viewer position and mode

===================
KeyboardBuffer
===================

IgnoreEnter - added if true this tells the keyboard buffer to not process the Enter key, if set to false (the default) the enter will be processed as a ~ (the line break character)

On(), Off() - added these turn the keyboard buffer on and off (neither clear the previous buffer)

===================
Menu
===================

TrackAdvanceAutoMenuItems() - allows you to specify how many items will be advanced before items menu stops

TrackRewindAutoMenuItems() -allows you to specify how many items will be rewound before items menu stops

Wednesday, 23 March 2011

Engine 5.15 released

Engine5.15

NEED TO ADD CALL BACKS TO VIEWER SUBS (NULLED FOR NOW)

Bugs fixed in this release
==========================
Re-wrote some parts of AudioManager to attempt to fix some inconsistences

an experimental "fix" added to limit box bouncing when gravity active - which curbs the over application of velocity on the bounce

changes in this release
=======================

AudioManager - added some callbacks for effects ending
KeyboardBuffer - new class to buffer input from XNA keyboard to allow typing (which was very difficult to do before I added this)
EngineManger - added some functionality

===================
AudioManager
===================
PlayEffect, PlayManagedEffect - all version can now specify a callback subroutine executed when the sound effect is stopped. This can allow you to use the ending of a sound effect to start a game mode. For these callbacks to execute safely they should run code using engineM.StateChange = subName so it is executed after all pending updates.

===================
KeyboardBuffer
===================
Active - when true keyboard buffer is active, default is false (no keyboard buffer)

GetBuffer - retrieves the current contents of the keyboard buffer

GetBufferAndFlush - retrieves the current contents of the keyboard buffer and then clears it

Flush() - clears the current contents of the buffer

RemoveLast() - removes the last character entered into the buffer, use this with your own checks for backspace key

SpecifyKeyMatchingPairs() - allows you to create your own set of valid keys and their display characters

===================
EngineManager
===================

StateChange - added, allows you to specify a subroutine to run at the end of current update. This is to be used when you need to change mode during event handlers and sprite handlers, so you don't get weird conflicts, which you mostly get away with but not always.

Tuesday, 15 March 2011

Engine 5.14 released

This is the latest update, which has gone through a couple of iterations while I added relevant support structures for tile map collision systems and their associated helper methods.

I also fixed a really stupid bug from way back when I re-wrote the entire event system in version 4.00 of the engine.

Engine5.14

It is not necessary to update to this version of the engine, the change was for a specific purpose.

Bugs fixed in this release
==========================
EventManager006 - The Pause() method of Event had no code in it! doh!, so techincally this was an Event class bug not an EventManager class bug

Map001 - fixed wrapping issue on tile location checking (didn't list on buglist because not public at the time)


changes in this release
=======================
PointHelper - new class added
Map - new class added
Sprite - addition to class


==============
New class PointHelper
==============
This class contains lots of methods for helping with Point values, this is useful for logic within tilemap games

Same() - added, determines if two Point values contain the same X and Y values

Distance() - added, works out the distance (in Point co-ordinates) of two Point values (grid positions)

DistanceInt() - added, same as above but rounds to an Integer value

DistanceSquared() - added, works out the distance squared between two point values, this is quicker than Distance as it doesn't perform the square root operation and is good enough if you just want to compare relative distances rather than exact distances between points

DistanceSqauredInt() - added, same as above but returns an Integer version

MultiplyScalar() - added, multiplies a Point by a single value e.g. Point(3,4) * 4 would be Point (12, 16)

Subtract() - added, subtracts one Point Value from another

Add() - added, adds two point values together

Vector2FromPoint() - added, converts a Point value to a Vector2 equivalent

PointFromVector2() - added, converts a Vector2 value to an equivalent Point value


==============
New class Map
==============

Added a new class that is a starting point for tile based games (mazes etc...). This conatins some common functionality required, its simple now but will become more fully featured in future as I work on this. You should really inherit from this class so you can add extension fields and methods to suit the purpose of your map.

Map() - Constructor for a new Map, where you specify the width and height of a single tile in the map

LEFT, RIGHT, UP, DOWN - added, these should be used for stating and comparing directions in the map

tileMap - holds the tilemap for your level

collisionMap - holds the collision map for your level (if this needs to be different to the tilemap)

HeightPhysical - gets the physical pixel height of the map when drawn

WidthPhysical - gets the physical pixel width of the map when drawn

collisionBlocks - holds an array of integer values that specify differnt collision blocks (use these to populate your collision map from the image tiles held in your tileMap by defining the override method of the virtual method DefineCollisionBlocks.

width - holds the width of the tileMap in tiles

height - holds the height of the tileMap in tiles

collisionHeight - holds the height of the collisionMap in collision tiles

collisionWidth - holds the width of the collisionMap in the collision tiles

offset - holds the the x and y draw start position (if used) for the tilemap

tileWidth - holds the width of an individual tile

tileHeight - holds the height of an individual tile

actorStart - holds an array of points that can be used to specify the starting points of actors (objects) within your tilemap

DefineCollisionBlocks - a virtual method (that you need to implement) in order to create collision blocks and hence a collision map if needed

CreateCollisionMap() - a virtual method (that you can override) that takes the collisionblocks you defined in the method above and translates the tilemap into a collisionmap. The base function just creates a collision map of the same size, but if you override this you can easily make more complex collision maps if needed.

CentreLevel() - method which using either a rectangle of specifc width and height, to attempt to centre the tilemap within.

CollisionItemHere() - a method which interrogate the collisionMap to see of a particular value exists at the given location (you can look for a single or an array of values)

TileItemHere() - a method which interrogate the tileMapto see of a particular value exists at the given location (you can look for a single or an array of values)

TileLocation() - get the corresponding tile location given the pixel (x,y) co-ordinates given

TileLeft() - gets the location of a tile so many position Left of the one given

TileRight() - as above but right

TileUp() - as above but up

TileDown() - as above but down

CollisionLegalMove() - determines if a proposed move from a specific tile will be legal, by examining the collisionMap

TileLegalMove() - as above but looks at the tileMap

Contains() - determines if a single integer is within an array of integers

CollisionValidDirections() - returns an array of valid directions from a given collision tile location by looking at the collisionMap

TileValidDirections() - as above but looks at the tileMap

PositionFromTile() - returns the X,Y pixel position of the top left corner of the specified tile

ActorPosition() - returns the tile the centre of an actor is occupying based on its pixel position

ActorAtCentre() - determines if the actor is near the centre of a tile within a certain tolerance

SetAtTopLeftOfTile() - places an actor sprite at the top left corner of the given tile, you need to be aware of sprite alignment mode to get the effect you want

SetToCentre() - as above but places the actor at the centre position of a given tile

CollisionDirections() - returns a list of directions from a given tile where a list of tile types exist in the collisionMap

TileDirections() - as above but looks in the tileMap



==============
Sprite
==============

Associations - added, a list of objects can now be associated with a sprite, this allows you to store references to any types of data you wish. You need to manage this yourself though. I have left SpecialObject (for back compatability) but it should not need to be used anymore

Game Engine3 buglist

This post will be continually edited so we can keep track of possible bugs and glitches:

Any you think you find should be posted as a comment onto the bottom of this post. I will delete comments as I fix the bugs, all bugs will be listed with the person who found it.

Please only post comments for the latest version of the engine:

Known bugs
=========
bug id
Description
spotter
status
EventManager:006
Events don't Pause when using Pause()
[me]
5.14
EngineManager:021
Not a bug a mistake by Rhys Point in First Sprite appears to not align properly[Rhys]
openclosed
Bin:001
Bins not working properly during collision testing when outside default viewport. Probably related to something I changed ages ago but never properly tested with large play areas.
[me]
5.10
EngineManager:020
System font is not correct, has artifacts below text
[me]
5.10
TextManager:004
Rotated text does not start where you think it should. Needs to use X and Y as rotation anchors, based on alignment mode. This is incredibly complex and requires a complete from the ground up re-write of the text rendering system.
[me]
open
TrackManager:003
Set direction to -1 when moving along track was not making sprite follow track in reverse (and it should)
[me]
5.09
TrackManager:002
crazy set of bugs forcing EndTrackAction.reverse to do double wrap motions !
[me]
5.09
TrackHelper003:
Last point getting zero z value in SineWaveSimple, SineWaveComplex
[me]
5.09
TextManager003:
Line wrapping not resetting when ~ line break characters detected
[me]
open
EngineManager019:
PointInFirstSprite (all version) don't work if some sprites don't have types
[me]
5.08
TextManager002:
Sprite attributes that don't explicitly Show a sprite are not working (KillAfter(1) not working but ShowAfterKillAfter(0,1) is)
me
5.08
Audio003:
Some sound effects are generating multiple instances - don't know why yet????
[me]
closed
EngineManager018:
In update Sprite clears can crash engine
[me]
5.08
Audio002:
RemoveAllManagedEffects crashing, when effects duplicated
[me]
5.08
Audio001:
PlayEffect doesn't work for more than a game loop
[me]
5.08
Timing002:
Chained TimingActions are elapsing immediately
[hope]
5.07
Menu004:
Centre tag alignment doesn't take account of text alignment
[me]
5.06
TextStore003:
Renderlength crashing with ~
[me]
5.06
EngineManager017:
Sprites are intermittingly flickering
[Richard Brinkley/Dan Barratt]
4.06alpha
EngineManger016:
Collisions are broken again!!
[Richard Brinkley]
4.06alpha
Timing001:
Zero based timing actions never occur, timing is slightly out with certain
[me]
4.05
TrackManager001:
TrackPositionNear is picking the correct physical position but not setting sprite at correct position on track
[me/Paul Smith]
4.04
EngineManager015:
Collisions still busted, I know why it's because I have part built the new collision system, this will be fixed in 4.03 when the 2nd phase of the collision system is active.
[Richard Brinkley]
4.03
Menu003:
Tag alignment modes other than centre don't appear to work with consistently
[me]
4.03
EngineManager014:
Collisions appear to be completely and utterly busted?
[Richard Brinkley/James Richards]
4.01
TextManager001:
Sprite attributes not working and disabling text sprites
[Blake McConigle]
4.01
Menu002:
SelectItem(number) does not check that the menu item exists letting you set stupid values
[jamie marshall]
4.00
Limit001:
Bounce is working odd at top of limit boxes
[patrick gudge]
5.04
EngineManager013:
GetFirstSpriteOfThisType() crashes due to same issues as EngineManager012
[me]
3.19
TrackHelper002:
CloneSmooth can go a bit mad under certain circumstances (TrackerHelper.Smooth works though so use that), need to investigate the LERP functions available.
[me]
open
EngineManager012:
RemoveFirstSpriteOfThisType crashes if type not found, may effect some other items
[Jamie Marshall]
3.17
TrackHelper001:
Tracks created over a large number of points are not reaching the specified end point
[Paul Smith]
3.17
EventManager005:
Events using RaiseUntil only run once if used again and not for full period
[Adam Street]
3.16
EngineManager011
Draw crash when moving between screens
[me]
3.16
EngineManager010
Killed sprites not removed from bins
[me]
3.16
EventManager004:
Events don't initialise if elapsed and removed once
[me]
3.14
EventManager003:
Non auto resetting timers do not elapse
[me]
3.14
EngineManager009:
KillFirstSpriteOfThisType()) doesn't work
[me]
3.14
EngineManager008:
RemoveFirstSpriteOfThisType() doesn't work
[me]
3.14
EngineManager007:
GetFirstSpriteOfThisType() doesn't work
[me]
3.14
Sprite003:
Friction is not working
[various]
3.14
EventManager002:
All event names coming back with same internal name
[Dan Barratt]
3.13
AnimatedTexture001:
Animation mode not switch from OnDistance to OnFrameRate when issuing AnimateOnFrameRate() after previously doing AnimateOnDistance
[Blake McConigle]
3.13
EngineManager006:
Error in Layer rendering, when removing all layers occuring causing crash at base.Draw()
[Dan Barratt]
3.13
Menu001:
Setting a tag on track menu crashes
]me]
3.12
EngineManager005:
Bin and collision data always showing
[me]
3.11
EngineManager004:
Layers not rendering in correct order, bodge now removed and replace with full fix
[James Richards]
3.10
Sprite002:
Problem related to fix for viewport wrapping EngineManager002 seems to be affecting wrapping still
[Paul Smith]
3.13
TextStore002:
Sprite attributes are not applied to sprite text
[me]
3.09
EngineManager003:
Rectangle sprite debug is meaningless
[dan hudspeth]
3.07
FontBank001:
Some members are publically visible and shoudn't be
[me]
3.07
TextStore001:
Text drawing crashes if illegal characters involved
[me]
3.07
EventManager001:
ReturnValueForFrame is not working giving odd values
[me]
3.07
EngineManager002:
Sprites using viewport co-ordinate mode (default is world co-ordinate mode) are not displaying properly when viewport is moved and they are set to wrap within the viewport. I have a fix coming for this.
[Paul Smith]
3.07
Sprite001:
There seems to be a problem with the History system (seems a bit stuttery)
[me]
3.11
EngineManager001:
Collision system is well busted and is to be re-written.EDIT fixed thanks to stupid swap of X and Y co-ordinates in world settings of template (still needs re-writting tho')
[Dan Cotton]
not bug
TileSheet001:
TileSheet scrolling has a glitch if viewport is moved and texture tiled on it is not divisible by tile width/height. This only happens if you're texture is not divisible by tile size (which is defaulted to 50 x 50)
[me]
open

Tuesday, 1 March 2011

Engine 5.11 released

Engine5.11

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

changes in this release
=======================

==============
EngineManager
==============

altered EngineDebug setting for bin display so it needs to be explicitly set using engineM.EngineDebugShow(Debug.all | Debug.bins); or engineM.EngineDebugShow(Debug.bins);

this should stop you all having to turn off debugging displays

==============
Sprite
==============

CollisionBoxOffsetX - implemented, (was already there but not used) allows you to move horizontal offset of the collision hit area for a sprite

CollisionBoxOffsetY - implemented, allows you to move vertical offset of the collision hit area for a sprite

CollisionScaleFactorX - added, allows you to shrink or enlarge the collision hit area of a sprite.

CollisionScaleFactorY - added, allows you to shrink or enlarge the collision hit area of a sprite.

CollisionBoxColor - added, lets you set the colour for the collision box display (make sure you set a transparent colour)

CollisionBoxVisible - added, when set to true the collision rectangle of a sprite will be shown (default colour is transparent red)

=============
SpriteDebug
=============
StoragePoint - added, allows the display of the StoragePoint property

=============
TextManager
=============

ALPHABET - added, a string containing the alphabet, useful for building high score entry systems

SpriteGenerateCharacterSpritesList - added, just a rename of a previous function (CreateCharacterSpritesList) to keep in line with other character sprite methods