自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Skyman的部落格

能工摹其形,巧匠摄其魂

  • 博客(242)
  • 收藏
  • 关注

原创 游戏开发踩的那些坑:abs函数的平台差异

转载请注明,来自:http://blog.csdn.net/skyman_2001我写了个弹性3D箭头功能,指定起点、终点和圆弧的夹角,就会渲染出弯曲的3D箭头,里面用了abs函数计算浮点数的绝对值,在windows上运行没问题,打了安卓包,在手机上运行发现箭头的位置错了,经过调试发现,abs函数取的浮点数(小于1)的绝对值为0!一查文档,原来abs函数不加std的命名空间,是调用的C语言的abs函数,只处理整数,要想处理浮点数,必须调用std::abs或fabs函数,详见:https://stac

2020-07-05 00:23:16 536 2

原创 fopen vs access vs stat

转载请注明,来自:http://blog.csdn.net/skyman_2001vs2010, win7function  |     call time--------------------------------fopen        1.149000 ms_access    0.108000 ms stat           0.148000 m

2014-09-24 20:59:29 3693

转载 ios platform 型号

转载自:

2014-09-02 14:10:24 3360

转载 iOS crash reports: get symbol by address using atos

Say you've got the following line in your crash log that you want to symbolicate:5 MyApp 0x0044e89a 0x29000 + 4348058The first hex number is the stack address, and the seco

2014-09-01 22:17:39 3087

原创 C++访问lua函数性能测试结果

转载请注明,来自:http://blog.csdn.net/skyman_2001lua版本是5.11. windows平台     CPU: Intel Core i5 3.20GHz 3.60GHz     内存: 8G     操作系统:win7 64位     测试数据:执行125次耗时0.067毫秒2. ios平台    iPhone 4s

2014-08-20 17:39:48 3416

原创 关于ios下字体描边的一个细节

转载请注明,来自:http://blog.csdn.net/skyman_2001   CGContextSetTextDrawingMode(context, kCGTextStroke);   CGContextSetRGBStrokeColor(context, pInfo->strokeColorR, pInfo->strokeColorG, pInfo->strokeColo

2014-07-15 18:22:59 4005

转载 Tim Sweeney解释为什么Unreal Engine 4全面转向C++

摘自:https://forums.unrealengine.com/showthread.php?2574-Why-C-for-Unreal-4

2014-04-17 20:53:10 5759

转载 How to debug a GLSL shader?

摘自:http://stackoverflow.com/questions/2508818/how-to-debug-a-glsl-shadervoid main(){ float bug=0.0; vec3 tile=texture2D(colMap, coords.st).xyz; vec4 col=vec4(tile, 1.0); if(something) b

2014-03-21 00:42:58 4698

原创 C++ Debug Tips

转载请注明,来自:http://blog.csdn.net/skyman_2001这里记录我平时调试C++的一些技巧心得,会持续更新。1. 用typeid()取得某对象的类型   Debug情景:        一个vector变量m_views里有多个IObjectView *指针,分别是不同的IObjectView子类对象,怎么知道每个对象具体是什么子类呢?

2014-03-06 15:46:00 2859

原创 客户端瘦身

转载请注明,来自:http://blog.csdn.net/skyman_2001我们客户端刚开始编译出来有20MB,通过下面措施成功瘦身为6MB:For the release build make sure that: - "Deployment Post Processing" is enabled (otherwise the whole stripping p

2014-03-04 22:23:51 3276 3

原创 bsdiff test

转载请注明,来自:http://blog.csdn.net/skyman_2001Test Case 1:libcurl.dylib           354kblibcurl+ssl.dylib   412kb------------------------------------------diff: 65kbTest Case 2:libcurl

2014-03-02 22:30:23 2968

转载 VS2010 LNK1123: 转换到 COFF 期间失败: 文件无效或损坏 的解决方法

原文地址:http://my.oschina.net/pandao/blog/136212用VS2010编译C++项目时出现这样的错误:LNK1123: 转换到 COFF 期间失败: 文件无效或损坏 解决方法:1、搜索C盘下的cvtres.exe,结果得到类似这样的列表:C:\Program Files\Microsoft Visual Stud

2014-03-02 18:10:58 3093

原创 google breakpad使用心得

转载请注明,来自:http://blog.csdn.net/skyman_2001游戏在某些android手机上会崩溃(调试时不会崩溃),所以想用google breakpad来生成minidump,以便看到崩溃的堆栈。google breakpad的配置和使用网上有很多资料,这里就不讲了,推荐看这2个:1. http://code.google.com/p/google-breakp

2014-02-10 11:38:33 5628 1

原创 c++ template笔记

1. 数组template void array_print(T (&arr)[N]){ for(int i = 0; i < N; ++i) { cout << arr[i] << endl; }}int arr[5] = {1, 2, 3, 4, 5}; array_print(arr); //实例成 array_print(int(&)[100])2. 返回

2013-12-17 00:31:01 3545 4

原创 设计模式c++实现(一):装饰(Decorator)模式

转载请注明,来自:http://blog.csdn.net/skyman_2001class Component{public: Component() {} virtual ~Component() {} virtual void operation() = 0; virtual Component *remove() = 0;};class ConcreteCompon

2013-12-11 19:49:00 2855

转载 VC2005利用正规表达式做快速替换

原文地址:http://hi.baidu.com/kidcdf/item/f10618926b9a5dba83d29539比如有以下代码pkConan = NULL;pkKid=NULL;pkFuBu = NULL;pkLan = NULL;你想要换成你自己的宏 #define MyDelete(v) {if(v) delete v; v

2013-12-09 14:50:03 2823

转载 Magic debug values

摘自:http://en.wikipedia.org/wiki/Magic_number_(programming)CodeDescription..FACADE"Facade", Used by a number of RTOSes1BADB002"1 bad boot", Multiboot header magic numb

2013-12-03 15:47:18 3255

转载 VC工程的命令行编译法

原文地址:http://www.cppblog.com/sunicdavy/archive/2013/11/05/204099.html我使用的是VS2010, 老版本的未测call "c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"    cd 你的工程sln目录MSBuil

2013-11-05 20:22:36 2801

转载 让VC调试器正确显示UTF-8字符串

原文地址:http://www.cppblog.com/sunicdavy/archive/2012/02/14/165566.html默认的, VC调试器只能正常显示ANSI字符串及UNICODE字符串, 而UTF-8字符串及其他格式则无法显示这里无需编写插件及修改配置文件,只需要将要显示的字符串拉到Watch中,并在变量后面添加,s8即可显示 --> 同样类型的

2013-11-05 20:21:11 2889

原创 Game Map Demo

转载请注明,来自:http://blog.csdn.net/skyman_2001

2013-10-30 18:00:03 2740

转载 The Use of Design Patterns In Game Development

原文地址:http://gamedev.stackexchange.com/questions/4157/what-are-some-programming-design-patterns-that-are-useful-in-game-developmentBuilder: set up component-based entity one component at a

2013-10-17 13:33:42 2783

转载 C++ 11 in Xcode

原文地址:http://stackoverflow.com/questions/10438253/im-having-some-trouble-with-c11-in-xcode

2013-09-29 15:42:43 3061

原创 C++ 11学习(1):lambda表达式

c++ 11 lambda & function

2013-08-26 15:54:03 1880

转载 关于mysql中的key和index

1. 官方文档:http://dev.mysql.com/doc/refman/5.5/en/create-table.htmlKEY is normally a synonym for INDEX. The key attribute PRIMARY KEY can also be specified as just KEY when given in a col

2013-05-22 12:27:43 2146

原创 关于Erlang Socket的三种消息接收模式

转载请注明,来自:http://blog.csdn.net/skyman_2001erlang的socket有3种消息接收模式:active、passive和active once,可以在gen_tcp:connect/3或gen_tcp:listen/2里设置{active, true | false |once}来实现,也可以用inet:setopts/2来动态设置。这3种模式的区别是:

2013-04-11 10:51:21 3355

原创 关于erlang socket被动模式和delay_send合用的问题

转载请注明,来自:http://blog.csdn.net/skyman_2001有项目反应服务器遇到ports()里的port,其port_info/1返回是undefined的问题,而且出现这个后,erlang:halt()不能正常关闭节点,要用erlang:halt(Status, [{flush, false}])才能关闭节点。在很多客户端同时关闭时比较容易重现。我在网上erlang论

2013-03-30 11:02:30 3805

原创 The layout of PID & PORT in the ERTS

转载请注明,来自:http://blog.csdn.net/skyman_2001我在调试erts时发现PID和PORT ID在底层是个整型,但是在erlang层的表示是和#Port的格式,它们之间是怎么转换的呢?通过grep发现在erts/emulator/beam/erl_term.h里有关于PID和PORT的layout说明,这里只谈论本节点情况下的layout: *  PI

2013-03-24 01:29:58 1691

转载 关于erlang:halt的更新说明

摘自:http://www.erlang.org/download/otp_src_R15B01.readmeOTP-9985  == erts stdlib ==     When an escript ends now all printout to standard output and     standard error gets out on the termina

2013-03-17 21:40:31 2114

原创 关于erlang节点显示“*** Terminating erlang”的问题

转载请注明,来自:http://blog.csdn.net/skyman_2001在ssh子shell里启动erlang节点,会显示“*** Terminating erlang”,然后节点退出。解决方法是启动时加上-noshell标记,下面是官方文档对-noshell标记的说明:-noshellStarts an Erlang runtime system with no she

2013-03-07 15:39:17 2682

原创 Mysql压力测试shell脚本

转载请注明,来自:http://blog.csdn.net/skyman_2001Mysql自带了压力测试工具mysqlslap,所以我们可以不用自己编写程序来测试Mysql读取的压力。压力测试shell脚本如下:#!/bin/shwhile truedo mysqlslap --concurrency=100 --iterations=10 --create-schema='

2013-02-28 22:52:13 3414 1

原创 Android & AIR tips

转载请注明,来自:http://blog.csdn.net/skyman_2001一、AIR1. Another difference between desktop and mobile devices is that Flash Player strives to improve performance by defaulting to medium quality on mobi

2013-02-27 23:19:10 1239

转载 linux的ulimit命令

原文地址:http://www.ibm.com/developerworks/cn/linux/l-cn-ulimit/选项 [options]含义例子-H设置硬资源限制,一旦设置不能增加。ulimit – Hs 64;限制硬资源,线程栈大小为 64K。-S设置软资源限制,设置后可以增加,但是不能超过硬

2013-02-04 15:59:46 1299

原创 Erlang VM汇编指令

转载请注明,来自:http://blog.csdn.net/skyman_2001可以用erts_debug:instructions()得到Erlang虚拟机的所有的汇编指令。以R15B01版本为例,共有452个汇编指令:"allocate_tt","allocate_heap_tIt","allocate_heap_zero_tIt", "allocate_init_tIy","a

2013-01-25 21:05:44 3187

转载 关于Lock和Lock Contention的2张图

原文见:Locks Aren’t Slow; Lock Contention Is1. Lock Contention Benchmark2. Lock Frequency Benchmark

2012-12-15 17:18:47 1956

原创 erlang调用外部程序如何得到其退出状态

转载请注明,来自:http://blog.csdn.net/skyman_2001经常会有erlang程序调用外部程序的需求,比如调用shell命令程序,一般是用os:cmd/1,比如:1> os:cmd("pwd")."/home\n"不过os:cmd/1是不能获知外部程序的退出状态的,比如外部程序是正常退出还是异常退出。怎么获知外部程序的退出状态呢?可以用erlang:ope

2012-12-11 21:57:52 2662

原创 关于Flash Player 10 socket connection timeout

转载请注明,来自:http://blog.csdn.net/skyman_2001今天我在调试游戏的时候,发现一个有趣的现象,就是flash连接上服务器后,服务器关闭连接,flash会触发securityError事件,用google搜索了一下,找到了官方的这篇文章:http://helpx.adobe.com/flash/kb/flash-player-10-socket-connectio

2012-11-24 17:34:15 2242

原创 页游外网玩家数据转档总结

转载请注明,来自:http://blog.csdn.net/skyman_20011. 转档之前策划要和程序、运营一起商量制定周详的转档方案,要三方根据自己的专业知识和经验来统计出哪些数据需要转档,怎么转比较平滑和完美,能够尽最大努力照顾到每个玩家的利益,但又不至于实现成本太高,总之转档数据要全面,不要有遗漏,特别是和其他系统有交互的数据,更要注意,还有就是综合权衡,制定出一个最优

2012-11-17 20:03:40 2023

原创 谈谈erlang:exit/2

转载请注明,来自:http://blog.csdn.net/skyman_2001有同学用erlang:exit(Pid, normal)来关闭Pid进程,其实这样Pid进程是不会自动退出的。官方文档上对erlang:exit/2的说明讲得很清楚:Sends an exit signal with exit reason Reason to the processPid.

2012-10-27 18:01:43 4553

转载 Erlang学习时间曲线

招新人时可以借鉴下:

2012-10-22 22:13:12 2338

转载 Erlang explained: Selective receive

原文地址:http://ndpar.blogspot.de/2010/11/erlang-explained-selective-receive.htmlIf you worked with Erlang you've probably heard about selective receive. But do you actually know how it works? I want to

2012-10-18 16:30:25 1236

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除