xna

How do I implement support for ftp in WP7?

别说谁变了你拦得住时间么 提交于 2019-12-13 14:17:33
问题 Hi I would like to retrieve documents from an ftp in my Windows phone 7 application (built with XNA in my case). As far as I understand WP7 does not support ftp due to port and protocol(?) contraints. Is there any way to get ftp support working? I guess I will be able to implement it my self once socket support is added but I dopn't wan't to wait for that. Cheers /Jimmy 回答1: Since there are no supported socket capabilities in the initial release of WinPhone , you cannot directly FTP. You

Windows Phone 8 SDK Blog Announcement and XNA Confusion

丶灬走出姿态 提交于 2019-12-13 13:49:08
问题 In the Windows Phone 8 SDK announcement blog post, I saw this: XNA Game Studio – Enables you to continue developing games for existing Windows Phone 7.1 devices, along with desktop and Xbox 360. However, targeting anything other than Windows Phone for XNA Profile will result in a Visual Studio 2012 error of "Windows/Xbox is not a supported platform for this version of XNA Game Studio." So, am I reading the blog post incorrectly? Is it possible to target Windows and Xbox using the XNA Game

xna prevent to go down slopes or up hills that are too steep

拥有回忆 提交于 2019-12-13 13:39:55
问题 how can i prevent to go down slopes or up hills that are too steep on heightmap terrain? I have a 3d camera that moves on a terrain, it now moves on any place even on big slopes and on hills that are too steep, what can I do? 回答1: I would avoid rise/run calcs as they could produce a NaN if terrain is vertical. //currentPosition & targetPosition should be known to you Vector3 potentialMove = Vector3.Normalize(targetPosition - currentPosition); float steepness = Vector3.Dot(Vector3.Up,

Bouncing a ball off a wall with arbitrary angle?

吃可爱长大的小学妹 提交于 2019-12-13 12:12:11
问题 I'm trying to let the user draw a paddle that they can then use to hit a ball. However, I cannot seem to get the ball to bounce correctly because the x and y components of the ball's velocity are not lined up with the wall. How can I get around this? I tried the advice given by Gareth Rees here, but apparently I don't know enough about vectors to be able to follow it. For example, I don't know what exactly you store in a vector - I know it's a value with direction, but do you store the 2

XNA 4.0 in a window having jagged edges issues…Know of a method for high quality output?

空扰寡人 提交于 2019-12-13 08:08:24
问题 I'm using this example project's XNA 4.0 form control in an application I'm writing: http://creators.xna.com/en-US/sample/winforms_series1 It's working great and I've done quite a bit with visuals and animation. The main issue I'm scratching my head at is the 3d model and primitive 3D shapes (cylinders with a tessellation of 30) I render have very jagged edges to them as if they are low resolution. I tried to figure out how to enable multisampling, but all of the examples I can find online

How to calculate the position and direction of the target cursor in xna?

我怕爱的太早我们不能终老 提交于 2019-12-13 07:40:08
问题 I developped a small games like "minecraft". and I'm stuck for a few days on the calculation of the direction of the cursor. Let me explain. I would like to target a cube with my cursor in the middle of the screen and make it disappear with a click. But I do not see any how to recover this information .. Can someone point me to a "sample / tutorial" or explanation please? Thank you very much. My screenShoot picture game : 回答1: I take no credit for most of this--it's what I used in my 3D XNA

Install fonts from within the code

谁说我不能喝 提交于 2019-12-13 07:13:36
问题 I'm currently using a custom font in my XNA game. As you might imagine, the game wont start if the font isn't installed on the PC. I'm planning on using try/catch to understand whether the font's installed or not. Now, is there a way to install the font from within the code? You can take in mind that the font file is in the Content folder. 回答1: What you can do is convert your font to a BMP spritefont, import the BMP image and change from "Texture" to "Sprite Font Texture" at the Content

C# XNA Random tile engine

不打扰是莪最后的温柔 提交于 2019-12-13 07:12:29
问题 public void Draw(SpriteBatch theSpriteBatch) { Random rand = new Random(); for(int y = 0; y < map.GetLength(0); y++) { for(int x = 0; x < map.GetLength(1); x++) { theSpriteBatch.Draw(tile[rand.Next(0,3)], new Rectangle(x*tileWidth,y*tileHeight,tileWidth,tileHeight), Color.White); } } } When I do this it just flickers the tiles and constantly redraws them. What do I do to get the random effect with it only drawing once? Is there a way I could click on these tiles with the mouse and have them

Missing option for “Content Importer” in XNA (trying to import video)

╄→尐↘猪︶ㄣ 提交于 2019-12-13 06:49:39
问题 http://klucher.com/files/media/image/WindowsLiveWriter/VideoSupportinXNAGameStudio3.1_8E34/image_2.png I don't have the option "WMV Video File - XNA Framework". The video I'm importing is in WMV format and was encoded using Microsoft Expression Encoder 4 with the settings set to the predefined "VC-1 Xbox 360 HD 720p" so I don't think there's anything wrong with the video... DRM is not enabled. Some other guy had this problem too but he never found a solution (or he did but didn't bother to

Move model forward relative to his rotation XNA

白昼怎懂夜的黑 提交于 2019-12-13 05:59:46
问题 How can I move a model (in 3D space) forward relative to his rotation? For example: rotation = new Vector3(0, MathHelper.ToRadians(90), 0); obj.Move(Vector3.Forward); The function move has to move the object one unit to the left instade of one unit forward. I tried: Matrix rotation = Matrix.CreateFromYawPitchRoll(rotation.x, rotation.y, 0); Vector3 translation = Vector3.Transform(Vector3.Forward, rotation); this.position += translation; translation = Vector3.Zero; But for some reason it moves