Answer Questions
B.Young Trying to load an Effect, file .XNB not found.
I use a basic shader class to load an effect to use for my objects, but when i use [code] Effect _effect = loader.Load<Effect>(_path); [/code] I've got a file not found error. In the details of the error it says that the path/file couldn't reach the .XNB file and i'm supposed to load a .FX file Well I got my old project finally working on XNA 1.0. It compiles and runs the C# but seems to skip the part where it compiles the .fx files. Here is what my File Properties window says: ship.fx File Properties Asset Name: ship Build Action: Content Content Importer: Effect - XNA Framework Content Processor: Effect - XNA Framework Copy to Output Directory: Copy if newer File Name: sh ...Show All
Henry_Yang Get Screen Coordinates of Vertices?
Hey, I'm looking to obtain the screen (X and Y) co-ordinates of vertices. Whenever I move my mouse over a vertex I want to change it's color, but don't know how to compare the mouse position with my vertices. Any suggestions Thanks Hello, Perhaps you should obtain the vertices rendered on some X,Y screen coordinate instead of obtaining the ScreenX, ScreenY coordinates for all your scene's vertices. DirectX does this for you and calls it picking . As far as I know there is no such feature in XNA yet but here's a good tutorial on the subject: http://www.thehazymind.com/archives/2005/10/tutorial_9_picking_objects_fro.htm Cheers Joao Nogueira There are three ways of doing this: 1 ...Show All
gleason78 Dynamically casting an object of unknown type
Hello everyone! I think I've got a tough problem for you. I've got a List<object> full of various types of objects, and I want to grab an element from the list and cast it back as the type of object it actually is. Ideally, what I would do is something along the lines of: List<object> objects = new List<object>(); MyClass instance = new MyClass(); objects.add(instance); object something = objects[0]; Type somethingtype = something.GetType(); somethingtype variable = (somethingtype) something; this works fine except for the last line. Once I have the type of the object, I can't use that to either declare a new variable of that type, nor can I use it for casting (as far as I know). Does anyone know of a way to use Type info ...Show All
Computer Guy69146 Little question
I have one question : Can I create 3D fighting game like Tekken 5 with XNA Game Studio Express Thx Anything is possible with XNA, as you have to do the coding yourself, remember that XNA is not an engine all it is is a set of tools to get you started, you still need to do a lot of the work yourself. Of course you can. And if you try, you will make it faster, better and easier. Just take a try ! ...Show All
Eric H. Content Pipeline Type Environment Odditiy
Sorry this is likely to be a bit confusing, as its fairly complex... I have a Managed C++ Library (called Lua2ILContentImport) with a custom content pipeline in it, its has to be Managed C++ because it embed a fair chunk of old C code in it (Lua 5.0 for the curious), I also have a C# library (called Lua2IL) that runs on PC and 360 (a define removed some Emit calls on the 360, the rest is identical). Lua2ILContentImport reference Lua2IL with the define defined so that a Lua byte code to CLR IL system is enabled using Reflection.Emit. Now the product of the content pipeline is an assembly full of lovely IL that originally were Lua scripts. For testing I also have a tiny console driver that manually calls the content pipeline classes to make ...Show All
IBRAHIM ERSOY Getting started with DirectX and Visual C++ 2005
Hi, My setup environment is Windows 2000 SP4 and I'm using Visual Studio 2005. I'm looking to set environment for using DirectX with Visual C++ 2005. This morning, I tried but without success to install DirectX SDK using file downloaded from following link: http://www.microsoft.com/downloads/details.aspx FamilyId=C72D9F1E-53F3-4747-8490-6801D8E8B4EF&displaylang=en#Requirements Even if I verified that, under system requirements, Windows 2000 was listed, after downloading, I received the following error while trying to run resulting "dxsdk_aug2006" file: &nb ...Show All
Harald Hedlund graphics error
not sure i know what the problem is but when i run space wars it finds a line of code that says this .GameComponents.Add( this .graphics); and says it no suitable graphics device exception was unhandled Here is a thread where people had your same issue and the fix that worked for them. http://forums.microsoft.com/msdn/showpost.aspx postid=682322&siteid=1 The way it sounds from the thread, if the fix indicated does not work, then you will most likely need to buy a new graphics card that supports shader model 2. Definitely try the fix first though. Good luck! Yes, I'm getting the same error message. thanks ...Show All
S&#233;bastien Nunes Izzy545 mentioned on Major Nelson's PodCast
Hey, just informing you of Izzy545's game being mentioned on Major Nelson's PodCast. Congrats, Izzy545. Awesome, thanks for the heads up! I'll have to check it out Well done Izzy545, I feel like you and teh_programerer, are my LearnXNA Brothers, although both your games were better than mine :D. Major also mentioned xbox360homebrew.com -- I thougth about that domain but it was too long ...Show All
dlyle using DXUTTextHelper to output a string
I'm extremly new to Directx programming, and i've tried everything to get a std::string to output onto the frame. Hopefully you guys can help. I have it so std::string GetDetails() {...} returns a string (constructed with ostringstream, if that really matters) and returns oss.str() at the end. but I can;t figure out the conversion between std::string and wchar_t or WCHAR*. any help would be amazingly (thats right) helpful. Thanks. Use wstring instead or convert the string to a wide character array using a wchar_t array that can hold the data MultiByteToWideChar(CP_ACP, 0, wideString, -1, charString, stringLengthPlusNULL); wideString[stringLengthPlusNULL-1] = 0; ...Show All
D-- GraphicsAdapter.SupportedDisplayModes;
I'm using the code below to check the supported display modes of my adapter. DisplayModeCollection modes1 = new DisplayModeCollection(); modes1 = GraphicsAdapter.DefaultAdapter.SupportedDisplayModes; I've tried this code at work on a laptop and at home on a desktop (2 different vid cards) and each time the DisplayModeCollection is empty (count = -1). All the other members of the GraphicsAdapter class are showing up (driver version, name, deviceID etc. etc.). I'm trying to make a config panel template so therefore need to know what resolutions the user's vid card can handle. TIA, lushdog Ok works now, I've submitted the bug. Thanks for the help. Sis650 in the laptop, NV ...Show All
Jim Perry DreamBuildPlay is up!!!
Now go register!! Actual contest details to come the week of Feb 5th Count me as registered!!! Whoo Hoo! I don't really know any valid zipcode and phone number for the US, nor any address for that matter. Thanks for the advice, anyway! I guess I'll just have to wait until they fix this. U can't do it....U can't give wrong information, as it's violation of "terms of use": MEMBER ACCOUNT, PASSWORD, AND SECURITY If any of the Services requires you to open an account, you must complete the registration process by providing us with current, complete and accurate information as prompted by the applicable registration form. You als ...Show All
Krutika Nothing on the screen
Hi. First I will write my whole code, so it is eaiser to see where the error is (I dont know where the error is): #region Using Statements using System; using System.Collections.Generic; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Audio; using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Storage; using stlr.fonts; #endregion namespace WindowsGame1 { /// <summary> /// This is the main type for your game /// </summary> public class Game1 : Microsoft.Xna.Framework. Game { GraphicsDeviceManager graphics; ...Show All
Alex Farber AVI's missing from GameFest 2006 Presentations
Unfortunately I was unable to attend the GameFest 2006 presentations, but to my surprise I found they are downloadable from the Microsoft site However, the presentations refer to AVI files that are not included in the download package, most likely because they are huge. The presentations look rather dumb though without these. Are these AVIs lost forever, or can they be downloaded from elsewhere, or do they exist on CD/DVD Thanks, Peter Some AVIs, images, and slide material were removed at the presenters request. What is in the zip files is all that will be made available. ...Show All
Bobby Ma Game components
What is the idea behind the GameComponent class Will it be used for input handling and audio handling, so you won't have to use the keyboard classes and audio classes, or only for graphics and graphics extensions GameComponent is really just a kind of glue for packaging up functionality in a way that can easily be consumed by other developers. So it's mostly up to you guys what kind of components you want to write! We certainly have a lot of ideas ourselves, and will be shipping some as examples, but this is one of those areas where I'm expecting to be surprised by many of the things people think to do with it! Some components that we showed in the GameFest demo were a framerate display, a tit ...Show All
Bachi Files and endianness
Hello, First I'd like to say thanks to the guys at MS for being so open about the development of the XNA Framework and associated tools. The recent blog posts have been really excellent. At the moment for opening files I use File.OpenRead(). To read the data from the Stream it returns, I use Stream.ReadInt32() and so on. Obviously on my little endian PC platform, reading little endian data, there is no problem. But on the Xbox, does System.IO.Stream exist And if so, does Stream.Read*() do endian conversion on the fly Thanks again, Peter Shawn Hargreaves wrote: The main thing that changes when you go from a 32 bit to a 64 bit CPU is the size of pointers. But that rarely affects your code because .NET code doesn't tend to ...Show All
