07 19th, 2007I try not to make a habit of including links on my blog, but this is really impressive. Physics are integral to almost any kind of game development. This site, myphysicslab.com provides excellent math for rubber-bands, springs, gravity, rigid body collision, impulse and inertia. What would be nice is to integrate this math into a base sprite class.
read comments (1)
07 18th, 2007It appears as if there is no timer available for Silverlight. I noticed two options that were utilized; one was using the Storyboard as a timer and another was using System.Windows.Browser.HtmlTimer. Although this causes an obsolete warning, it does work in Silverlight Alpha 1.1, and from some comments on a CodeProject page it looks as if some other timer will become available in the future. So for now I’m going to be using the HtmlTimer to provide the heartbeat for sprites.
1: using System.Windows.Browser;
2:
3: public class WorldBase
4: {
5: private HtmlTimer _heartBeat = new HtmlTimer();
6: private int _beatsPerSecond;
7: private DateTime _lastBeat;
8:
9: public WorldBase()
10: {
11: _lastBeat = DateTime.Now;
12: _heartBeat.Interval = 50;
13: _heartBeat.Tick += new EventHandler(_heartBeat_Tick);
14: _beatsPerSecond = 50;
15: _heartBeat.Enabled = true;
16: }
17:
18: void _heartBeat_Tick(object sender, EventArgs e)
19: {
20: //Update the BeatsPerSecond
21: _beatsPerSecond = 1 / (DateTime.Now - _lastBeat).Seconds;
22: //Provide a hearbeat for the world of sprites
23: ...
24: }
25: }
07 12th, 20071. Install “Microsoft .NET Framework 3.0 Redistributable Package”
2. Install “Silverlight 1.1 Alpha”
3. Install “Microsoft Silverlight Tools Alpha for Visual Studio codename “Orcas” Beta 1″ - 8.2 GB
4. Install “Microsoft® Silverlight™ 1.1 Alpha Software Development Kit (SDK)”
5. Optionally install “Microsoft Expression Blend 2 May Preview” - 25MB
After steps 1-4 you should be able to startup Visual Studio (Orcas) and create a new Silverlight project.