xna

Displaying rectangles in game window with XNA

跟風遠走 提交于 2019-12-09 12:46:22
问题 I want to divide my game grid into an array of rectangles. Each rectangle is 40x40 and there are 14 rectangles in every column, with a total of 25 columns. This covers a game area of 560x1000. This is the code I have set up to make the first column of rectangles on the game grid: Rectangle[] gameTiles = new Rectangle[15]; for (int i = 0; i <= 15; i++) { gameTiles[i] = new Rectangle(0, i * 40, 40, 40); } I'm pretty sure this works, but of course I cannot confirm it because rectangles do not

Now that Xna is unsupported, what is a better choice? [closed]

无人久伴 提交于 2019-12-09 10:06:43
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . Xna is unsupported, and unfortunately I started game programming recently(~9 months). What is a better choice, DirectX or OpenGl. Now,

Why is Visual Studio not able to open .csproj files?

旧巷老猫 提交于 2019-12-09 07:58:53
问题 I have the odd problem that I am not able to open the properties of my .NET projects in Visual Studio. If I try to open it by clicking on the Properties tree node in the Solution Explorer I get the following message: There is no editor available for '....csproj'. Make sure the application for the file type (.csproj) is installed. If I try to open the project properties by the main menu nothing happens at all. I already tried to reset the Visual Studio settings by command line and a repair

How can i install MonoGame into Visual Studio 2013?

北城以北 提交于 2019-12-09 07:24:49
问题 How can I install MonoGame templates for Visual Studio 2013 ? 回答1: Assuming you want C# templates: Install MonoGame from here Find the Visual Studio templates folder (usually C:\Users[your user name]\Documents\Visual Studio 2012\Templates\ProjectTemplates\Visual C#) Copy the MonoGame folder to the Visual Studio 2013\Templates\ProjectTemplates\Visual C# folder. 回答2: UPDATED 7 January 2014 For people who want to use Monogame can download the 3.2 which provide the support for 2013. The installer

High CPU usage with XNA

孤街醉人 提交于 2019-12-09 04:55:29
问题 I just noticed today, that when I compile and run a new XNA 4.0 game, one of CPU threads is running at 100% and the framerate drops to 54 FPS. The weird thing is that sometimes it works at 60 FPS, but then it just drops to 54 FPS. I haven't noticed this behaviour before, so I don't know if this is normal. I uninstalled my antivirus and reinstalled XNA Game Studio, XNA Redistributable and .NET Framework 4. If I set IsFixedTimeStep to false, the game runs at 60 FPS and CPU usage is minimal (1-2

How to play dynamic sounds in XNA?

ぃ、小莉子 提交于 2019-12-09 03:43:06
问题 Is it possible to dynanmically generate sounds with XNA C# code? I looked into this some time ago when XNA was first released. At that time it was only possible to playback sound resources included in the compiled code. Have there been any changes or new features added since XNA 1.0 that would allow an XNA application to generate and playback audio on the fly? 回答1: Yes. XNA 4.0 added support for dynamic audio that allows you to: Create a regular immutable sound effect from a raw buffer using

Implementing a simple XML based Scripting Language for an XNA Game

老子叫甜甜 提交于 2019-12-09 02:10:17
问题 I'm working with a team on a RPG engine in C# and XNA. We're planning on targeting Windows and Windows Phone 7, but are running into issues with AI interactions and controlling player actions during cutscenes. FOr the most part, everything is extracted using the MVC design pattern, but abstracting all logic and movement into a controller could cause issues down the line. So the idea is to have an interface (IScriptEngine) that takes an IScriptObject and updates data in the map model

Uniformly Resizing a Window in XNA

允我心安 提交于 2019-12-09 01:02:22
问题 Well, I am trying to give my game's window the ability to resize uniformly . I have checked everywhere but I can't seem to find anything about it. Any ideas? I can't post the code due to the character limit. It would be much appreciated if someone could please help me out and see what I am doing wrong :) Also helpful would be how to resize the backbuffer when this happens, as I don't think the game would be playable with only half the sprites visible :) void Window_ClientSizeChanged( object

Can't find HttpWebRequest.GetResponse() in WP7 Project

倾然丶 夕夏残阳落幕 提交于 2019-12-08 23:20:57
问题 I'm trying to send a GET request using HttpWebRequest. I've found a lot of examples all over the web (for example, this one...just go down to the Scrape() method). They all basically do the same thing: Create a HttpWebRequest object by using WebRequest.Create(URL) and casting it to HttpWebRequest , then getting the response by using the GetResponse() method from HttpWebRequest . Thing is, GetResponse() doesn't seem to exist in either HttpWebRequest or WebRequest (which is its base class). My

Compatibility issue between XNA and Windows 8

我只是一个虾纸丫 提交于 2019-12-08 22:14:09
问题 When I try to install XNA, I get the following error message : Your version of XNA Game Studio 4.0 and below isn't compatible with this version of Windows. Is it really impossible to use XNA on Windows 8 (VS2010 is installed) ? It seems very strange ... 回答1: If someone ever have the same problem : You have to install the latest version of Games for Windows Marketplace client (here). 来源: https://stackoverflow.com/questions/12700472/compatibility-issue-between-xna-and-windows-8