Answer Questions
TkNeo Vector to rotation, ie - point models 'forward' to their direction.
Imagine you have a model of say a plane, with a position (x,y,z) and a vector for it's movement. On each update you're adding the movement vector to the position - ok easy enough. You want to have the plane model always be rendered to move with it's nose forward. is there a simple way to translate the movement vector into corrolating rotation x,y,z. My high-school cartisian trig is a bit sketchy, but as I recall on a 2d plane from a normalized vector it would be like rotation.x = csc(y/x) (i probably have the trig identity wrong,but you get the geist of it). Want to translate normalized vectors v(1,0.5,0) into a rotation so models are facing the correct way for their movement. - anything built into xna for this hm.. so so ...Show All
MKBender Quadtree project
I have started a Quadtree project. It can be downloaded at http://www.codeplex.com/quadtreeload I would be interested in comments on the direction I am taking on the Quadtree DrawableGameComponent. I have included a test program called JoshGameXNA. But, open the QuadtreeComponentLib solution and just set JoshGameXNA project as the startup project. Excuse my C#, but I'm new to it. Any construction comments are welcome. It's seems you may have to click on "more releases" to get to the "Special Build 0.1.1" project. Not sure why..... It seems the project JoshGameXNA.csproj is still referencing your custom importer even if this is not visible within the IDE. In the file is this line <XNAProjectContentPipeline ...Show All
some1sxi Scripting module for an XNA game, using LISP
I've written a small LISP interpreter, which you can drop into an XNA game. While you can develop code pretty quickly in C# itself, the problem with that is that it can't be changed at runtime, and Reflection.Emit is not availabe on the Xbox. Thus, a higher-level, text-based script language can be useful, because it allows development while running. Release 1 is functional, and can be integrated into a game by binding functions into the interpreter, but doesn't have many frills at all. If it works out well in my test project, it may get developed more, and receive updates. You can get the source (MIT license) at: http://www.mindcontrol.org/~hplus/xna/lisp.html ...Show All
Nigel36 New DirectDraw.Device() Error
Hi I just started to program with DirectX, and i figured the best place to start is with DirectDraw. But when i'm creating a new DirectDraw.Device object, i got LoaderLock error. I've search through the web and got a basic idea of what that error is about, but I still doesnt know how to solve the problem Private DrawDevice As DirectDraw.Device DrawDevice = New DirectDraw.Device() I got the LoaderLock error when trying to create a new device, can anyone tell me how to get around the error thank you A quick search for "Loader Lock" yields: http://www.thezbuffer.com/articles/304.aspx ...Show All
Flame Thrower Playing (avi) video's in XNA?
I would like to play a little into-video before my game starts, its simple and small and it's an avi (though I could easily change its format), how do I play it with XNA MDX used to have AudioVideo playback, but I can't find that in XNA. Joel, I'll definitely be watching for this one! This is one of those things that is sorely missing from XNA, it seems like a no brainer for inclusion in the framework. I hope you get an answer soon too! my thought would be, if you want it to work on xbox, you're going to have to write your own content importer for the avi file itself. then manually extract each frame of the avi and sync up your framerate to match the framerate of the ...Show All
windpuffs DT_CALCRECT in .NET
I've been trying to make a function to measure text for a long time now, I simply keep giving up and saying I'll come back to it later. It just dawned on me why I was having trouble. There is no DT_CALCRECT equivalent in DrawTextFormat. Is this an oversight or purposeful exclusion If the latter, what is the replacement Edit: I should also mention that DrawText doesn't quite do what I want. If I specify the text string "The quick brown fox jumps over the lazy dog" and a Rectangle of (0, 0, 100, 0) using 8pt Verdana, DrawText reports I need a height of 12. So I give it 12, and it reports 24. So I give it 24 and it reports 36, so I give it 36, then it finally says 36 (still). Sure I can use this method to calc ...Show All
Tom Hollander HELP Cant find my XNA Gaming Studio!!!
I downloaded C# and xnagse_setup and installed both but where do i go to start creating my games im really confused. PLEASE HELP!!! Click on the Start Menu and it should be under Start -> All Programs -> Microsoft XNA Game Studio Express -> XNA Game Studio Express. Click on XNA Game Studio Express and that should launch it for you. ...Show All
Lee Witherington What happens next?
GSE has been out a whole day, so you should all be over your 'death march' by now , and ready to tell us what you are working on now! Seriously though, isn't it about time you spilled the beans as to what GSP will be all about, and perhaps gave us some idea of how frequent the release cycle is going to be for GSE We're actively planning future releases ... and some are on vacation. :) Stay tuned. We want to share as much as we can and get feedback as early as possible but we're not ready to do any bean spillage just yet. That reminds me, I'm on vacation. Paul ...Show All
Anmol Ranka Using Static Members
In my projects, instead of passing the GraphicsDeviceManager and the SpriteBatch by reference to the constructor of every class that will need them, or directly to every method that needs it, I prefer making them both Public Static Members of my main class, thus being available anywhere in the program. I would like to know, is this a bad solution And if so, why is that I understand one of the reasons is portability. If I passed them by reference, then I could re-use those classes in other applications without any change. But consider that I'm using these classes for my own application only, and if I needed to use it somewhere else, the changes to be made are still minimal. On the other hand, by using the Static approach, both classes and ...Show All
Meso X Could C# be the future of gaming?
Since XNA is using C#, and is is a more intuitive language than C++, is it possible that in the future that C# will dominate, espessially in AAA titles. Could XNA be ushering a new way of programming in the main stream With the ability to use unsafe code in C#, I expect performance to not be an issue in any game other than cutting edge stuff. There will probably always be those that will prefer C++ over anything else, but I can see a move by smaller companies to C#, for the increased speed of development if nothing else. Hi Jeff, As some one who is a partner in a company (and lead developer) that produces enterprise high performance security applications, many of them in C#, I think you will be very surprised what you can ...Show All
Chrisull Do I always run the XNA Game on Xbox360 by my computer F5(C# express)?
After I had deployed necessary files to the Xbox 360. Do I always run the XNA Game on Xbox360 by my computer F5(C# express) Or just run the XNA Game on xbox360 without PC Yes, once you've deployed the game to your 360 you don't need the PC, unless you want to debug it. Can I run the game from My Games in XNA Games Launcher without PC any more You can run the game from My Games in XNA Games Launcher. ...Show All
Roger Jennings Reading Change in Mouse Position
I have an existing user input class that is based on Managed DirectX (MDX). In that class, I have two very important methods: GetMouseDX() and GetMouseDY(). Simply put, they just return the change in mouse position since the last frame was rendered (in other words a return of -4 from GetMouseDX() means the mouse moved left four units). I would like to drop this and go with a pure XNA solution, but the MouseState class in the XNA framework only has X and Y, corresponding to the position of the mouse cursor in screen coordinates. I can derive the change in position by subtracting the last recorded position from the current position, but when the mouse cursor smacks the edge of the screen this technique is a bust. I can counteract this by za ...Show All
Atul Kulkarni XNA framework for non C#
One of the great advantages of the .NET framework is that developers can work on the same project in different programming languages. As I'm reading about XNA, it seems that this will not be possible with the XNA framework. Will the only programming language that has access to the XNA framework be C# Michael Klucher - MSFT wrote: That's correct the XNA Framework is for Managed Code Development and runs on the Common Language Runtime which prevents a programmer from using unmanaged languages (C++) from using the XNA Framework. Managed C++, now called C++/CLI is something that could work with the XNA Framework. When you say C++/CLI, you mean the pure CLR mode Will C++/CLI mixing managed and native code work with XNA or n ...Show All
Yorker Libs and MDX
Is it possible to use C++ library files in XNA Like the .lib and .dll files And can you use MDX with the Xbox 360, or is it strictly XNA You can use C++ DLLs for a Windows game only using unsafe code I believe. The Managed libraries won't be on the 360 so you can't use them. Ok thank you. Gho5tFac3 wrote: Could you though use the DllImport attribute to incorporate unmanaged code into your 360 project When I look at the Xbox 360 mscorlib.dll[3.0.0.0] through the Object Browser, the attribute is in the Runtime.InteropServices namespace. No. I'm not sure why that's there but MS has already said that it won't work on 360 projects. Could you though ...Show All
chakravarthy_b Quickie Game and tutorial
Just started a blog here with links to some things. I'm hoping to have some more stuff done this weekend (depending on how much time the family wants from me ). You may want to cover GameComponent tutorial in your blog. See my post in my thread containing my code sample about inheriting GameComponent into your classes for drawing scenes and updating game logic. I'm actually working on that and game statement management now. ...Show All
