Today I started learning Cocos2D-x game development.
Cocos2D-x game development framework is not very familiar at present, as the ITf logging woodworking I decided to deal with it a little bit.
Before getting started, we should popularize the
This evening, I set up a development environment. because I only have an android mobile phone and I cannot afford apple, I naturally just tried to build an android environment.
My system is win7 64-bit edition. I tried to play cocos2dx 2.2.1 a
A few days of painstaking efforts have been made, and various errors and methods have finally been settled.
Cocos2d-x-2.2 is a relatively stable version, cocos2d-x versions are somewhat different, so it is not guaranteed to be the same! The
1. In cocos2dx, the following coordinate systems are supported:
● Screen coordinate system: the origin is in the upper left corner, the X axis is right, and the Y axis is down. (For example, when processing a touch event, the coordinates in the
1. reference counting mechanism
To understand the reference counting mechanism of cocos2dx, Let's first look at the CCObject class.
class CC_DLL CCObject : public CCCopying{public: // object id, CCScriptSupport need public m_uID unsigned int
For ReactiveCocoa, you must first understand three concepts: map, filter, and fold.Functional Programming with RXCollections
One of the key concepts of functional programming is that of a "higher-order function ".
Accordingto Wikipedia, a
When adding images for sharing a few days ago, we found that the full screen size exceeds the packet size. Therefore, we can reduce the size of screenshots to 0.5 times.The following screenshot code:
Void LHUtil: screenShoot () {Size
The previous section explains how to load the cocostudio UI file (refer to: cocos2d-x lua script how to load the UI File Created by Cocostudio) So how do we get the controls on the UI? The answer is to search by Name or Tag and use the
This blog will use Cocos2d-x 2.2.1 version + Xcode5.0 to make a simple drawing board tool, the principle is based on OpenGL painting points and draw line function, by touch the screen, save all the touch points in the container, and draw points
Precautions for setting high definition mode for cocos2d-x 2.0.3 (removed-hd Mode)
2. after the hd mode is enabled before x, the underlying layer will automatically add-hd to the image name when the addImage is enabled. The-hd image is
If you have time, write it. Then,
Create a new JlmLayer class and declare it in. h:
# Pragma once # include "e: \ cocos2d-x \ cocos2d-x-2.2 \ cocos2d-x-2.2 \ cocos2dx \ layers_scenes_transitions_nodes \ cclayer. h "# include" cocos2d. h "# include"
Use the HelloCpp project to modify the code:
#ifndef __HELLOWORLD_SCENE_H__#define __HELLOWORLD_SCENE_H__#include "cocos2d.h"class HelloWorld : public cocos2d::CCLayer{public: virtual bool init(); static cocos2d::CCScene* scene();
Hello everyone!
Here I am introducing the original method of editing, I personally think it is also a more general method, whether it is now cocos2d-x 2.2 or cocos2d-x 3.0 version is the same
First, we will introduce the android compilation process:
First of all, I want to explain: This is a story about the competition between a female Master and John three for a male master! The story scene is a huge scale and closely related to the story,Aison apartment in love apartment...Episode on the plot
In games, we often encounter the need to display a large Chinese conversation. In this case, we need to load some custom Chinese character formats and generate a pile of pictures directly from the art, which is too memory-consuming for mobile phones,
Flying every day, using box2d for physical features. There are many tutorials on box2d online. We recommend the official manual, Chinese version, and address. I will not repeat the introduction and write something I understand.
The cocos2d-x can
1. Download cocos2d-x
Http://cdn.cocos2d-x.org/cocos2d-x-3.0beta2.zip (official site)
2. Because 3.0 requires python compilation, you need to build a python environment.
Download pythonhttp: // www.python.org/ftp/python/3.3.4/python-3.3.4.msi
Coding environment: Xcode5.0 + cocos2d-x-2.2.2
The vast majority of current Cocos2d-x projects use lua scripting language. Today we will learn how to parse and encode json-format data in Lua scripts.
In Cocos2d-x 2.2.2, the engine provides
In this section, I will implement the game selection interface, where the game is set to 50 and each screen is set to 15, with a total of 4 screens. The screen can be switched to the previous one by swiping left, slide right to switch to the next
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.