xna

How can I work with XNA projects in Visual Studio 11 Beta?

百般思念 提交于 2019-12-31 11:22:24
问题 Visual Studio 11 was released a few weeks back and now that ReSharper is available for it, I'm ready to start using it! Some of the projects I'm working on are XNA projects. These don't appear to load in VS11 Beta, even after reinstalling XNA Game Studio 4 Refresh after installing VS11 Beta. Has anyone got VS11 Beta working with XNA projects? 回答1: I have just gotten it to work, it required some hackery. This will work after installing XNA Game Studio 4.0. Find the Game Studio 4.0 directory in

WP7 XNA game: how to adapt to different phone resolutions?

陌路散爱 提交于 2019-12-31 06:49:04
问题 I've created a game that targets the 800 x 480 resolution, but have become interested in having it adapt to other WP7 resolutions. Also, I've heard that games can be ported to iPhone and Android through Mono and ExEn, opening up a ton of other screen resolutions. What is the proper way to deal with this? I'd like to make the game smart enough to detect the screen size and alter the assets to look as close to the original as possible and play the same. This is a 2D game and I would think the

XNA GraphicsDeviceManager.ApplyChanges() causes flicker when called on application start

China☆狼群 提交于 2019-12-31 04:50:09
问题 I have a function with the following code in it: GameStateManagementGame.GraphicsDeviceManager.PreferredBackBufferWidth = width; GameStateManagementGame.GraphicsDeviceManager.PreferredBackBufferHeight = height; GameStateManagementGame.GraphicsDeviceManager.IsFullScreen = isFullScreen; GameStateManagementGame.GraphicsDeviceManager.ApplyChanges(); When it's called at application start, if isFullScreen = true, there is very noticeable screen flicker for a second or 2 even if the width and height

Rotating objects attached to other objects

我只是一个虾纸丫 提交于 2019-12-31 03:58:29
问题 I have a question concerning a single mesh (building) that contains a collection of animated objects (these objects make up the complete building, rising up from the ground when it is constructed, at different speeds and rotations). The animated objects in the mesh all have their own position and rotation animation tracks. I export it from 3DS Max as an ASE, convert it into a properietary format andd use it in my gaming engine. So, at the moment, I can successfully display the animated

In XNA, what is the best method to dispose of textures I no longer need?

微笑、不失礼 提交于 2019-12-31 03:23:25
问题 I started a project with the concept of reusing the same texture2d objects continuously throughout the game, reloading new textures periodically. Over time this proved a bad idea as I was running in to: System.OutOfMemoryException bool loadImages(string image) { System.Diagnostics.Debug.WriteLine("beginning loading textures " + image); try { //image_a = null; //image_o = null; //image_o.Dispose(); //image_a.Dispose(); image_o = Content.Load<Texture2D>("images/"+image); image_a = Content.Load

How to debug System.StackOverflowException without link to source code?

邮差的信 提交于 2019-12-30 18:09:06
问题 Recently, I am regularly encountering errors of type "An unhandled exception of type 'System.StackOverflowException' occurred in Unknown Module.". This happens in a game (that I developed) with a quite large code base (C# / XNA). But typically the error occurs only after several minutes of gameplay (and not in every run). The problem is that unfortunately, the Visual Studio debugger seems to not be able to further localize the problem and just lets me inspect the assembler code without

How to debug System.StackOverflowException without link to source code?

柔情痞子 提交于 2019-12-30 18:07:04
问题 Recently, I am regularly encountering errors of type "An unhandled exception of type 'System.StackOverflowException' occurred in Unknown Module.". This happens in a game (that I developed) with a quite large code base (C# / XNA). But typically the error occurs only after several minutes of gameplay (and not in every run). The problem is that unfortunately, the Visual Studio debugger seems to not be able to further localize the problem and just lets me inspect the assembler code without

Need help using instancing in XNA 4.0

会有一股神秘感。 提交于 2019-12-30 02:26:27
问题 I have come to inquire about instancing in XNA I am a beginning XNA developer, only recently stepping up from 2D to 3D games. I'm trying to draw a large number of cubes made solely out of vertices in code. As one might suspect, drawing a large number of these cubes causes quite a bit of stress on my computer. As I was looking for a way to increase performance I came across the term "instancing". Not knowing how instancing works in XNA 4.0, I've looked around for a tutorial suitable for

Implementing playlists with songs from phone storage [windows phone]

帅比萌擦擦* 提交于 2019-12-29 09:03:41
问题 I have been struggling with an issue with my media player windows phone (7) application. The problem is that I can't seem to implement playlists. What I want to do is play songs from the media library. This article seems pointless. I've tried getting into the SongCollection class and figure out how to create more of these things. It appears to be impossible (no constructor, can't cast it, can't inherit it). After that I tried getting an object on the process running the background audio agent

Implementing playlists with songs from phone storage [windows phone]

走远了吗. 提交于 2019-12-29 09:03:40
问题 I have been struggling with an issue with my media player windows phone (7) application. The problem is that I can't seem to implement playlists. What I want to do is play songs from the media library. This article seems pointless. I've tried getting into the SongCollection class and figure out how to create more of these things. It appears to be impossible (no constructor, can't cast it, can't inherit it). After that I tried getting an object on the process running the background audio agent