Thursday, 26 November 2009

Engine3.06 released

Expect more changes to come quickly to start with as bugs are found.
This version will be live by 9AM 27th November 2009
Template will be updated accordingly and so will the dll and xml files on the student shared game programming resources folder

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

EngineManager
-------------
fixed - TrackDisplayOn(), integer arithmetic bug on history stepper

added - TrackDisplayOn(trackDefintion, number of points), this allows you to specify how many points are displayed on the track. Do no use excessive numbers as this will kill draw speed, use enough to see your track clearly. You can still use TrackDisplayOn(trackDefinition) for default number of points displayed.

Note: I will be depreciating TrackHelper.Draw() as this is a repeat of this code with complications.

Sprite
---------
altered - Update(), so it records the last position of the sprite once its started updating. The last position is only recorded when a sprite is updated.

fixed - last position, used to rely on history positions as all sprites generated at least 2 history positions. I forgot that I removed this feature so implemented a lst position.

SpriteHelper
------------
fixed - RotateFacingVelocity(), using fix for last position of sprite

fixed - RotateFacingDirectionMoving(), using same fix as above.

added - ScaleToThisSize(), calculates scale factors to change a sprite to fill a rectangle (you can calculate this yourself tho')

added - ScaleToThisWidth(), calculates X scale of sprite to match the width given, keeps aspect ratio the same so scales Y accordingly.

added - ScaleToThisHeight(), calculates Y scale of sprite to match height given, keeps aspect ratio the same so scales X accordingly

Tuesday, 24 November 2009

Engine3.05 released

Expect more changes to come quickly to start with as bugs are found.
This version will be live by 9AM 25th November 2009
Template will be updated accordingly and so will the dll and xml files on the student shared game programming resources folder

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

Sprite
---------
fixed - Update(), stupid bug that stopped animation from updating if only 2 frames defined!!

improved - SpriteDebug.physical, added Gravity and Friction properties to go along with Mass

TileSheet
---------
fixed - Draw(), bug that tried to draw tilesheets with undefinded areas (no tiles present)

I am currently working on a substantial re-write to the tiling and rendering of tilesheets that will fix a lot of remaining issues with them.

Monday, 23 November 2009

Engine3.04 released

Expect more changes to come quickly to start with as bugs are found.
This version will be live by 9AM 23rd November 2009
Template will be updated accordingly and so will the dll and xml files on the student shared game programming resources folder

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

EngineManager
-------------
added - resAndWorld to Debug settings, this shows the current resolution and the current world dimensions.

adjusted - physical implementations of layers to simplify internal structures.

GravityWell
-----------

adjusted - GravityWell() mass is now specified in GigaTonnes (billion kilograms) to reflect changes to point mass gravity simulation.

TextureProcessor
----------------

added - MassFromPixels(), counts the number of non transparent pixels in either the given sprites current frame or in the given texture and rectangular region given. This will only work for textures that were loaded through the TextureProcessor.

Wednesday, 18 November 2009

Engine3.03 released

Expect more changes to come quickly to start with as bugs are found.
This version will be live by 9AM 19th November 2009
Template will be updated accordingly and so will the dll and xml files on the student shared game programming resources folder

Changes in this release include:

EngineManager
=============
altered - altered the way sprite layers are managed and rendered, this now allow you 4 independant sprite layers as well as a HUD and SpriteText layer. Sprites by default are assigned to layer0 which is rendered first, but you can opt for layer1, layer2 or layer3 (being the last of the four sprite layers rendered)

This has a knock on effect for layer displacement, a mechanism that can shift all items beloning to a layer - perfect for shake effects
---
removed - DisplaceHUDLayer
removed - DisplaceSpriteLayer
removed - DisplaceSpriteTextLayer
removed - DisplaceTextLayer

added - SpriteLayerOffset(), specifies an amount to offset the position of all sprites or text on the layer specified

added - SpriteLayerDisplace(), specifies an amount to add on to the current offset position of the layer specified

added - SpriteLayerGetOffsetX(), gets the X value of the given layer offset

added - SpriteLayerGetOffsetY(), gets the Y value of the given layer offset

added - SpriteLayerGetOffset(), gets the offset for the given layer
--
added - TrackDisplayOn(), this does the same as the Draw() method of the TrackHelper, but only requires a track reference, so it looks neater

added - TrackDisplayOff(), this will remove a track that is currently being displayed. if the track isn't being displayed it does nothing.


Event
=====
renamed - SpecifyEventHandler() changes to OnTick()

added - Ticks, property that keeps track of number of timers an event has elapsed

added - TimeRemaining, property for debugging purposes that tells you how many seconds are remaining for those events that have a time limit

added - OnKilled(), lets you specify a subroutine to call if the EventManager kills your event. This will happend if you added it to the EventManager using either AddEventRaiseUntil() or AddEventRaiseOnce(). This is perfect for shake effects or for countdown events such as highscore entry, you would have a one second event to keep track of the time and have OnKilled run a subroutine when time say 30 seconds elapses, this can leave the high score entry screen.


EventManager
============
added - AddEventRaiseUntil(), this lets you specify a number of seconds that an event is to be active before being automatically removed, useful for shake effects after large explosions (for instance you may have a boss sprite on a separate layer to all other sprites and want this to shake for a couple of seconds when you have done a serious bit of damage)

Enum changes
============
renamed - SpriteDebugInfo changes to SpriteDebug

renamed - CollisionAction.alignMovingBounce changes to CollisionAction.movingBounce

completed - all enums are now fully xml commented, that's 1750 lines of code sorted phew !

Alignment
AnimationMethod
Bin.Type
CollisionAction
CollisionMethod
CollisionMultiHit
CollisionState
CollisionType
CoordinateSystem
DeathAction
Debug
Direction
DirectionAccuracy
EndOfTrackAction
EnergyBarDirection
Fade
FrameDirection
GravitySystem
LastFrameAction
LayerType
LimitAction
MenuSelectMode
MenuType
MovementMode
Shape
Side
SpriteDebug
SpriteType
TagAlign
TagDisplay
TrackStepMode

just another 19000 lines of code to go in 61 class files :(

Monday, 16 November 2009

Engine3.02 released

Still Loads of xml comments still to be written/re-written to reflect all changes. I have updated the template to reflect the recent changes. Expect more changes to come quickly to start with as bugs are found.

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

TrackHelper
===========
added - full set of xml comments now added so all intellisense and Metadata will show the help I have written

renamed - changed a few of the method names to better reflect their function

added - Draw(), this enables you to see a track on screen, you need to create a simple sprite to show the track positions and store it in the Marker property of the trackDefinition

TrackManager
============
added - AddTrackStartAt() associates a track with a sprite and translates it to the given position. This may be particularly useful for bullet patterns.

xml intellisense now available for Engine3

I have worked out how to allow you access to the xml comments (which drive the intellisense help) embedded in the Engine3 library.

The intellisense will give you access to all the help and guidance information I have included within my code. I will also publish the xml comments as a website (this is how the Dynamic help system works in Visual Studio).

The comments need a little work, but I will post progress in updating them here.

Engine3.01 released

Loads of xml comments still to be written/re-written to reflect all changes

Changes in this release
================
I will always list the changes under the classes that have been affected (I will keep them in alphabetical order)

EngineManager
==========
added - if you show any engine debugging information the version of the engine you are using is displayed.

LayerManager
==========
renamed LayerAdd() to Add() - this will affect Adam and Joe

TextManager
=========
added - TextManager.DrawQuick(), this allows you to draw no frills text, horizontal with colour,scaling and alignment. This is very much faster than the standard text drawing routines (which do a lot of complex formatting and rotating).

developed - Done some speed ups of complex text rendering methods still lots of room for improvement. (edit)

TileSheet
=======
implemented - ScrollScale factor when moving layer with viewport position. This already happened automatically when scrolling was applied to a TileSheet.

investigate - Draw() draws too many tiles still, need to work out full calculation so we can keep tiles drawn to a minimum, this is a problem with non regular size layers

TrackManager
==========
developed - TravelWithSpeed works but needs some work as seems disproportionate with different tracks pixel lengths!

fixed - moving between tracks now works out where you will join a track rather than place the sprite at position 0 (or end position).

Friday, 13 November 2009

C# back end database engine started

I have made a start converting my old VB database engine over to C# to use with your websites. This will hopefully (you may need to do some complex things yourselves) enable you to concentrate on the logic and aesthetics code rather than some of the more serious complications.

I will let you have access to it as soon as I have done some more testing.

Engine3.00 and GameTemplate live

I have made available the first version of the new game engine.

This can be found in the game programming resources folder in student shared

Student shared\0Applied ICT\Game programming resources

There are 2 items in this folder of interest

The first is the GameTemplate folder. This entire folder should be copied into your home drive (or onto a USB stick - make sure you make backups of any work on USB sticks!!!!).

The current template is not complete (it needs audio files adding among other things), this will update over the next few days as I bed the template down.

The other file (which is included in the GameTemplate) is Engine3.dll. This file is the compiled version of the game engine. You will only need to access this when I make bug fixes to the engine. I will explain more about that when it happens.

Tuesday, 10 November 2009

Engine up and running on XBOX 360 !

I have managed to get my new engine library running on the XBOX360.

Done some tests at 1280x720 (720p resolution) throwing around layers and sprites while playing 720p video and it seems to run above 60fps. You could potentially use a video as a background during your game but I wouldn't then draw hundreds of sprites at the same time with collisions.

One performance problems to note is text rendering. The text renderer is quite complex and can do some very complex formatting. There is a massive speed hit on the XBOX360 when drawing even the debug text. I need to investigate the possibility of provided some quick render options for horizontal/rotated text with no complex alignment issues.

I need to do a little more testing (especially viewport scrolling and automatic layer scrolling) and then I should be ready to put together a sample project to get a view alpha testers breaking things.

Wednesday, 4 November 2009

{new engine benchmarks} Current game engine benchmarks

I have completed the 1st phase of the engine re-write and have calculated some benchmarks for those part of the system that are currently working. As soon as the collision engine is up and running I will be able to post the other benchmarks.

126
Testing of old game engine 16u7 compared to Engine3
Benchmarks with random scrolling layer (800x2000) 640 tiles 252 tiles shown Sprites at 1/3 size 72 pixels down to 21.6 pixels
History recorded
Old Engine
New Engine
best fps
best fps
210 bouncing sprites bin display
50
175
185
210 bouncing sprites no bin display/collisions
50
197
378
210 bouncing sprites with 50 history (10710 sprites)
50
19
30
210 bouncing sprites with 50 history (10710 sprites) no bin display/collisions
50
19
34
210 bouncing sprites bin display
default (10)
184
188
210 bouncing sprites no bin display/collisions
default (10)
196
386
210 bouncing sprites with default history (2310
drawn sprites) bin display
default (10)
67
94
210 bouncing sprites with default history (2310
drawn sprites) no bin display/collisions
default (10)
69
126
1400 wrapping sprites
default (10)
88
115
1400 wrapping sprites colliding no display
default (10)
30
36
8400 wrapping sprites
default (10)
15
19
4200 wrapping sprites colliding no display
default (10)
3*
4
8400 wrapping sprites colliding no display
default (10)
2*
2

*These numbers are dodgy as visual inspection would suggest that the old engine is only drawing a frame every couple of seconds. Also all the sprites are sat on top of each causing over 1, 500, 000 collision checks are performed for each frame.

You can't really expect every game object to interact with every other game object.

The data shows that in terms of drawing and updating speed the new engine is very fast compared to the old one, but text drawing (which happens a lot with bin displays) is still slow. I'll investigate this at a later date.

A few more tests and checks and I'll publish the game engine and a game start template.