Answer Questions
oaix Can you access member variables dynamically?
I'm writing an input handler class and I'm writing a function to return true or false depending on if the requested button is down or not for the supplied player. At the moment I'm doing it like this: <code> switch (MyRequestButton) { case "A": if (currentState[player].Buttons.A == ButtonState.Pressed) { buttonDown = true; } break; case "B": if (currentState[player].Buttons.B == ButtonState.Pressed) { buttonDown = true; } break; </code> But what I'd like to do is something like this: <code> if (currentState[player].Buttons.MyRequestButton == ButtonState.Pressed) { buttonDo ...Show All
Autofreak . TRIDEX .VB.NET XNA update#9 Camera Pick component.......
hi guys just coded a camera picker component for the VB.net people.... Wow I luv components http://www.tridexconsultants.co.uk/pages/DirectxClasses.htm or direct file http://www.tridexconsultants.co.uk/pages/downloads/XNA%20VB.NET.zip ..Tridex ..... Hey Tridex, can you make sure you mark your announcements as comments so they don't show up as unanswered questions. Also since you are making a lot of updates , maybe you can just edit the post each time, or add a response to reduce the number of posts in the forum. ...Show All
vzzvzz Translating C# DirectX example to C++/CLI
Hi, I try to convert/use a DirectX C# sample in C++/CLI but got stuck on following C# statement: vb = new VertexBuffer(typeof(CustomVertex.PositionColored), 3, device, Usage.Dynamic | Usage.WriteOnly, CustomVertex.PositionColored.Format, Pool.Default); How would you convert this statement to C++/CLI I couldn't go farther than this. vb = gcnew VertexBuffer(CustomVertex::PositionColored::GetType, 3, device, Usage::Dynamic | Usage::WriteOnly, CustomVertex::PositionColored::Format, Pool::Default); Seems that I don't have the right equivalent expression for "typeof"... Any hint Thanks for help, Stephane ...Show All
AlanKohl Sprite Doesn't Animate
Alrighty, here we go again with another problem. I used to use a simple sprite sheet, but in recent days I have found I need to add some more functionality. My previous spritesheet class would load a sheet which had all frames have the same height and width. They were laid out horizontally, and the height and width were hardcoded. It worked, but I wanted to make a sprite sheet loader that could load and animate any sprite sheet, provided there was an XML document to explain where to look on the sheet. Thus, the actual frames can be anywhere on the sheet, in any order, just so long as the XML file is correct. So, I wrote that class. Now, come time to test it, the animation part of it doesn't work. Hard coding a frame to use shows that ...Show All
Tristany Drag and Drop
Hi I just downloaded XNA the other day. It looks pretty straight forward. However I saw a screenshot from Gamespot that shows XNA having something like a drag and drop IDE. Is that part of XNA because I cant find it Are there any tools available that can help amnage the assets like Visual3d.NET Thanks. In short, drag and drop used to be part of XNA, but that functionality has been dropped. Beta one introduced drag and drop GameComponent objects, but Beta 2 took them away. They no longer exist as drag and drop, but GameComponents are still availible. I doubt they'll come back in future releases. I hope it'll be the gift to our community in the next year XMas days, in the XNA 3.0 re ...Show All
RMD Emitters and Distance Question
Hi again everyone! Quick question regarding the implementation of the volume curve in XACT, and regarding emitters. 1) Is it wise to use one emitter and set it based on the current cue and shared by all the soud sources in the game or create an individual emitter for each sound source It seems to work alright with one emitter, a handful of critical sections and the like, but there isn't a lot of documentation in regards to its usage with multiple emitters. Advice willingly accepted on this one. 2) As for distance volume curves, I've played with a couple of things, but none of them seem to have any real effect on the volume based off distance. I started in the XACT Creation Tool, and played with the distance settings, making them smaller an ...Show All
yzhu Not installing the "xnagse setup"
When the setup is nearly finished a error message pops up saying Can someone help Thanks In Advance! It looks like you might not be installing under an Administrator account. If this is a personal computer you're installing to, try the Admin account. My account is the System Adminstrator and is the only account on the PC besides the guest account but it is not on. Any way I have just realised I am using a Windows Vista Transformation Pack that is not supported by it. When it is close to the launch of Windows Vista I will renew the PC so it is back to the normal operating system, don't worry about the topic! ...Show All
Peemik Best Draw method for game level (Quake 1 in XNA)
Does anyone can point me to right place for information on rendering my game when multiple textures are involve. I'm currently rewriting Quake 1 in XNA and I got he levels to load fine but its deadly slow. I do not use the vis yet so I render everything but its still should be pretty fast. If i render the level using only a single texture2d its pretty damn fast but for using multiple texture what I did is take all the triangles using the same textures and collecting them on startup. When im done loading and start to draw I loop in each of those triangles list, set the texture in my effect, fill the vertexbuffer and draw the primitives. thx for (i = 0; i < r_bsp.polygoneCollections.Length; i++) { if (r_bsp.polygoneCol ...Show All
mogens How to get XNA Game Studio for VS2005 Team Suite Edition????
Where to download it It's kind of silly to vote for this, since MS has already stated: 1. Why XGSE currently only supports C# Express. 2. That they are working on supporting other languages. 3. That the GSPro version will work with non-Express studios. If they already know it's an issue and they are already working on it, what is the point of voting in the feedback section Unless, perhaps, it just makes you feel better. Jim Perry wrote: "promised" Where and when were things "promised" Features are routinely dropped from games and applications due to time constaints. I don't understand the reasoning here. GSE was never, AFAIK, promise ...Show All
Antarctica Question regarding making landscape in 2D
My question is rather simple. I have a texture and a landscape map to apply it to. It is possible to make a rectangular sprite in XNA, but is it possible to cut a part from it Here's an example for better understanding of what I'm aiming for: http://img335.imageshack.us/img335/9972/examplent7.jpg The only way I can think of is to make a different texture for every sprite, changing its shape every time. But that really it not the easiest and smartest way... It sounds like you want to use alpha transparency on your sprite. I might be missing some context in your query, but use of alpha transparency will -- in effect -- cut out that part of the texture that you don't want. Most image editi ...Show All
Daniel15 LoadGraphicsContent - Is it right to load ALL graphics content at the start
Hi everyone, I'm just starting with XNA GSE and working on my first game. One thing that is puzzling me though is the LoadGraphicsContent. It seems in all the tutorials I've seen that everyone loads every single graphics resource inside this one function. This seems wrong to me for two reasons, the first is that surely this isn't the most memory friendly way of doing things. What if I have ten levels on a game all with different graphics, I only need one levels worth of graphics to be loaded at any one time so I don't want to hold the other nine levels graphics in memory. The second reason is that if there are a lot of graphics resources this function is going to get very large, I would have thought it would be better to load the content ...Show All
ArnsteinD Where is it?
I just downloaded xna after messing with c# for a while, and when I installed xna and clicked on the link in the start menu, it just went back to c#. My question is "Where is it " Was there something I missed Or am I doing something wrong Thanks for the support Check to see if you download the XNA Game Studio Express or just the XNA framework. You need the XNA Game Studio Express if you want to deploy to your Xbox. http://msdn.microsoft.com/directx/xna/gse/ Game Studio Express is kind of like a plug-in for C# Express. You use C# Express to create XNA games along with the Game Studio Express parts. When you create a new project you'll see the options for Windows and 360 games. That's ...Show All
mattdawg EffectPool with content pipeline
I make a lot of use of the EffectPool class to share parameters between shaders. Using the content pipeline, how can I still do this There is only a getter on the compiled Effect's EffectPool as far as I can tell. Could/Should there be a: Effect fx = Content.Load< Effect >("MyEffect",EffectPool); Cheers, Trev. The EffectPool member of all Effects I get returned from the content pipeline is null. Shouldn't this be a valid shared pool if that was the case Trev. The content pipeline loads all custom effects into a single shared pool. There isn't currently any way to specify different pools for different subsets of your effects. File it on Connect ...Show All
vkarthik Model Animation
I was wondering if there is any example code for model animation floating around yet I'm basically looking to do a simple walking animation via an .x file. I scoured the XNA documentation and was surprised to not find anything on this topic yet. From what I understand, it appears that the .X processor only loads static models. Your basically on your own to create a custom processor to store the data into your own animation storage format. Are there any plans for providing builtin support for basic animations (With the builtin XNA model processors) in the RTM Maybe I'm clueless and this process is more straight forward then I'm thinking. Looks like leclerc9 just posted what I'm looking for in the XNA Framework forum : http://f ...Show All
adorer Framerate decoupling
I'm trying to decouple the framerate from Update() so i can have more than 60 FPS. I saw this post with private void graphics_ModifyDevice(object sender, ModifyDeviceEventArgs e) { e.GraphicsDeviceInformation.PresentationParameters[0].PresentationInterval = PresentInterval.Immediate; } but couldnt get that to work... any help/ideas I know I'll have to use the ElapsedRealTime in my FPS code but not sure where to put it at. Well, if you take out all that code, then the Update method will be called in sync with the refresh rate of your monitor :) Try this. I don't have a good test case to prove its working, but with my limited testing, it seems to do what you are looking for. First, Add a handler ...Show All
