Well, it has been some time since I have posted here and the main reason is going back to school. But one thing I have discovered is a little C# Game programming thing called. MOGRE .
Mogre is a .Net graphics engine. Based on OGRE, the name is for Managed-Ogre. I found this very cool and promising. Besides have amazing graphics capabilities it is as easy as XNA if not easier. It also comes with extra add-ons like physics etc. Since Also I am an Windows only xna developer this seems very promising. This may end up replacing my primary platform for Game Development instead of XNA. But most likely the two will probably be put together to work on projects. If anybody has any experience with MOGRE please do comment and let me know your opinion.
P.S. As far as the plane game goes I'm thinking that may (As in this is not official) be put to death. Simply because I'm busy.
Thursday, January 24, 2008
Saturday, January 5, 2008
Audio Tutorial
When dealing with audio in XNA, Xact can be very frustrating so I've decided to write up a VERY short audio tutorial for Windows only. It can handle any audio file that Windows Media Player (WMP) can handle. Such file types are WMA, WAV, MP3, AVI, MIDI, AU, AIFF, and ASF. Why Windows Media Player you may be asking. Well that is what we will be using to play our audio files. I chose this because most people have it installed and it supports quite a few file types. And the best part is it takes only two lines of code to initialize. And one to play the file.
First start a new XNA project and go over to your left on the solution explorer and open up the references tab. Then right click the reference tab and click add reference. Then click and the COM tab. Scroll down to the bottom and click on Windows Media Player. Then press OK. On the right under the references tab you should see WMPLib. Then under the Content Folder add a new one to hold audio files. Mine will simply be called "Audio". Then right click that folder and click Add Existing Item. Then find whatever audio file that fits one of the formats above. I chose an mp3 called Mortal Combat Techno theme. (Odd I know but it makes pumping background music in a game.) Next click on it and go to the properties window. ( View Properties Window) Then change build action to None, and copy to output directory as copy if newer.
Now for the coding. That first section set up the project now to make it happen. Add the following line of code right above the game1 method.
//Our class refferal
WMPLib.WindowsMediaPlayerClass Sound_Player;
Now in the initialize method add these lines of code.
//create an instance of the class
Sound_Player = new WMPLib.WindowsMediaPlayerClass();
//Play the File Make sure to replace the URL with whatever your file is
Sound_Player.IWMPPlayer_URL = "Content/Audio/Mortal Combat Techno Theme.mp3";
And that is it if you did everything correctly your audio file should be playing. Also Inside the WindowsMediaPlayerClass you will find MANY more advanced options for audio. And as always Happy Coding!
First start a new XNA project and go over to your left on the solution explorer and open up the references tab. Then right click the reference tab and click add reference. Then click and the COM tab. Scroll down to the bottom and click on Windows Media Player. Then press OK. On the right under the references tab you should see WMPLib. Then under the Content Folder add a new one to hold audio files. Mine will simply be called "Audio". Then right click that folder and click Add Existing Item. Then find whatever audio file that fits one of the formats above. I chose an mp3 called Mortal Combat Techno theme. (Odd I know but it makes pumping background music in a game.) Next click on it and go to the properties window. ( View Properties Window) Then change build action to None, and copy to output directory as copy if newer.
Now for the coding. That first section set up the project now to make it happen. Add the following line of code right above the game1 method.
//Our class refferal
WMPLib.WindowsMediaPlayerClass Sound_Player;
Now in the initialize method add these lines of code.
//create an instance of the class
Sound_Player = new WMPLib.WindowsMediaPlayerClass();
//Play the File Make sure to replace the URL with whatever your file is
Sound_Player.IWMPPlayer_URL = "Content/Audio/Mortal Combat Techno Theme.mp3";
And that is it if you did everything correctly your audio file should be playing. Also Inside the WindowsMediaPlayerClass you will find MANY more advanced options for audio. And as always Happy Coding!
Tuesday, January 1, 2008
Happy New Years
Well first post I've made here in a while simply because the Holidays are a very busy time. Nevertheless the plane game is still on hold because I think I've realized that I just didn't know enough about XNA... yet. I've been taking tutorials... but I still don't know when I will have a version uploaded. Oh Well. And as always Happy Coding!
Subscribe to:
Posts (Atom)