Saturday, June 4, 2011

Core Updates.

Whilst working on the BadKid Game Engine I have made some changes to the Core Library.I hate working in radians so I have stated to introduce Units of Measure.
for example you can write
var z = Maths.TwoPi.ToTau(Angle.Radian);      // 1 cycle.
The Angle.Radian can be ommitied as it already the default parameter but be carefull the functions do not know the uom you are working with. they are assumed.

Easy setting of display modes. in BadKid GameEngine.
The base constructor is now as follows

public GameEngine(int width = Preferences.DefaultScreenWidth,
       int height = Preferences.DefaultScreenHeight,
       bool fullscreen = Preferences.DefaultToFullScreen)

So all you have to do is create a constructor such as
public MyGame():base(320,200){
Alternativly you can set the DisplayMode using and Display mode available in the DisplayModes enumeration.
DisplayMode = DisplayModes.First();

No comments:

Post a Comment