2012年1月7日

cocos2d-x 10.1版本 修复真机上白屏问题

摘要: ########################################################10.1 版本修改底层记录 (游戏开发群:主席)群号:44727718#######################################################1. 修改:CCTextureCache.h 1.)添加:VolatileTexture::addDataTexture(CCTexture2D *tt,const void* data,CCTexture2DPixelFormat pixelFormat,unsigned int pixelsWide.. 阅读全文

posted @ 2012-01-07 19:58 游戏开发:主席 阅读(1498) 评论(2) 推荐(1) 编辑

OpenGL库函数列表

摘要: ///////////////////////////////////游戏开发群:44727718///////////////////////////////////OpenGL库函数列表 OpenGl核心函数库 glAccum 操作累加缓冲区 glAddSwapHintRectWIN 定义一组被SwapBuffers拷贝的三角形 glAlphaFunc允许设置alpha检测功能 glAreTexturesResident 决定特定的纹理对象是否常驻在纹理内存中 glArrayElement 定义一个被用于顶点渲染的数组成分 glBegin,glEnd 定义一个或一组原始的顶点... 阅读全文

posted @ 2012-01-07 17:16 游戏开发:主席 阅读(813) 评论(0) 推荐(1) 编辑

2012年1月4日

C++ Builder 全部API函数列表

摘要: 1.API之网络函数WNetAddConnection创建同一个网络资源的永久性连接WNetAddConnection2创建同一个网络资源的连接WNetAddConnection3创建同一个网络资源的连接WNetCancelConnection结束一个网络连接WNetCancelConnection2结束一个网络连接WNetCloseEnum结束一次枚举操作WNetConnectionDialog启动一个标准对话框,以便建立同网络资源的连接WNetDisconnectDialog启动一个标准对话框,以便断开同网络资源的连接WNetEnumResource枚举网络资源WNetGetConnect 阅读全文

posted @ 2012-01-04 22:59 游戏开发:主席 阅读(1100) 评论(0) 推荐(0) 编辑

2011年12月28日

cocos2d-x动作类游戏,人物排序(层次关系)

摘要: 1 void WGBattleLayer::RoleSeqencingZ() 2 { 3 int length = (int)this->vector_All_Roles_->size(); 4 for (int i=0;i<length;i++) 5 { 6 for (int j=0;j<length - i - 1;j++) 7 { 8 //NO.1 9 WGRole* RoleA = this->vector_All_Roles_->at(j);10 WGRo... 阅读全文

posted @ 2011-12-28 15:32 游戏开发:主席 阅读(2354) 评论(0) 推荐(0) 编辑

2011年12月2日

像素级别的多边形碰撞

摘要: boolean isCollisionPolygon(int[] xPoints, int[] yPoints, int posx, int posy) { int i, j; int y; int miny, maxy; int x1, y1; int x2, y2; int ind1, ind2; int ints; int[] polyInts; int nPoints = xPoints.length; if (nPoints < 3) { return false; } polyInts = new i... 阅读全文

posted @ 2011-12-02 16:17 游戏开发:主席 阅读(525) 评论(0) 推荐(0) 编辑

2011年11月16日

Android SDK Android NDK 官方下载地址

摘要: Android NDK r6bWindowshttp://dl.google.com/android/ndk/android-ndk-r6b-windows.zipMac OS X(intel)http://dl.google.com/android/ndk/android-ndk-r6b-darwin-x86.tar.bz2Linuxhttp://dl.google.com/android/ndk/android-ndk-r6b-linux-x86.tar.bz2Android SDK 3.2Windowshttp://dl.google.com/android/android-sdk_r1 阅读全文

posted @ 2011-11-16 17:57 游戏开发:主席 阅读(1499) 评论(0) 推荐(0) 编辑

2011年11月2日

cocos2d-x自适应屏幕分辨率

摘要: Android下分辨率太多,不太可能为每种分辨率做一套资源,目前一般来说比较流行的是320*480, 800*400, 854*400。当然现在720P的也出来了,但至少目前不是主流机型^_^.对于不支持的分辨率,我希望的是能够按照屏幕大小按比例缩放,即有了下面的代码。1:ViewAutoScale写了一个ViewAutoScale函数,如下:view plain#include"ViewAutoScale.h"USING_NS_CC;boolIsMatchDisplay(intw,inth,CCSize&size){return(w==size.width& 阅读全文

posted @ 2011-11-02 15:39 游戏开发:主席 阅读(9091) 评论(0) 推荐(0) 编辑

创建 cocos2d-x+lua for android 步骤

摘要: 1 LOCAL_LDLIBS := -L$(call host-path, $(LOCAL_PATH)/http://www.cnblogs.com/libs/armeabi) \2 -L$(call host-path, $(LOCAL_PATH)/http://www.cnblogs.com/http://www.cnblogs.com/cocos2dx/platform/third_party/android/libraries) -lcurl \3 -lcocos2d \4 -lcocosdenshion \5 -llua1: 按照普通方法创建工程2:请... 阅读全文

posted @ 2011-11-02 12:49 游戏开发:主席 阅读(9763) 评论(0) 推荐(0) 编辑

2011年7月23日

关于利用 iconv 跨平台转编码问题

摘要: string name = "Ambition";GBKToUTF8(name,"GBK","UTF-8"); //需要转换什么编码只需要更改后面2个参数。万能的(嘎嘎。。。。)游戏开发群:44727718int JCStrCoding::GBKToUTF8(string &gbkStr,const char* toCode/*="gbk"*/,const char* fromCode/*="utf-8"*/){ iconv_t iconvH; iconvH = iconv_open(f 阅读全文

posted @ 2011-07-23 12:29 游戏开发:主席 阅读(518) 评论(0) 推荐(1) 编辑

2011年7月20日

google protobuf 使用心德

摘要: 最近我们开发过程中用到google/protobuf,因为之前没有接触过。网上的资料都是互相复制转载的。基本上都是讲protobuf 怎么赋值怎么取值。。。主要的消息映射讲的微乎其微。。。。。我根据网上说的做了下。。。问题我纠缠死了。。。-_-# OK 看代码 1 GOOGLE_PROTOBUF_VERIFY_VERSION; 2 string str = ""; 3 4 tutorial::AddressBook address_book; 5 tutorial::Person *person = tutorial::Person::default_instance(). 阅读全文

posted @ 2011-07-20 11:38 游戏开发:主席 阅读(950) 评论(0) 推荐(1) 编辑

2011年7月6日

c++和java字节高低位的转换

摘要: 现在我们需要从一个C/C++语言生成的二进制文件中读出一个float数据Java代码//参见java.io.DataInputStream //C++写入的字节顺序是从低到高(左低到右高), 而java.io.DataInputStream读取的数据是从高到低(左高到右低) //所以需要自己改写一下 //功能和java.io.DataInputStream类似的 publicclassCppInputStreamextendsFilterInputStream{ publicCppInputStream(InputStreamin){ super(in); } publicfinalintre 阅读全文

posted @ 2011-07-06 13:56 游戏开发:主席 阅读(9631) 评论(0) 推荐(0) 编辑

2011年7月4日

BSD Sockets API 编程

摘要: intsocket(int family, int type, int protocol);Creates a socket. Currentlyfamilycan only beAF_INET(OT does not support IPv6 so there is no AF_INET6 support).protocolcan bePF_INETorPF_UNSPEC(both have the same effect of creating an internet socket.typecan beSOCK_STREAMfor TCP sockets orSOCK_DGRAMfor U 阅读全文

posted @ 2011-07-04 17:21 游戏开发:主席 阅读(1667) 评论(1) 推荐(1) 编辑

2011年6月7日

android中判断sim卡状态和读取联系人资料的方法

摘要: 在写程序中,有时候可能需要获取sim卡中的一些联系人资料。在获取sim卡联系人前,我们一般会先判断sim卡状态,找到sim卡后再获取它的资料,如下代码我们可以读取sim卡中的联系人的一些信息。 读取的代码如下:packagecom.android.test;importandroid.app.Activity;importandroid.content.Context;importandroid.content.Intent;importandroid.database.Cursor;importandroid.net.Uri;importandroid.os.Bundle;importand 阅读全文

posted @ 2011-06-07 16:14 游戏开发:主席 阅读(3404) 评论(1) 推荐(0) 编辑

腾讯微博Android客户端开发——Parameter类和SyncHttp类编写

摘要: 在上一节介绍的OAuth认证过程中我们可以看到我们需要不断地和腾讯微博开放平台进行数据的交互,因此我们需要编写一个类用来发送Http请求,并且能处理平台返回过来的数据。学习Html的朋友应该知道Get和Post两种方式提交数据,在这里我们同样也需要编写Post和Get两个方法模拟Post和Get请求。在发送微博时我们还可以上传照片,所以我们还应编写一个方法用于上传图片,但是在这里暂时还不编写上传数据的方法。另外在模拟Http请求时我们需要传递参数,因此我们需创建一个Parameter类,表示参数对象。在腾讯微博开放平台中关于oauth_signature参数值的产生过程介绍中有这样一幅描述图( 阅读全文

posted @ 2011-06-07 16:12 游戏开发:主席 阅读(690) 评论(0) 推荐(0) 编辑

2011年5月25日

脏矩形技术

摘要: 优化一直是我在程序中追求的东西之一,想想让自己的游戏在一个古董机器能流畅的运行或者说在当今的机器上,CPU占用率和内存占用率都很低的情况。(毕竟我非常讨厌一个游戏独占了我所有的CPU资源)。 如果从图形接口上作优化,常用的就是使用3D加速和CPU的特殊指令(虽然说DirectDraw能够使用2D硬件加速,但大部分机器支持的仅仅是简单的加速,比如带ColorKey的支持,连一些稍微高级一点的东西,比如Alpha混合,带Alpha通道的纹理(表面)都不支持,需要自己写,优化起来还是使用CPU的特殊指令)。虽然说使用3D加速非常简单,但是它的缺点也非常明显:对硬件有苛刻的要求,如果仅仅是做2D游戏不 阅读全文

posted @ 2011-05-25 12:57 游戏开发:主席 阅读(5799) 评论(0) 推荐(1) 编辑

2011年5月24日

网游服务端开发入门知识

摘要: 大多数的网络游戏的服务器都会选择非阻塞select这种结构,为什么呢?因为网络游戏的服务器需要处理的连接非常之多,并且大部分会选择在Linux/Unix下运行,那么为每个用户开一个线程实际上是很不划算的,一方面因为在Linux/Unix下的线程是用进程这么一个概念模拟出来的,比较消耗系统资源,另外除了I/O之外,每个线程基本上没有什么多余的需要并行的任务,而且网络游戏是互交性非常强的,所以线程间的同步会成为很麻烦的问题。由此一来,对于这种含有大量网络连接的单线程服务器,用阻塞显然是不现实的。对于网络连接,需要用一个结构来储存,其中需要包含一个向客户端写消息的缓冲,还需要一个从客户端读消息的缓冲 阅读全文

posted @ 2011-05-24 19:22 游戏开发:主席 阅读(15283) 评论(6) 推荐(4) 编辑

Java https 源码

摘要: 1 /** 2 * 3 */ 4 import java.io.*; 5 import java.net.*; 6 import java.security.*; 7 import java.security.cert.*; 8 import java.util.*; 9 import javax.net.ssl.*; 10 /** 11 * @author Administrator 12 * 13 */ 14 public class HttpsTest { 15 16 /** 17 * @param args 18 */ 19 public static void main(Strin. 阅读全文

posted @ 2011-05-24 12:36 游戏开发:主席 阅读(2318) 评论(0) 推荐(0) 编辑

2011年3月11日

外挂基础知识入门教学|工具下载

摘要: {threadNotes}外挂制作必备工具下载.工具下载:peid0.94用于查壳,知道什么壳就可以脱壳拉.http://www.pediy.com/tools/unpack/File_analysers/peid/peid.rarOllyDbg调试器调试游戏.http://www.pediy.com/tools/Debuggers/ollydbg/OllyICE.rarOD脱壳脚本用于脱壳.http://www.pediy.com/tools/Debuggers/ollydbg/script.htmLordPE一般用于脱壳.不过还有别的妙用...http://www.pediy.com/to 阅读全文

posted @ 2011-03-11 17:24 游戏开发:主席 阅读(24509) 评论(14) 推荐(15) 编辑

2011年3月7日

《基于MFC的OpenGL编程》 13 part 创建2D 和 3D 文字

摘要: 本文对第11篇文章进行修改,使用显示列表来存储渲染命令。显示列表OpenGL provides a facility to create a preprocessed set of OpenGL commands called a display list. Creating a display list is a straight forward process. We just have to delimit the display list code with glNewList and glEndList. The display list is named by an integer 阅读全文

posted @ 2011-03-07 16:28 游戏开发:主席 阅读(666) 评论(0) 推荐(1) 编辑

《基于MFC的OpenGL编程》Part 12 Creating and Using Display Lists

摘要: 本文对第11篇文章进行修改,使用显示列表来存储渲染命令。显示列表OpenGL provides a facility to create a preprocessed set of OpenGL commands called a display list. Creating a display list is a straight forward process. We just have to delimit the display list code with glNewList and glEndList. The display list is named by an integer 阅读全文

posted @ 2011-03-07 16:23 游戏开发:主席 阅读(155) 评论(0) 推荐(0) 编辑

导航