How to Use cocos2d to create a tower guard game: Introduction

Source: Internet
Author: User

Original article link: http://www.iphonegametutorials.com/2011/04/11/cocos2d-game-tutorial-how-to-build-a-tower-defense-game-for-the-iphone/

Tutorial:

We have learned a lot about simple game mechanisms (such as Genie and menus). Now we are ready to introduce anti-tower games to you. However, we have to spend some time developing anti-tower games. So, let's take a moment to talk about the game's design and objectives.

Tower guard Game Description:

    • The enemy comes out from one direction and then walks along a preset path to a destination (usually the other end of the map)
    • You can build some "towers" along that path. When the enemy passes through the tower, the tower will open fire on it. In order to resist the attack of a wave of more fierce monsters, you need to constantly upgrade your arrow tower to enhance the firepower.
    • You can win the game by blocking the last wave of attacks (usually 20 ~ 50 waves), or you can let them pass one wave after another, and then you lose. Of course, you can also show off to others and stick to 97 waves.

This is not a "casual game". We need to better define the word "casual": players can simply place some turret when playing the game. When the battle starts, you can also upgrade the turret slightly. Those who have not played anti-tower games are generally in 48 waves ~ About 50 waves will crash, because you have not considered that there may be various types of monsters that will attack at the same time. You can spend some time adjusting your game parameters to see if you can win the game faster or make more money (because killing a monster is generally rich, building turret also costs money), or creating the least tower to win the game.

You may be wondering, it's hard to figure out that these are the key to creating a tower guard game? Why not give it to me directly?Source codeWhat about it? Be patient! We will start encoding immediately. Here I want to say that tower anti-DDoS games are not a new way of playing games. Therefore, if you want to make the game a success, you must design it from the ground up. So, if I teach you how to create a tower guard game, I hope you can make some interesting works. There is nothing more embarrassing than making a bad game with a buzz. Therefore, I believe that the quality of anti-tower games is critical.

    1. The game should not make gamers confused. However, players who win the game quickly can be rewarded with additional "scores.
    2. There is no form of resource management-this means that you know the damage value of each tower, and you do not need to build some special towers to remove the upgrade of other towers.
    3. The information and strategy of the tower are very important-the map shape, the total number of towers that can be built must be carefully considered. If you only build one type of tower from start to end, you can clear the entire game. What does that mean ?!
    4. The end part is important (for example, you will release a big boss in 50th waves, the blood is very thick, and the movement speed is relatively fast ). However, you can refer to others' practices for details. This mainly depends on how your map is designed and how your tower is upgraded. (How many upgrades are allowed? How to upgrade power .)
    5. The most important part is: do not let a tower "Crazy upgrade "!!! (For example, blow a 5 million ?...) Because you can build different types of towers, such as deceleration towers, multi-target towers, and laser towers. I found that the best TD games are those games that have many different types of towers, and each type of features is very specific, useful, and strategic. Of course there are exceptions, but it is best to diversify the types of the tower.

...... (A few cross-lines are skipped here, which is a foreign saying ).

PS: this series of tutorials is divided into four parts. I want to get them all over the weekend. I am busy working on projects recently. I am sending an advertisement post. Don't mind. If you have any questions or suggestions, please leave a message below.

 

copyright statement: this article is translated by http://www.cnblogs.com/andyque . Please respect the work of the author. Keep this note and the author's blog link when reprinting. Thank you!

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.