cocos2dx3.2 development RPG "Flighting" (a) Basic introduction

Source: Internet
Author: User

Objective:

Last wrote a Destroy the stars, a lot of people have replied to me, and put forward a valuable opinion, first thank you all ~ last few months I found a very fun game-"Battleheart", in mind, such a good game if you can go online with good friends play (like CS) that is cool crooked, So start imitating the game and join the network module for it. Unfortunately, because of the multi-person network game development is not familiar with, although the final still developed, but the effect is not satisfactory. However, in the development process learned a lot of new knowledge and network games to use the technology (such as Boost::asio build server, network game synchronization, etc.), is also a good experience.

Because the network version is more complex, here is only a standalone version of the tutorial. In the future, I will probably provide a server/client framework that I wrote with Boost::asio, but it does not involve network modules first.

First, the original "Battleheart" Introduction

Posted here a few "battleheart" pictures, so that everyone has a beautiful look forward to, haha.



Second, the cottage version of the "Flighting"

Next is my cottage works, we are ready for the psychological ah ...



I can only blame the art, right, but the art is also my role ...


Iii. Introduction to the structure of the project

Say so much nonsense, now start talking about our project.

1) Overall:



2) Data: Personal habits put some default data in a file to manage


3) Entity: Physical class, mainly including bullet (bullet) Hero (Hero) Monster (Monsters) role (role class, Hero and Monster class parent) Skillbox (skill frame)


4) Skillselector: Responsible for the selection of skill effect


5) Util: mainly responsible for data input (from Excel table to JSON and then input to object)


6) View: Each scene (Battle: Battle Scene, Choose: Select a scene, Menuview: Start menu, Pauseview: Pause screen)


7) Appdelegate: Program Entry

Here, I used a 1280x720 material, and the default number of frames changed to 45 frames, so the appdelegate changes are as follows:

BOOL Appdelegate::applicationdidfinishlaunching () {    //Initialize Director    Auto Director = Director:: GetInstance ();    Auto Glview = Director->getopenglview ();    if (!glview) {        Glview = glview::create ("Flighting1.2");        Director->setopenglview (Glview);    } Glview->setframesize (1280,720); Glview->setframezoomfactor (0.6f); Glview->setdesignresolutionsize ( 1280,720,kresolutionexactfit);    Turn on display FPS    director->setdisplaystats (true);    Set FPS. The default value is 1.0/60 if you don ' t call this    director->setanimationinterval (1.0/45);    Create a scene. It's an Autorelease object    auto scene = Menuscene::create ();    Run    director->runwithscene (scene);//engine->executescriptfile ("Src/main.lua");    return true;}

This is the first introduction.

My csdn Address: http://blog.csdn.net/hezijian22

Email address: [Email protected]

If you have any questions or advice, please contact me.

cocos2dx3.2 development RPG "Flighting" (a) Basic introduction

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.