Use XNA to develop the game on the first day-configure the Environment & amp; the first XNA Project

Source: Internet
Author: User

Well, the first blog post in the blog Garden (I ordered a blog post to import wordpress. There is no news here =)

Let's first introduce the background. I used Pygame to write a semi-finished game in Python. I felt that the weak type of Python caused a problem in the expansion of the Code Scale (in fact, it was impossible to be lazy without automation ~)

I have a book about XNA, so I plan to migrate it to XNA.

 

XNA should have been abandoned. Now we can only find XNA Game Studio 4 and only support VS2010.

So I had to install Visual C #2010 Express first (why should I discard the beautiful UI of 2013)

Wait for completion

---------------------------------------------------------------------

Ah, it's finished.

Then download XNA Game Studio 4

Sit wait

---------------------------------------------------------------------

Create a win32 xna Project

Add resources in GameContent

Load Resources

1 texture = Content.Load<Texture2D>(@"Image\Ground");

Draw and center

 1         protected override void Draw(GameTime gameTime) 2         { 3             GraphicsDevice.Clear(Color.CornflowerBlue); 4             spriteBatch.Begin(); 5  6             spriteBatch.Draw(texture, 7                 new Vector2( 8                     Window.ClientBounds.Width / 2 - texture.Width / 2, 9                     Window.ClientBounds.Height / 2 - texture.Height / 210                 ), Color.White);11 12             spriteBatch.End();13             base.Draw(gameTime);14         }

It's easy. = I never wrote this article.

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.