Answer Questions
gafferuk Custom Importers
I am confused about how to get these working. I have read posts, google results, MSDN, etc. but I am still confused about what do to to get a custom importer working. Anyone have any links to tutorials or source that I could take a look at Anything would be helpful Thanks There is a tutorial in Game Studio Express's help file that walks you right through creating a custom importer. 1) Start a new Windows / Xbox library project 2) Write a class with the ContentImporter attribute that inherits from ContentImporter (I don't know if this has to be a public class, I assume it does) 3) When finished, build the project 4) Create / Open your game project, go to project properties, XNA ContentPipeline as ...Show All
Jeff Green Swapchains?
I need to use multiple swap chains for my map editor, and a quick look in the XNA documentation revealed nothing on the matter. Alternatively, I could use a device for each window handle, though this seems like a huge waste of resources. Is there a way to do this that I am not aware of I believe this was answered here: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=890257&SiteID=1 If you manage the GraphicsDevice yourself rather than using the Game helper class, when you call Present you can give that an IntPtr containing the handle of the window it should present into, so you can use a single backbuffer to render to multiple different windows. Awe ...Show All
Chalagif Finding frames per second?
I've modified the starting program you create in the XNA help file to create 2500 sprites in random areas and bounce them all around... What I'd like to find out is how many frames per second my PC is getting just to see how many sprites I can have on the screen at what framerate. How would I go about finding my framerate and displaying it onscreen Help is much appreciated. Try this: int fps = 0; float total = 0; protected override void Update() { // The time since Update was called last float elapsed = ( float )ElapsedTime.TotalSeconds; total += elapsed; if (total >= 1) { System.Diagnostics. Debug .WriteLine(fps.ToString()); fps=0; total = 0; } fps += 1; // TODO: A ...Show All
hans24848 Visual Studio 2005???
Why should I have to install Visual Studio C# Express if I own the full version of Visual Studio 2005 Pro I have a much more advanced version of C# than the one offered in express. Somehow this logic does not make much sense to me. Perhaps the install need to look for some install of C# but recommend the express if no install is found That would make more sense. Jon Watte wrote: I find that I'm missing the Thread view, and the Attach to Process function, a lot more than the class view. You can design classes on a napkin, but you can't Attach to Process on a napkin! I didn't realise there is no thread view - that's really going to hurt . I don't know ab ...Show All
Edward__ D3DERR_NOTAVAILABLE while build of first example in help how to do
I used to code in pascal, cobol, assembly, basic, etc, but not C. From: Your First Game: Microsoft XNA Game Studio Express in 2D following along and doing the first build, I get the error above. I did not think I was calling the 3d engine only the 2d. I cannot find any help on the error, where to look, etc, except what is in the error window when you cursor over it. I cannot figure out how to copy the error in that popup window to look at it further. I know some dislike nubies, but please help if you know the answer. Its disheartening to type in only 6 lines of code and not be able to debug it! To say the least. Thanks OH OH OH, I figured out how to copy the error: Error 1 Building content threw InvalidOperationExcept ...Show All
Ragnvald Question about loading graphics
Does this load from disk twice or does it assign the data loaded into Background.tTitle already loaded in memory to MainMenu.tTitle Background .tTitle = content.Load< Texture2D >( "Content/Sprites/title" ); MainMenu .tTitle = Background .tTitle; If it loads from disk twice what is a better way to reference a graphic from multiple classes. Wonderful, thanks Jim. It doesn't load from disk twice. ...Show All
Price Brattin What should i use?[2d tile based orpg]
Summary I am Working on a ORPG in C# and need to know what is the best way to draw the tiles to the screen, and what i should use. Detailed I am currently working on a online role playing game (here in called ORPG) in c# , and am having a problem with the fps; it is less then 1 per second. Currently i am doing this simply by a redraw loop using graphics and two foreach loops to draw the pictures. How it is called The player logs into his account and chooses his player, the server will then send the tiles surrounding the player. It will then send the players data before sending a ConnectionSuccessful packet telling the client to draw the mainform and start the drawloop. The tiles are stored inside a linkedlist upon creation and co ...Show All
tork1 Video Tutorials
Dear, Where Can I Found Video Tutorials For MDX, DirectX and XNA Like That Found On www.learnxna.com Yes, I've not even seen paid for video tutorials. http://www.gameinstitute.com does paid tutorials, though nothing managed or XNA http://www.gametutorials.com/ has a CD you can buy with tutorials - no videos though. Also http://www.vicampus.com/ which used to be GameVersity - again I don't think any videos Even If Not Free learnXNA is the only ones like this I have seen for DirectX. Thx Alot Man ...Show All
Hoowah DrawableGameComponent.LoadGraphicsContent not being called
I'm not seeing any activity in my component's LoadGraphicsContent. Draw and Update are calling just fine though. I've pasted my sample code for this problem here: http://pastebin.com/844523 I've seen this approach used in other source such as the QuadTreeComponentLib and it appears to be working just fine. I'm using 1.0 of XNA. Well spank my bottom :) Thanks Clyde. I don't know why I didnt think to try that - I'll chalk it up to "new api blindness". Squee-D, Move your base.Initialize() in the your Game class as the last thing you do in your Game.Initialize(). XNA's base.Initialize() will call component.Initialize() for each component in it ...Show All
ZardoS42 XNA Coding Guide Basic Effect Help
I've been looking through the 3D graphics programming guide in help and I'm just really unclear about something. Using BasicEffect, I have this code basicEffectVertexDeclaration = new VertexDeclaration(graphics.GraphicsDevice, VertexPositionNormalTexture.VertexElements); basicEffect = new BasicEffect(graphics.GraphicsDevice, null); basicEffect.Alpha = 1.0f; basicEffect.DiffuseColor = new Vector3(1.0f, 1.0f, 1.0f); basicEffect.SpecularColor = new Vector3(1.0f, 1.0f, 1.0f); basicEffect.SpecularPower = 5.0f; basicEffect.AmbientLightColor = new Vector3(0.0f, 0.0f, 0.0f); basicEffect.DirectionalLight0.Enabled = true; basicEffect.DirectionalLight0.DiffuseColor = new Vector3(1.0f, 0.0f, 0.0f); ...Show All
o s l e 60 FPS - C# MDX
Is 60 frames per second significant to any settings in C# managed DirectX Or is this totally down to the hardware Not sure where you're going with this. If you're monitor has a refresh of 60 Hz you can have your rendering synch with it so you don't get what is called tearing, but other than that the number isn't significant. Thanks Jim, I was just wondering if there was something in DirectX purposely limiting it as to not waste CPU cycles. Perhaps not though. ...Show All
mamrg imagebox
is there anyway i can get a picture with the format .dds in a picturebox or is there any other way i can show a dds There are tutorial projects in the Feb 07 DX SDK that will show you how I believe. Download it here . I don't use DirectX. You might try asking on the DirectX 101 forum is it even possible If you mean a DirectDraw surface file, you'll have to get DirectX to draw it to an image first. this is the only thing i have left, pls help yes, how do i do that ...Show All
Matthew_Stevenson Basic Effect and Alpha blending
Just wondering if anyone knows how to make this do anything Setting effect.Alpha has no effect, but i fugure i'm probably missing something..... I am bascially tryin g to set an object to be 90% transparent when it is in front of the camera between the camera and the controllable character. Any ideas Cheers Cheers Shawn. I thought that all the talk of the Fixed function pipelines being dead that that applied to the Pixel processing world too. Cheers for that! N Pixel shaders replace a lot of the things that used to be done with the fixed function API, but alpha blending is still controlled using renderstates even when using shaders. Stencil and depth buffer are the same. These are areas where the hardware g ...Show All
Sumit_Dagar_8eba6d XNA Game Studio Express + DirectInput + Debug = A mess (LoaderLock)
For anyone looking to play with DirectInput (and possibly the rest of legacy DirectX - v1.1) to obtain access to features XNA doesn't support, be ready to receive a "LoaderLockException" from the Debugger when you start your app in Debug mode. The solution is covered here: http://www.thezbuffer.com/articles/304.aspx Along with links to pages and pages about why it happens and how it might someday be fixed, or was fixed and keeps coming back. In any case you want Solution #3: Disable the Exception in the Debugger. It's a Debugger-caused and Debugger-only Exception, so disabling it isn't hiding a bug from your users - it's hiding a Microsoft bug from you. ...Show All
Ivan F. Skripov Deciding where to land the main window when it's constructed
I have two monitors, one 19" CRT (main) at the right, and a 26" LCD at its left. So far, the XNA examples (the packaged one and some from people) have a tendency of making this window lie on both monitors. There's about 100 pixels laying on my left screen and the rest in the right screen. This makes it the program run VERY choppily, until I move the window fully into only one monitor. Also, while I'm accomplishing this moving task, the mouse cursor refreshes in windows about once per second, increasing the difficulty of that small task. I've tried doing: graphics.GraphicsDevice.Viewport.X = 10; graphics.GraphicsDevice.Viewport.Y = 10; but it doesn't appear as if I can. BTW, here's a quick exam ...Show All
