How to Write 2D games with XNA on WP7 (1)

Source: Internet
Author: User

Game Background:

Time was in the Middle Ages of Europe. A hero stuck to his country's final Castle. Once the enemy breaks the castle, his task fails. The hero has a hundred steps and powerful magic skills. Although the enemy initiated a wave of flood attacks, he was hard to fight back.

The enemy was unwilling to fail, and sent a variety of troops, spears, shield soldiers, and cavalry. Later, they were transferred to the stone truck, and the griffin knight in the air. The enemy is about to attack this castle. Can this final hero hold the castle?

Development History:

I started thinking about this game from the Chinese New Year and communicated with my friends in the arts. I planned to use XCODE to write it on the Iphone. Later I found my experience in XCODE game development was inadequate, in addition, Game competition on App store is fierce, and similar games are also available. So I switched to the WP7 platform and developed it with my best C.

It took me about two weeks to get familiar with the XNA framework. I wanted to write it in Sliverlight. I thought it was still XNA orthodox to write the Game On WP7. After the game prototype came out and verified that the direction and strength of the game could be controlled by hand-pulled bows and arrows, I began to write the game.

During this period, there are two plans for the operation mode, one is hand pull, and the other is automatic shooting. You can use your hands to test the user's operability, but after a long time, players will feel tired. As a result, I wrote the automatic shooting mode again. As long as the player points to a certain direction, the automatic shooting can be performed. When the game was officially released, I wanted to provide these two modes for users to switch.

Then, I will talk to my friends about the game UI and discuss the animation design and skill design of the weapons.

 

Completed functions include:

1. Set the blood volume for the castle. If it is reduced to 0, it will fail, and the damage to the castle will have a dynamic effect.

2. Write the magic flight effects of common, fire, and ice arrows.

3. The flying parabolic curve at the acceleration of gravity is simulated.

4. Save and store game settings, as well as serialization and deserialization.

5. Select the flashing animation of the skill icon.

6. I have finished writing multiple times, multiple fires, and ice arrows.

7. added a shadow effect to the arms.

8. added the skill CD effect.

9. added the skill tree interface. New skills require gold coins for learning.

 

Development Experience:

The development of the CastleDefense game has basically completed the core functions, but the gameplay of the game level is not high enough, and the difficulty of the game needs to be adjusted carefully. Frankly speaking, compared with the foreign team game masterpiece, the game you write is still relatively simple.

However, any game or developer needs to grow, even though blizzard started from a small studio. I hope you will give us some pertinent comments.

I also developed it in my spare time, with limited time and energy. Anyway, I will continue to finish the game.

 

Gameplay:

Click on the screen and let the bows and arrows hit the attacking soldier. The skill icon is in the lower left corner of the screen. You can click to select a skill. If the skill is red, the skill is not learned and the skill has a CD limitation.

Click the Center Gear button at the bottom of the screen and the skill learning page will appear. You need to spend coins to learn the skills.

Tips.

The difficulty of the game is now very high. I am confused when I play 9th. Of course, this is only a test version, and it still needs to be overhauled. Please give more comments to improve the game.

 

 

 

Game video:

CastleDefense video

 

Game Demo download XAP package address:

The Beta test of Microsoft app hub is also being submitted. If you want to download the Beta test in Zune in the future, please leave your LiveID (that is, the LiveID associated with your wp7 mobile phone, that is, the email address ).

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.