Answer Questions
ENDT Assets load in a thread
I am started a system of load of assets encapsulating in a thread the ContentManager. I can be loading assets in asynchronous way in parallel with the thread, or can loads asset synchronously when I need it in the main thread. I have several problems to continue with this system. If I call to LoadAssets from 2 different threads with equal asset at time an exception jumps. I have tried to put mutex and works well, but in synchronous way I must waiting finish the current request of the thread to be able to load asset from the main thread. I have several questions or doubts: If I make a dictionary with assets loaded to be able to call to LoadAsset, It's consistent with the ContentManager If the games were loaded of hard disk, I r ...Show All
Tom De Cort Is there any way to integrate XGSE into Visual Studio?
I have XGSE running in Visual C# Express. I know it isn't possible out-of-the-box, but are there any work arounds to get the designers and such into Visual Studio 2005 Professional XNA Game Studio Express is designed to be used with C# Express, anything outside of that is an unsupported scenario so we're not encourging people to try. Thanks! ...Show All
JXDOS Mesh.Split - how are the subsets configured
I'm wrestling with whether to split a large terrain mesh into subsets by separately creating each subset or whether to use the split function below: Public Shared Function Split( _ ByVal mesh As Mesh, _ ByVal adjacencyIn() As Integer, _ ByVal maxSize As Integer, _ ByVal options As MeshFlags, _ ByRef adjacencyArrayOut As GraphicsStream, _ ByRef faceRemapArrayOut As GraphicsStream, _ ByRef vertRemapArrayOut As GraphicsStream _ ) As Mesh() How are the resultant submeshes configured For example, take a mesh of 100 vertices and split it using the above with a maxSize of 32 vertices per mesh, does the function create the following: 1st subset: vertices 1 - 32 2nd subset vertices 33 - 64 3rd subset vertices 65 - 96 4th subs ...Show All
g0nzo Elapsed Timer Inconsistant?
In working on my game I developed a throttler that runs off of elapsed time to handle problems I was having using keyboard input. Basically update and draw were appearing to detect the keyboard keys multiple times for each keypress (I am using the Input code from the spacewars demo). The problem is about every 4-5 seconds or so the elapsed time apears about double the float value it does every other time. Tracing out the data it seems most changes to the elapsed time run around 0.0125 seconds, with the occasional 0.025 second spikes. I know we are talking fractions of a second here, but the reusult is every once and a while I still get multiple key presses detected, and upping the threshold doesn't help until I move up to 0.5 second ...Show All
Anutthara - MSFT Projecting 2D Coordinates Into 3D Coordinates
I just got started with XNA (and C# for the most part, though my experience with Java seems to help) and ran into a snag. I did the tutorial about display points using the VertexBuffer object and wanted to take it to another level. I wanted to get the mouse coordinates when the mouse is clicked and put a new point on there. I got the input and figured out how to add points to my array, but unfortunately I can't figure out how to take my 2D screen coordinates from the mouse and put it into 3D coordinates. Does anyone know how I can do this If it matters, here's the code I used to create my projection and view matrices: viewMatrix = Matrix.CreateLookAt( new Vector3(0, 0, 5), Vector3.Zero, Vector3.Up ); ...Show All
game-maniac 360 Deployment Issues
Hello I've downloaded the latest version of XNA: GSE, signed up to Creators Club, downloaded the launcher, created a key and entered it into GSE. The 360 is sitting there waiting for a PC connection but the deployment just times out. I've checked the subnet and they're both 255,255,255,0. It doesn't work whether it's wireless or wired. I can't ping it from the PC, it just times out. Got another pal to try pinging their 360 from their PC and they get a similar time out. I've also made sure all the required ports are open, I think. I'm not sure, we have a Belkin router and I've added the ports the docs say to add but I can't test whether they are actually open or not. L ...Show All
Oleg Ignatov Deploying my own game assets
I've chosen not to use the content pipeline provided with GSE. How do I deploy my game assets to the 360 HD Is there a command line utility so that I can build it into my tools Thanks. -Nick Thanks, I'll try that. Do I need to make any changes to my file i/o code -Nick All folders under the output folder for your 360 project should get deployed along with the exe. Copy the assets folder to your 360 project, set the files' Copy to Output Directory property to Copy Always and you should be able to get it going. My understanding is that due to the lack of the IO namespace, you don't have file access with XNA so all of your assets have to use the content pipleine t ...Show All
Gmorken PlayerIndex?
I need some help and explaining of PlayerIndex and how to use it. this is an example of what I want to do: "for (int i = 0; i < Players.Length; i++) { if (XInputHelper.GamePads[i\].APressed) { GamePad.SetVibration(i, 1.0f, 1.0f); } }" Players is an Array of all the player objects. I want to cycle all my players and start to rumble that specific controller, but I don't know how to easily transform the int i = 0 too PlayerIndex.One (i\ should be only i in brackets but this forum displays a light bulb if i write that) Cheers Alfons Yeah, what Joel said.... Depending on the actual value assigned to the enums, you could just cast to it from int ... so something ...Show All
J. Nail Controlling Game By MIDI
I'd like to be able to control directx games via MIDI - eg use a guitar footboard that has a pedal and switches etc to generate game controller events. All the vaguely related references I've found on the web are for using directx controllers to generate MIDI events! I want to use MIDI events to generate the equivalent of key presses, mouse buttons or (say) a throttle control. Are there any drivers that do this already If not, how difficult would it be to roll my own, and what would it involve I'm quite competent at C/C++ etc but most of my experience is in an embedded environment, not Direct X. Thanks, Chris No I'm not sure either. I presume it's easier to manage the MIDI interface at the top level ap ...Show All
BLueDeViL Build speed with many projects
I've been working on my first large XNA project and am finding that building my projects takes forever. I have both my Windows and 360 projects in the same solution, and there are 5-6 projects each. Normal setups like this in Visual Studio are a incredibly quick to build on average, but with GSE I notice that it seems to be invoking MSBuild for every project regardless of the solution configuration or dirty state. For example, if I have platform set to x86, my build output window still scrolls the 360 projects, each one taking 1-2 seconds to find out it's not set to build. Worse yet, it does this for every project, every time I build, even if I just made a one line change in an assembly with no dependencies; builds take 25-30 seconds! M ...Show All
hfaun Error
I uninstalled Beta 1 first, opened up Visual C# so I ran it once before installing beta 2. Now when I open XNA framework I get a pop up dialog that says: Could not load type 'Microsoft.Xna.Framework.Content.ContentSerializerCollectionItemNameAttribute' from assembly 'Microsoft.Xna.Framework, Version=1.0.0.0, Culture = neutral, PublicKeyToken=f48fa5f25d27e8ff Does anyone know what this means, or how to fix it Thanks in advance. i did have the same prob. i deinstalled the beta again, started c# express, closed c# express, and reinstalled the beta.. than it was working... greg Sure enough that worked Thanks a million man I had the same problem ...Show All
Andrea Montanari Recommendations for physics
Hi, I know XNA doesn't include physics. Does anyone know of a good C# physics engine If there isn't a C# one around, how about a C++ or Java open source one that can be ported... Thanks, T Newton's good, but again, it's closed and written in C, so you'd have to do interop, and interop won't work... Ty Newton wrote: I'll look into a port of ODE. It is the only open source physics SDK I've found. That's a nice SDK. Easy to learn and use, good documentation, stable and fast. I was toying with the idea of doing a port of this myself, but it's probably a bit more than I can chew right now. It's a great candidate for some ambitious folks with lots ...Show All
GoodMorningSky Sprite.Draw2D() in C# Managed DX Simple2D Sample
I'm New to C# and Managed DirectX and I'm trying to use the Simple2D as a basic example to my game. But I get a problem. This is my code. batchSprite.Draw2D(mosquitoTexture, new Rectangle(0, 0, 160, 100), new SizeF(160f, 100f), new PointF(80f, 50f), 0f, new PointF(100, 100), Color.White); batchSprite.Draw2D(mosquitoTexture, new Rectangle(0, 0, 160, 100), new SizeF(320f, 200f), new PointF(80f, 50f), 0f, new PointF(200, 100), Color.White); batchSprite.Draw2D(mosquitoTexture, new Rectangle(0, 0, 160, 100), new SizeF(160f * 80f / 100f , 100f * 80f / 100f), new PointF(80f, 50f), 0f, new PointF(100, 250), Color.White); batchSprite.Draw2D(mosquitoTexture, new Rectangle(0, 0, 160, 100), new SizeF(160f * 70f / 100f , 100f * 70f / 1 ...Show All
zkhan How to deploy on the Xbox at many developpers
Hello, I'm a student and I'm developping on XNA with my teamates. We have a Xbox 360 and develop on our personnal laptop. When we have tested our project on the Xbox, we can't deploy from each laptops to the Xbox. Does a solution to deploy from several computer exist Thank you for your help. O.C Sharing the key doesn't actually work, because the Xbox and PC negotiate an internal more secure key the first time they connect to each other. That is stored on the PC that did the negotiation, so other PCs will be unable to connect once this has happened. To share an Xbox between multiple PCs, you will have to re-create a new key each time you want to switch from one PC to another ...Show All
forwheeler Generating More Random Numbers
I'm currently using the following code to generate a random number between 0 and 6: Random random = new Random(); int rand = random.Next(6); It seems to repeat some numbers quite frequently though. What I'm wanting to know is if there's a better way to generate random numbers that seems more... random You're right, it will use a timer based seed, thanks for the correction. Unfortunately that timer doesn't appear to be very high frequency, which is why people who (mistakenly) recreate Random objects for each use sometimes see repeated sequences of numbers. Some IronPython code that show's the problem: >>> def RunRandom(): ... for i in range(10): ... r = System.Random() .. ...Show All
