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