xna

Is there any free XNA UI library?

随声附和 提交于 2019-12-21 21:34:11
问题 I'm thinking of game in game user interface. 回答1: Check out XNAML: http://msmvps.com/blogs/valentin/pages/xnaml-component.aspx http://xnaml.codeplex.com/ [The] engine is designed to run in a pure Xna environement on all supported device. My engine is extensible, you can add your own controls, inherit from base classes (such as Control or Pane) to make your own behavior. The compatibility with Xaml is complete. Create your interface on Blend and make a simple copy/past action to add the Xaml

Serialize Texture2D programmatically in XNA

做~自己de王妃 提交于 2019-12-21 21:28:27
问题 I am building a game editor for an XNA game that I'm building that would accept JPEG/PNG, and output a XNB file that has Texture2D content in it. I have my custom serializers for my custom etc and I'm dug everything down into invoking ContentCompiler using Reflection etc, gone into the real dirty bits, and I CAN actually get that part working for my own formats. But I now need to serialize to the regular Texture2D format that XNA know how to compile (in Visual Studio when building project)

Create Rounded Rectangle Texture2D

南楼画角 提交于 2019-12-21 19:50:10
问题 I am building a game with dialog boxes, and I would like to be able to procedurally generate textures for the boxes, in a very similar style to that of the Final Fantasy Series (think like Final Fantasy VII). Here is a code snippet of what I have so far: public class DialogBox { public Rectangle BoxArea { get; set; } public List<Color> BoxColors { get; set; } public List<Color> BorderColors { get; set; } public int BorderThickness { get; set; } public int BorderRadius { get; set; } private

Quaternion rotation in XNA

青春壹個敷衍的年華 提交于 2019-12-21 19:18:31
问题 Am I doing the following right? Well obviously not cause otherwise I wont be posting a question here, but I'm trying to do a Quaternion rotation of a model around another model. Lets say I have a box model that has a vector3 position and a float rotation angle. I also have a frustum shaped model that is pointing towards the box model, with its position lets say 50 units from the box model. The frustum also has a vector3 position and a Quaternion rotation. In scenario 1, the box and frustum

XNA - Pong Clone - Reflecting ball when it hits a wall?

╄→гoц情女王★ 提交于 2019-12-21 18:41:24
问题 I'm trying to make the ball bounce off of the top and bottom 'Walls' of my UI when creating a 2D Pong Clone. This is my Game.cs public void CheckBallPosition() { if (ball.Position.Y == 0 || ball.Position.Y >= graphics.PreferredBackBufferHeight) ball.Move(true); else ball.Move(false); if (ball.Position.X < 0 || ball.Position.X >= graphics.PreferredBackBufferWidth) ball.Reset(); } At the moment I'm using this in my Ball.cs public void Move(bool IsCollidingWithWall) { if (IsCollidingWithWall) {

How can I run XNA in VirtualBox on a Mac?

社会主义新天地 提交于 2019-12-21 17:38:15
问题 I know it's weird. XNA Version is 3.1 and VirtualBox version is 4.0.2. 回答1: Install the software reference device that comes with DirectX SDK. For me, that enabled running XNA related unit tests on a Hyper-V virtual machine. It should do the trick for any virtual environment since it implements a full DirectX device in software and does not rely on available hardware or virtualized drivers. It will not be blazingly fast but it should work. Installing the core parts of the DirectX SDK is

XNA networking on windows

断了今生、忘了曾经 提交于 2019-12-21 17:37:49
问题 What are XNA's builtin network functionalities? Is it possible to use XNA's builtin network in windows? If so, any restrictions? 回答1: If you use the Microsoft.Xna.Framework.Net namespace classes, you are restricted to local, subnet and Games for Windows Live (which means the developer having a Creator's club membership and players having a Silver/free GFWL membership). However, as long as you're not planning on also supporting Xbox 360 or Zune (or Windows Phone 7), you can simply use the

Color Replacement in XNA C#

这一生的挚爱 提交于 2019-12-21 11:34:31
问题 I load my textures using Texture2D.FromFile() then draw them using spriteBatch.Draw() But here's the point: I want to change some colors of the image to another ones. So my questions: How to change single color of the image to another single color (eg. blue to red). In fact, what I really want to do is changing group of colors to another group of colors. For example red and similar hues to red to blue and similar hues to blue. You can do this for example in Corel PHOTO-PAINT ("Replace Color")

Blocking Movement On Collision

若如初见. 提交于 2019-12-21 06:00:55
问题 i'm developing a 2d game in XNA and i'm currently working on my physics class. and my current task is to stop an object when it's colliding with another. i have made my game call this function when ever 2 objects collide: public void BlockMovement(gameObject target) { //you can call width by just typing width. same for height owner.position.X += (owner.position.X - target.position.X); owner.position.Y += (owner.position.Y - target.position.Y); } the problem is that instead of stopping. the

Collection with very fast iterating and good addition and remove speeds

帅比萌擦擦* 提交于 2019-12-21 05:02:08
问题 I'm after a collection that I can iterate through very fast. I'll also be adding items and removing (specific) items fairly regularly and so ideally would like those operations to be fast too. I'm developing on the xbox and so am restricted to the compact framework (more or less). It's very important that I keep garbage and object allocations to a minimum, so anything where i can pre-allocate space for my objects would be great. I'll be storing uint s (but can be int s if needed) in the