Yundun cocos mobile game mmo source code parsing, cocosmmo

Source: Internet
Author: User

Yundun cocos mobile game mmo source code parsing, cocosmmo

Engine: cocos2.x

Code: c ++ hybrid lua

Game type: mmo

Project Structure:

Game: where the game starts

Gamelogic: Related to sdk access, logon payment statistics, etc.

LibFramework: Main c ++ libraries related to this game

Uicontrol:

Zpack: an open-source packaging file Tool

Bytes -----------------------------------------------------------------------------------------

Analyze libFramework:

Base Directory

Sfapp. h: The Framework app inherits a scene, which is the main scene base class of the game.

Cpp:

[Cpp]View plain copy

First, read the basic code,

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

Utils directory:
Ccstrconv. h: some basic conversions to strings; good, these can be collected at ordinary times and can be used by self-written projects.

More string processing for ccstrutil. h

Csvfile. h. csv file read/write

Httptools. h encapsulates the http provided by cocos. This 3.x cocos has xmlhttp, and is encapsulated by itself.

Sfeasymail calls the curl library and sends an email directly. This is pretty confusing !!! Can I send an email to customer service?

Sfthread encapsulates a Thread class and writes different implementations for win and Android-iOS, semaphores, mutex locks, and read/write locks.

Singleton Template

Streamdataadapter c ++ and lua directly transmit the adapters of complex data...

I don't know where to use sfminihtml html parsing.

Further encapsulation of sfexecutionthreadservice threads

Sfprioritynotificationcenter

Sfstringutil more detailed string processing

Sftouchdispatcher

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

Stream directory binary file read/write operation Encapsulation

Related to package hot update

Scene management

Net network

Eventset event

Core writes a sprite class separately. What are the benefits of displaying the sprite on a map?

Main mmo map and other Element Logic of map

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.