Answer Questions
elemr Resource management
Hi, I was wondering if loadGraphicsContent can ever be called with loadAllContent=true except the very first time. The reason it's an important issue is that if it can, references can go dead, ex. if I load effect in Game1 and give it to object X, then Game1.loadGraphicsContent(true) is called and I have to reload effect, X's reference to effect is no longer any good. This can be solved with some simple indirection, but it would be nicer not to do that if it isn't necessary. I'm also curious if it's ever necessary to explicitly Dispose() a resource, such as a VertexBuffer, if it is created with ResourceManagementMode.Automatic, or if everything will be taken care of when it is garbage collected. Part of my concern is that I had a huge prob ...Show All
guilhermecvm94558 Issues rendering a triangle
I understand this is beta and the docs aren't complete, but the docs are very limited. I'm attempting to render a triangle to the screen and am failing. I was hoping for basic code as was provided with MDX. Currently I get a cornflower blue screen but nothing is rendered. I've attempted taking the vertex declaration out of a using clause, and that did nothing. Any ideas I figure I must be missing some setting somewhere. Here's my draw function: protected override void Draw() { // Make sure we have a valid device if (!graphics.EnsureDevice()) return; VertexPositionColor[] triangle = new VertexPositionColor[3]; triangle[0] = new VertexPositionColor(new Vector3(-1.0f, 0.0f, 5.0 ...Show All
Juliano.net SceneItem Improvement (?)
i got a bit frustrated by the fact that you can't do anything to a SceneItem once you call into it's Update() routine, so i made a small change that should help. i figured i'd share it in case anyone else finds it useful. inside the SceneItem.Update() method, you will find a foreach() call that runs through the list of sub-items. pull out that loop and put this in: List<SceneItem> lsi = this; //Update each child item foreach (SceneItem item in lsi) { item.Update(time, elapsedTime); } a good example of why you want this is when one objects wants to die but replace itself with another. calling Parent.Add(new Yada()) would normally cause an exception because you can't change a list from within a for ...Show All
AksaiGora How do you implement Fog into a scene?
Hi All, I have finally got some 3D up and running so things are whizzing about (which is always fun to watch... for a while, yeah I know, small things...) and I was wondering if anyone had any examples of putting fog into a scene. I tried last night and succeeded in turning all my meshes to white, not matter how far away they were from the camera. No matter what I did to the values, nothing changed. As always, any help is greatly appreciated. Cheers Shawn Hargreaves - MSFT wrote: LeeC22 wrote: More than 8 bits per colour component in an image format used in games, which format is that One of the biggest developments in the latest generation of games is the use of high d ...Show All
Akinja-Earl Looking for Custom Importer Example
Hi I am looking for a Custom Importer example or tutorial. The information in help-file is a little bit too basic. I want to know how to write a custom importer yourself. Thanks a lot. Best Regards Gerhard Check out this article/sample I wrote: http://codecube.net/item.asp cc_ItemID=341 It shows how to write a custom content importer/processer/writer/reader that imports a simple textfile with references to N number of textures. Please note that I haven't had a chance to upload a v1 version of the solution, so when you download it you'll have to reset the references to the XNA libraries :-) Results from a simple Google search. ...Show All
Michael-Renger Build for Xbox 360 and Windows in one project
I have created a Visual Studio project template that can be built for either Xbox 360 or Windows, by selecting the correct platform in the VS IDE. There's nothing particularly clever about this, it just uses some of the conditional abilities of MSBuild projects to merge the properties of an Xbox 360 XNA project with a Windows XNA project. There's a slight problem though - the VS Express C# IDE has, by default, disabled the build configuration and platform settings to present a simpler interface to beginners. In order to use this project template you need to re-enable these features and should probably have a reasonable understanding of what they do. This could be the reason that the XNA devs have mentioned that building for both platforms ...Show All
Tomsi Deployment and XML Content
I have been looking but have not found information on the deployment process as it applies to my app. I have a Media folder in my project in Visual Studio Express.. It has many subfolders. The texture, Shader, and Sounds all get exported to the "deploy" folder automatically and get deployed to the xbox. However, here is my problem. All my other folders custom mesh format folder(binary), Skeletal structures folder(binary), and XML settings files in sub folders get completely ignored on compile and export. (When The process puts the files into the deployment folder (at compile time) and also ignored when sent to the XBOX. ) What am I doing wrong All the files are in the project but anything that is not turned XMB gets igno ...Show All
pgems XNA and Vista?
Hi all, I know that officially XNA is not supported on Vista yet but I've also seen a few threads where people have said that they have it running on vista ok. Before I try it for myself I just wondered if I could get a response from some more people who have tried it to let me know how stable it is etc. Cheers, Dud Exactly the same hapens in RC1. Other than that, everything works just fine. I'll soon give RC2 a try Let's put it like this, after installing XNA Visual C# express no longer succeeded in shutting down for me and it will want to restart, so somewhat annoying to press that cancel button every time. But assides from that it runs perfectl ...Show All
Michael Wu xbox 360 shader support
Any one know what the maximum version of shaders the xbox 360 supports. XBox 360 will support Shader Model 2.0 and the specific 3.0 model (XVS 3.0/XPS 3.0) Thank you for the info. Hope the 360 docs come out soon. ...Show All
invantix FPS style camera movement???
Could someone please tell me where I could find a sample project (Complete code that works with no modification)that draws an object (any 3D object) and moves a camera around(Using FPS style controls with a mouse and keyboard). Any help would be appreciated. Well spotted Seraphio , missed that one in the official docs. Also check out this post , Mike36 has created a skydome project complete with free roaming camera, not had a chance to check it out properly as I only found it last night but looks very good. Also something called the Earth Orbit Demo, doesn't take much to guess what that is! Rgds Darkside I found some very interesting stuff while searching MSDN. Specifically, a direct article that teaches you how ...Show All
Jonathan MacCollum I cannot compile any XNA tutorials
I have Microsoft Visual C# express and XNA Game Studio Express, but when I create a new project and follow the tutorial (any tutorial) and copy and paste the code into a new project, i cannot compile because there are errors when i press F5. Example in tutorial 1: displaying a 3d model on the screen i follow all the directions and when i copy and paste the code at the end and hit f5 i get the first error in this line: myModel = content.Load< Model >( "Content\\Models\\p1_wedge" ); and i cannot continue. I have tried several tutorials in the past weeks and none run. I need help for doing this for school. Thanks That was it thanks. I'm used to just putting the image into the dire ...Show All
EdenR Creating a terrain using ContentPipeline and XmlImporter (or a custom importer / processor)
Here's my situation: I want to create a text file describing terrain attributes, like heightmap file (raw or an image format), colormap, detailmap and splatting maps. Only the heightmap file and format will be required in this file, so the colormap, detailmap and splatting maps are optional. I then want to add this file to my XNA game project and have it pack a .xnb file containing this data. Ideally, when I do this in my game's LoadContent method: Terrain t = contentManager.Load<Terrain>(@"Content\Terrain\Test"); I should get the terrain object back ready to use, with whatever options I set in it. I couldn't get custom importers and processors to work, so I'll come back to that later, but I did get XmlImporter working with ...Show All
Adminanup using C++ libraries with C# and 360...
Hey Guys, Up until now, all of my projects have been written in cpp. I had a pretty descent game engine written based upon Ogre3D and several other libraries but I kinda abandond the project when xna was released. Anyway though, Im currently still in the process of learning c# however, as soon as I have the language down pretty well, I want to go ahead and start recreating my game engine using xna instead. The only problem is, well, honestly, I'm just not good enough with my 3D maths and physics yet to create my own C# physics engine so I was hoping I could use the Novodex physics engine with C# although it's written in C++. Is this possible Can you #include the headers into your c# code Does the compiler still support c++ And last but no ...Show All
Pouyan clearing it up
so from what i understand the beta comes out on the 30th which is only for use on windows games. Then around this holiday season the full version of express will come out which supports windows and xbox360 use. And to share xbox360 game information you must subscribe to the xbox360 developers club service but you cannot sell your 360games with the express version. And then not untill somtime spring next year the pro version will come out which you need for selling xbox360 games. Is this all correct Also a couple questions i have. I read that you would not recommend the pro version for a small indie newcommers that its more for the established larger developer could you clarify on why that is so Also what most interests me is ...Show All
scottcable Torque X and C#
I was messing with Torque Game Builder and it seemed pretty cool, altough maybe a little TOO controled So here is my question, is it possible to take code from Torque X and edit it with C# I once again sorta answered my own question After DLing the Game Studio Demo, I learned that Torque actually has its own scripting language, that does pretty much all the hacky and cool code anyway, the only thing you cant modify is the rendering and phyiscs protocol, luckily, thats all done effeciently by the Torque Engine itself I MADE THE FISH SWIM AROUND, YEAH!! Torque is a really nice IDE, except I wish it had a better way of integrating scripting into the IDE rather than dropping out into text editor. If they did something like Visual Studio ...Show All
