Answer Questions
emmmmmmer Runtime model loading
I am trying to make a level editor with XNA. Unfortunately, I've run into a little snag. I need to load a model from a user chosen location, but as far as i know models need to be first loaded into the programming solution before they can be loaded through the content manager. Is there anyway to do this at runtime fora model thats not part of the solution I've looked at this problem too. I experimented and found that all you really need is to build the 3d model into the format recognized by the Content Pipeline. When you run your app, you get .xnb files that you then load using ContentManager.Load<Model>("mymodel"). Since you can type what you want into model name parameter, you can dynam ...Show All
nvandyk setting IsMouseVisible to true improves performance
Does anyone else notice that setting the IsMouseVisible to true improves performance Whenever i move my mouse and IsMouseVisible is set to false, my framerate decreases significantly Any thoughts thats exactly what i'm running into, setting mouse to visible seems to help for some strange reason. done. Please file this on connect if you haven't already: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=682921&SiteID=1 I've not tried changing that property, but I've had similar issues with the mouse. When running in windowed mode, if the mouse is over the window things run normally, but when moving the mouse outside the ...Show All
c_hales Future ability to specify mouse coordinates?
I have done some searches on the topic and from what I can gather is that the current release of XNA does now allow programmers to specify the coordinates of the mouse pointer, only to retrieve them. I am currently in the procress of developing a first-person view type game in an organization in my university and to do so would require the ability to center the mouse pointer to the middle of the window each time the mouse is moved. As of now this isn't possible. I am wondering if in the near future or sometime later with perhaps another release of XNA beta or the final release if this will be a feature that is available Until then I was wondering if anyone has found a workaround to this situation so that I can use th ...Show All
Novozh Many compile errors with Visual Studio Express
Hello. Whenever i try to compile ANY example from the directx sdk (Direct 3d), i get a lot of errors, the specific errors depend on the project i'm trying to build. I'm currently using: Visual Studio Express Directx SDK Oct 2006 Latest Platform SDK Windows XP SP2 This is the Build log from when i try to build the "EmptyProject" in Samples\C++\Direct3D: http://dexxhole.tjbp.net/dx9/BuildLog_debug.htm I have been writing hlsl shaders in a 3rd party app (FX Composer) and would like to try going deeper into direct 3d. i would like to create a program that loads my sample models and renders them with the shaders and textures i have created, and distribute the entire thing on my demo reel, although i wouldn't mind learning more direct 3d any ...Show All
Tb2006 What about buffered input?
Please make also event based input option for Mouse and Keyboard. For example. 1.In Mouse and Keyboard, add EventDelegate like Mouse.OnMouseEvent, Keyboard.OnKeyEvent 2.We then just do Mouse.OnMouseEvent+= new MouseEventDelegate(game.OnMouseEvent); 3. OnMouseEvent should look like OnMouseEvent(object sender,MouseState state,MouseEventArg args) { //MouseEventArg tells us what button was pressed,released, wheel moved or //just x,y change } Thanks drEKO i understand what a "game loop" is...I am not beginner, I just need this as a OPTION , for more "GUI" oriented games. Gui system is also event driven in games as object oriented programming is and XNA should not be a exception. This ad ...Show All
chris441962 WORLDVIEWPROJ semantic
i read many shader progs and sometimes i saw lines like this: float4x4 matWorldViewProj : WORLDVIEWPROJ; i dont understand meaning of WORLDVIEWPROJ semantic. this is usual global variable and should be set by the application. this is clearly not an input parameter of a function. when i delete this semantic everything also works fine... so, any ideas Depending on the host application, it might look for this semantic to decide what data to feed into this parameter. Of course WORLDVIEWPROJ means that the effect renderer should fill this parameter with a matrix representing the concatenated WorldxViewxProjection matrices... ...Show All
FrankTheFox Simple 2D with D3D9
Hello, I'm using vb.net 2005 express and I'm trying to write a sub that mimics the behavior of DirectDraw in D3D (since DD is depreciated and all). I have a few questions. In DirectDraw your surfaces could be as large as you'd like, and non-square. I've read that it's not reccomended that you have a texture larger than 256x256. I'm trying to migrate a simple tile based rpg game from DD to D3D. Will I need to split my tilemap into several smaller (256x256) bitmaps Or is it ok to have larger textures Here's my current code for my Draw sub: Public Sub Draw(ByVal lDevice As Device, ByVal srcTexture As Texture, ByVal srcRect As Rectangle, ByVal destRect As Rectangle) Dim ...Show All
MWatts TargetElapsedTime and Animated Sprites
So I'm looking at the help on Animate a Sprite. It suggests using TargetElapsedTime to set the rate the animation frames play back. Say I have an explosion that is 6 frames and I want them to play back at 4 fps. Well if I set TargetElapsedTime that slows the entire game world down to 4 fps. How do I go about keeping the Game running at the default of 60 fps but my animation running at 4 fps The obvious way is to roll your own solution using elapsed time in the update but then why does the tutorial want you to use TargetElapsedTime I keep feeling like I'm missing something obvious. Thanks for any help. It looks like you're not creating an instance of the class if you're just doing: UpdateFrame(elapse ...Show All
SQLHelpFTS Proper use of GameComponent? (yet another post about them)
I've seen a lot of posts regarding proper use of GameComponents. I'd like to get some feedback on how I intend to use a GameComponent for a simple SriteManager. Here is how I intend to architect my Srite Management System 'Sprite' will be a simple custom sprite object. 'SpriteManager' will be a normal c# class that encapsulates all logic for managing Sprites. It will maintain a list of sprites and it will have Add, Remove, and Draw functionality (it will Draw using an ecapsulated SpriteBatch object). 'ISpriteManagerService' will define an interface that is implemented by SpriteManager. Essentially this interface will be a subset of the functionallity contained in SpriteManager and will only expose metho ...Show All
WinstonPennypacker XNA redistributable 1.0: having trouble distributing
I've tried to publish my first XNA game on another PC in my house; that PC has .NET installed. I also downloaded and installed the XNA redistributable 1.0 onto that machine, but when I try to run my game's setup, I'm told that the XNA Framework 1.0.0.0 must be installed in the "Global Assembly Cache (GAC)". Now, this is a game I made in the GSE Beta 2, but the error message relates to XNA 1.0, not my application. Any advice Thanks for your reply. Okies, I'll try that. Actually, my little game still needs work, so I'll recompile it in the release version of GSE and try your suggestion about not requiring a specific release version. Alternatively you can just cha ...Show All
Wolfsvein Dream Build Play today?
Well it's just gone 9am UK time and as it's the last day of January I assume that the Dream Build Play website will go live today Wheres my burrito Michael Morton wrote: They said January. They never said anything about 2007. :) good one. hey, hey ... i'm holding my breath too. i've got a game lib already put together, but i want to see the contest info before i figure out how much time to sink into an actual game using the lib. Cheers, casey Who's excited This guy is yeah im interested to see all the details and stuffs. At least they alrea ...Show All
ricky1980 XNA Games OUT OF THE BOX??
I cant make them work on a PC with just .NET 2.0 DirectX and the XNA Framework, it still needs the GSE and VC# Express, otherwise I get an error that the framework dll should have been installed into the Global Assembly Cache. I got the installer from your link and it didnt fix for me. I ran the filemon you linked and got some data but I still have to read through it, I`m not sure what I`m supposed to be looking for. Martin is correct that if you do not have .Net (1.1 or 2.0 will do) installed then the MDX assemblies will not install. However its incorrect to say that calling setup with the /InstallManagedDirectX flag will install them after you have got .Net on th ...Show All
swtjen01 render a copy of the backbuffer
Hello I have read several posts about that, but nothing seems to work for me, I try to save my backbuffer (to store it in a surface) then I would like to draw this saved surface... so, I need two things. 1: save my backbuffer MyBackBufferSurface=graphics.GraphicsDevice.GetBackBuffer(0,0); 2:render my backBuffer spriteRenderer.Draw(MyBackBufferTexture, new Rectangle (0, 0, 512, 512), Color .White); I used : MyBackBufferSurface= MyBackBuffertexture.GetSurfaceLevel(0); to assosiate my surface with my texture I end up with a black surface when I render my texutre please help me I on this since a week and it makes me crazy. You need to grab the backbuffer ...Show All
VidyaSagarCh Could C# be the future of gaming?
Since XNA is using C#, and is is a more intuitive language than C++, is it possible that in the future that C# will dominate, espessially in AAA titles. Could XNA be ushering a new way of programming in the main stream Hi Jeff, As some one who is a partner in a company (and lead developer) that produces enterprise high performance security applications, many of them in C#, I think you will be very surprised what you can do with C#. I develop in C++, C++/CLI (.net C++) and C#. C# is my favorite by far. While it certainly takes a lot of care and research to get the "barn burning" speed you can truly get out of C#. Once you know what to avoid and how to write performance critical apps in C#, you will only go back when yo ...Show All
sendtomaz My new game running on Beta 2 (Dr. Popper)
Just wanted to let everyone know now that I have migrated my game to XNA Beta 2, and have put it up for download at http://www.bluerosegames.com . It's called Dr. Popper and it's a puzzle game similar to Pop'em, Jawbreaker, and Bubblet. I will post full source code for the game in a few days, but for now if you have any questions feel free to ask. Thanks, Bill OK, runs on my laptop. I'll try it on my son's PC when I get home. Jim Perry wrote: Hmm, installed the runtime and game on my son's PC and got a System.InvalidOperationException when I tried to run it. Jim, You may be having this problem that is new to Beta 2: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=889627&SiteID=1 I have updat ...Show All
