1 - C++ Development of "Fight the Landlord" - Overview

Translation: Recently, I have been studying cocos2dx for developing game clients, and I am planning to create a game of “Dou Dizhu” (a Chinese card game) by myself.

The main tools for this program development are: the YLIB cross-platform development library and cocos2dx.

For communication data, JSON is directly used with the structure: TYPE, ACTION, and DATA (actual data). To handle the packet fragmentation issue, I employed the Pack model of HPSocket, which automatically handles packet fragmentation and ensures the integrity of packets.

Client

The website found a resource package for Happy Landlord from N years ago, which includes resources such as pictures and music (click to download)

图片.png

Client effect preview

图片.png

图片.png

图片.png

Version:cocos2d-x-4.0

Background

Translation: Initially, the server used Skynet, whose design architecture made server development extremely straightforward. However, I found that Lua scripts are only suitable for developing small functional modules, and they are not suitable for complete involvement from start to finish. One issue is the complexity of debugging, and another is the lack of good IDE prompts, making it difficult to troubleshoot problems before running.

Due to my limited abilities, the development of the Skynet server was not continued.

Subsequently, I switched to using the YLIB cross-platform development library to develop the C++ backend for the “Dou Dizhu” game.

图片.png

Title of this article:<1 - C++ Development of "Fight the Landlord" - Overview>Author:minimini
Original link:https://www.xxmjw.com/post/13.html
Unless otherwise specified, all content is original. Please indicate when reprinting.

Related

minimini

minimini