Using SlimDX, if you want to stop a sound which is currently playing via XAudio2, use the following methods on the SourceVoice object:
+At first, I had imagined Snowball, now located on Codeplex, to be a framework which would define how your game objects look. I.E. I had a class called GameEntity which I imagined would handle a lot of boiler plate code for you such as setting up Initialize(), Update(), Draw(), etc.
+I've decided to move away from that and let Snowball purely focus on the subsystems of a game, such as Graphics, Sound, Input, etc. Extending from the Game class completely sets up these aspects of your game for you. I think I will include helper components, such as a collision detection system, but I will not force you to use them.
+Using SlimDX, if you want to stop a sound which is currently playing via XAudio2, use the following methods on the SourceVoice object:
sourceVoice.Stop();
sourceVoice.FlushSourceBuffers();
-At first, I had imagined Snowball, now located on Codeplex, to be a framework which would define how your game objects look. I.E. I had a class called GameEntity which I imagined would handle a lot of boiler plate code for you such as setting up Initialize(), Update(), Draw(), etc.
-I've decided to move away from that and let Snowball purely focus on the subsystems of a game, such as Graphics, Sound, Input, etc. Extending from the Game class completely sets up these aspects of your game for you. I think I will include helper components, such as a collision detection system, but I will not force you to use them.
I've decided to make the switch from using git to Mercurial. Git's syntax to me is much more complicated than it needs to be and Mercurial seems to be more my style. I find it's much easier to find out how to do things with Mercurial and to be honest, I use about 10% of the functionality in either git or Mercurial.
This also means I'll be transitioning Snowball to Codeplex I think. I'll be moving it away from GitHub for sure just not 100% sure where.
In Snowball I was debating adding an empty interface to identify certain classes in my framework as components. I wasn't sure if this was code smell or not so I did some searching on Stackoverflow and found out this concept is actually called "Marker Interfaces". Learn something new every day.
diff --git a/blog/page15.html b/blog/page15.html index 3e6ee230..8d4242e0 100644 --- a/blog/page15.html +++ b/blog/page15.html @@ -91,7 +91,7 @@ } } -I started experimenting with OpenTK and I had to look in a few places to put this code together, so I'm posting it here for anyone who might be looking for an easy getting started lesson.
+I wrote my second OpenTK app. This time I'm drawing a sprite which you can move around the screen using the keyboard. I've included the source code after the jump or you can download it.
Read MoreI started experimenting with OpenTK and I had to look in a few places to put this code together, so I'm posting it here for anyone who might be looking for an easy getting started lesson.
I've set up a window similar to what I've been used to in Xna (CornflowerBlue 4 life). I've also set up a 2D projection matrix and drawn a triangle in a 2D fashion. You'll need to add a reference to the OpenTK assembly for your project in Visual Studio.
using System;
using System.Drawing;
@@ -144,4 +144,4 @@
}
}
-I wrote my second OpenTK app. This time I'm drawing a sprite which you can move around the screen using the keyboard. I've included the source code after the jump or you can download it.
Read More