So the first weird thing that's bugging me is the mix of windows desktop and windows8 metro apps. When i alt tab i get all of the different apps running. Chrome has two versions, one for wen i use the metro icon to launch it, then another when i launch it from the task bar in the desktop. With a few different desktop apps and a single metro app running you can do this weird split desktop thing. I'm not sure that it makes a whole lot of sense just yet. Especially since you can use both sides at the same time.
Really weird. This is going to need some more development time by everyone involved. The apps need to have a sort of scrunched up in a margin mode so they can remain useful. Something to think about when making a metro app I guess.
The little column on the right is some other app... since it's all white, i don't know what it is...
Im blogging about all the stuff I find broken in my daily work making games using Unity or Unreal, Maya 2011, Modo, Photoshop and more. by the way, I love to hate >:)
Tuesday, September 11, 2012
Thursday, May 24, 2012
FarseerPhysicsXNA, just getting things to work.
So almost all of their documentation on codeplex.com refer to version 2.0, and using 3.0 a lot of functions seem to have been changed. Also, they forgot that a part of a release is documentation, so imo, they're far from done.
DebugView, why doesnt debugview work?
oh because their example refers to their sample project. Which would be great, if I had started with their project.
So now i have to either incorporate my project into their project or take parts of their overly complex sample project and incorporate it into mine.
Damnit.
DebugView, why doesnt debugview work?
oh because their example refers to their sample project. Which would be great, if I had started with their project.
So now i have to either incorporate my project into their project or take parts of their overly complex sample project and incorporate it into mine.
Damnit.
Monday, May 14, 2012
xna file updates in windows phone 7.1
getting models to load into the content
So i managed to get the model into the phone at least once, but from there on out when I update the fbx the model doesn't get updated. Having this issue is pretty annoying. Even more awkward, if I load in a different model, nothing is displayed at all, but the load function doesn't error. So what's going on? Is the model too big, too small, not enough documentation on how the fbx should be setup for me to figure out what's wrong with the model.
so
Debug.WriteLine("mesh info>> " + ball.Meshes.Count.ToString());
tells me that
mesh info>> 0
So even more annoying is that Visual Studio doesn't always like to re-process the model into it's xnb when the file is updated. I think it's deciding that the fbx's time stamp hasn't changed enough for it to bother. Annoying so i have to use an A and B to keep switching between the two so it'll pick a different file altogether to load to force it to load the model as a new model.
So it's running fine, I'm just finding that visual studio has a bad habbit of ignoring file updates when building the xnb files from the fbx files. annoying to say the least.
Interestingly enough though a primitive that's 1000 units across seems to be about the correct size to take up most of the center of the screen on the phone. 100 units is a small object on the screen. but my camera was 5000 units away, moving it to about 1000 units away from the origin made a big difference but the object is also a bit more distorted with perspective.
In anycase, if you're having issues with models updating then try changing the name of the file you're loading. seems like the file doesn't always update. when the fbx is changed.
So i managed to get the model into the phone at least once, but from there on out when I update the fbx the model doesn't get updated. Having this issue is pretty annoying. Even more awkward, if I load in a different model, nothing is displayed at all, but the load function doesn't error. So what's going on? Is the model too big, too small, not enough documentation on how the fbx should be setup for me to figure out what's wrong with the model.
so
Debug.WriteLine("mesh info>> " + ball.Meshes.Count.ToString());
tells me that
mesh info>> 0
So even more annoying is that Visual Studio doesn't always like to re-process the model into it's xnb when the file is updated. I think it's deciding that the fbx's time stamp hasn't changed enough for it to bother. Annoying so i have to use an A and B to keep switching between the two so it'll pick a different file altogether to load to force it to load the model as a new model.
So it's running fine, I'm just finding that visual studio has a bad habbit of ignoring file updates when building the xnb files from the fbx files. annoying to say the least.
Interestingly enough though a primitive that's 1000 units across seems to be about the correct size to take up most of the center of the screen on the phone. 100 units is a small object on the screen. but my camera was 5000 units away, moving it to about 1000 units away from the origin made a big difference but the object is also a bit more distorted with perspective.
In anycase, if you're having issues with models updating then try changing the name of the file you're loading. seems like the file doesn't always update. when the fbx is changed.
Friday, May 11, 2012
2D and 3D content in XNA
Drawing layers of 2D and 3D content in XNA on the Windows Phone.
private void OnDraw(object sender, GameTimerEventArgs e)
{
SharedGraphicsDeviceManager.Current.GraphicsDevice.Clear(Color.CornflowerBlue);
spriteBatch.Begin();
spriteBatch.Draw(background, mainFrame, Color.White);
elementRenderer.Render();
spriteBatch.Draw(elementRenderer.Texture, Vector2.Zero, Color.White);
spriteBatch.End();
Draw3DContent();
spriteBatch.Begin();
spriteBatch.Draw(cursorImage(), cursorPos, Color.White);
spriteBatch.End();
}
So this is a modified versuion of some code that i came to when drawing 2d stuff and 3d sutff using silverlight and xna for both 2d and 3d elements. The first chunk is going to be a begin and end for the background and some UI elements that are drawn in silverlight. then I have another function that has all of the 3d elements each chunk ending in mesh.Draw();
the last bit is to draw a silverlight cursor using xna sprite stuff since the cursor is animated and has several states.
I wasn't able to find an example of this anywhere so im posting it here.
Tuesday, May 1, 2012
generics and types
So today I came across
And to be honest, I have no idea what T really was. I assumed it had to do with typecasting, but wasn't sure exactly how it was used here. So it seems like it's a "name" and not a keyword, which is good since it's just a letter. But still, it seems like it's something that I needed to learn a bit more about.
Looking into my C# book I find a section on Generics which seems promising. My book says something about Generics offering better static typing, but from my past experience static typing just makes using variables more strict. I hate putting limitations on how easily i can use a letter or number.
Both of these things infer that you need to add
using System.Collections.Generic and possibly System.LINQ, but I commented the two statements, and the code still compiles fine with the <T> in the function. Not sure why that is since it's inferring that <T> is something that comes out of one of those two references. Am I missing something? why is this working without those two references?
public Diddly something<Diddly>(Diddly someValue)
{
Diddly squat;
squat = someValue;
return squat;
}
why, exactly, is that chunk of code valid C#? I'm not completely clear as to how Diddly is used and why squat can be Diddly. This all seems a bit weird to me. I'll have to experiment with that it all means. Microsoft says to use <T> and not <Diddly> just out of using standards, but to me T is no more descriptive than Diddly. I suppose they're trying to say that it's a T for Type, but why not just use <GenericType> instead of <T> for the sake of being descriptive or expressive as people like to say about C# and F# and the other # languages.
Adding in a debug line i get this...
So T is a string. a string type of string, which i'd imagine it should be. But why the <T> ?
So what if i turn all of the Ts into string?
This gives me this error and it tells me it doesn't like types as identifiers. So, that tells me that C# is actually looking at all of the instances of the T as a variable of some kind. But why? how are all of these things being used?
Visual studio has a helper that would like to tell me that to fix this the first place where T should be it's asking:
If it would like the T to be a class or type, but it just said it didn't want types. Either way, neither of those generated objects were valid.
This is confusing though, somehow this is valid? Why? <int> and <string> what are these and how do they work? Thought I was trying to learn something today, instead so far I'm just getting confused.
email sucks.
Oops
so i managed to forget that i still have an old email account. it's on my old server okita.com and it's really neglected. basically, it's rendered itself useless. And it's impossible to get the server to sort through the files so i can even clear out the in box.
I'm trying to get their tech support to clear the server's files for me.
so i managed to forget that i still have an old email account. it's on my old server okita.com and it's really neglected. basically, it's rendered itself useless. And it's impossible to get the server to sort through the files so i can even clear out the in box.
I'm trying to get their tech support to clear the server's files for me.
Friday, April 27, 2012
Audio Recording on Windows Phone7.1
Audio recording from the windows phone mic uses the XNA framework.
So when I added the audio calls it requires a GameTimer update which has a FrameAction function. This wasn't already in my app when i started because I didn't use the XNA game template.
So I'll have to add one, But I already added a Tick update function for updates. I wonder if this will overlap in a bad way...
right now im using:
_timer = new DispatcherTimer();
_timer.Interval = TimeSpan.FromMilliseconds(30);
_timer.Tick += new EventHandler(Tick);
_timer.Start();
for updates. so, possibly, i can switch that to being a GameTimer instead? giving that a try...
So, it looks like the dispatchTimer can be replaced with GameTimer and the functions in it do the same thing
_timer = new GameTimer();
_timer.UpdateInterval = TimeSpan.FromMilliseconds(30);
_timer.Update += Tick;
_timer.Start();
This is the new code, GameTimer() replaced DispatcherTimer() and UpdateInterval replaces Interval, and Tick was replaced with Update and rather than a new EventHandler i just add the name of the function thats going to be updated. Then I start the timer.
Does the same thing it seems.
BUT now im getting this crappy error:
A first chance exception of type 'System.InvalidOperationException' occurred in Microsoft.Xna.Framework.dll
An unhandled exception of type 'System.InvalidOperationException' occurred in Microsoft.Xna.Framework.dll
Additional information: FrameworkDispatcher.Update has not been called. Regular FrameworkDispatcher.Update calls are necessary for fire and forget sound effects and framework events to function correctly. See http://go.microsoft.com/fwlink/?LinkId=193853 for details.
seems like I need to add something... a short bit of reading I find I need to call it manually for some reason...
in my tick I added:
void Tick(object sender, GameTimerEventArgs e)
{
FrameworkDispatcher.Update(); // this was needed?
...
}
And that seems to have fulfilled what i need for calling the framework dispatcher... whatever that is.
so now it looks like i can get a buffer filled with mic stream data bytes. Golly, in the last four days I've only written about 480 lines of code. but every method was something I had to learn about.
hopefully, someone, other than me, found a line of code in this blog useful.
Subscribe to:
Posts (Atom)






