10 2011 档案

war3骚招之剑牛拆家流
摘要:因为昨天晚上没有看小说玩游戏,所以今天一大清早就醒了平时都是躺在床上玩到凌晨4~5点才睡觉,昨天想了下这样对身体不好,于是不到1点便睡觉了这只是一个开始,今后会尽量在晚上11点前睡觉,人早睡早起身体好,而且精神状态能够比较振奋早上早点起床的话可以看日出,晨练,如果中午才起床的话,那么就只能看日落了日出日落,何去何从?!因为从事电脑相关的工作,所以每天对着液显N个小时,熬夜使 经常地事儿(夜里coding多灵感,个人见解)现在身体变得比以前差了很多,一个是怕冷,另一个是掉发怕冷和免疫系统下降有关(辐射,熬夜),掉发的可能原因在于头皮多油脂(熬夜导致解毒时间肝不能正常解毒,肝功能下降,分解油脂的能 阅读全文

posted @ 2011-10-27 08:50 yang3wei 阅读(225) 评论(0) 推荐(0)

'cassert' file not found
摘要:[MAC] Adding Box2D to projecthttp://www.cocos2d-iphone.org/forum/topic/12221终于成功将Box2D源码添加到项目中来了~具体步骤参见上一篇文章,按照上篇文章的步骤做完以后,又出了一个问题:'cassert' file not found如下图所给出的解决方案说述:皆是因为oc和c++混编要将所有与c++扯上关系的.m文件改成.mm文件(也包括app delegate) 阅读全文

posted @ 2011-10-26 20:04 yang3wei 阅读(1833) 评论(0) 推荐(0)

在mac应用中使用GDataXML,添加Box2D到Mac应用
摘要:要用oc写一个mac应用,出现了一些问题:一、按照上次在ios游戏中配置那样弄了下GDataXML,发现不行,上次的理解还是有一些偏差;二、由于要使用到b2Vec2数据类型,因此要将Box2D的源码组织到项目中去,在这里又出现了问题。下面是几个解决了我疑惑的帖子:libxml/tree.h no such file or directoryhttp://stackoverflow.com/questions/1428847/libxml-tree-h-no-such-file-or-directoryYou also need to add/usr/include/libxml2to your 阅读全文

posted @ 2011-10-26 18:49 yang3wei 阅读(189) 评论(0) 推荐(0)

学习娱乐一点经验
摘要:宏:宏是预处理时就替换掉的,宏和程序是没有任何关系的,只是编译前的一个字符替换而已。游戏:游戏已经顺利完成CCRenderTexture的纹理平铺功能,这样的话,就可以以很小的纹理图片来铺满一个很大的形状考虑到游戏的易操作性,不得已将地图要做的很大,地图大的话,地形也会随着增大这样纹理图片的大小就是一个很尴尬的问题据说支持 Retina Display的 IpodTouch4g 最大支持4个屏幕大小的图片(我也不确定)那么这个大小就是 960*2 620*2。。其实当初没想到要开启 retina模式,但鉴于常规情形下 opengl的犬齿实在太刺眼不得不开启Retina来减轻这个症状,retin 阅读全文

posted @ 2011-10-26 16:47 yang3wei 阅读(128) 评论(0) 推荐(0)

OpenGL:反走样
摘要:转载自:http://blog.csdn.net/d04421024/article/details/4852698由于计算机以离散点生成图形,生成图形必然与真实景物存在差距,这种差距表现为:直线或光滑曲面的锯齿、花纹失去原有色彩形状、细小物体在画面的消失等。统统叫做走样(aliasing)。反走样可以减少这种情况。粗略设想一下,就是把原来边界的地方锯齿部分用低饱和度的点补上,这样既不影响整体轮廓,又获得较好的平滑效果。用于减少和消除各种走样现象的方法就是反走样。通常反走样的方法有提高分辨率法、非加权区域采样法、加权区域采样法等,但是在OpenGL中实现反走样就简单的多。反走样前提供“提示”采 阅读全文

posted @ 2011-10-25 14:11 yang3wei 阅读(371) 评论(0) 推荐(0)

iPhone 多点触控处理原则
摘要:转载自:http://www.cocoachina.com/iphonedev/sdk/2011/0509/2843.htmlUIView 继承的 UIResponder (负责 UI 事件处理) 类中提供了四个方法处理多点触控:- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;- (void)touchesEnded:(NSSet *)touches withEvent:(UIEven 阅读全文

posted @ 2011-10-24 23:59 yang3wei 阅读(252) 评论(0) 推荐(0)

真机测试时不小心拔掉机器导致的 一个bug及解决方案
摘要:参考帖子:http://stackoverflow.com/questions/788277/iphone-strange-error-when-testing-on-simulator真机测试的时候不小心吧touch4g拔下来了,结果导致再次运行程序的时候,报出以下错误:Couldn't register com.myApp.debug with the bootstrap server.Error: unknown error code.This generally means that another instance of this process was already ru 阅读全文

posted @ 2011-10-24 18:22 yang3wei 阅读(132) 评论(0) 推荐(0)

Gravity Tutorial for iPhone, Part 5
摘要:转载自:http://www.bit-101.com/blog/?p=1824For the final installment in this series, we’ll add accelerometer support to the ball, allowing you to tilt the device to change the direction of “down”. Note, although you can rotate the device in the iPhone simulator, this does not simulate acceleration. The 阅读全文

posted @ 2011-10-24 01:34 yang3wei 阅读(172) 评论(0) 推荐(0)

Gravity Tutorial for iPhone Part 2
摘要:转载自:http://www.bit-101.com/blog/?p=1793See this note.Inpart 1, we created a Ball class which contained position, velocity, radius, and a color. And we set up a timer to update the ball’s position based on its velocity and bounce off the walls.Now let’s render that ball to the screen.Rendering is don 阅读全文

posted @ 2011-10-24 01:04 yang3wei 阅读(118) 评论(0) 推荐(0)

iphone--UIViewController与UIView的关系
摘要:转载自:http://www.cocoachina.com/bbs/simple/?t38766.htmliphone--UIViewController与UIView的关系UIViewController和Uiview是两个不同的类UIViewController是视图控制器而UIView是视图也就是说,UIViewController是控制UIView的。你也可以认为UIViewController就是一个相框而UIView就是一个相片相框可以随时随地的拿走这个相片而换另外一张相片或者在这张相片上加一个新的相片。而相片却不能操纵相框的。UIView工作在第一线,向用户展示表现的内容,并接受 阅读全文

posted @ 2011-10-24 00:53 yang3wei 阅读(187) 评论(0) 推荐(0)

Xcode 4.2 iOS SDK 5 View Based Application
摘要:转载自:http://stackoverflow.com/questions/7856051/xcode-4-2-ios-sdk-5-view-based-application问:does anyone know how I can start a new view based application in Xcode 4.2?There is no option to do this like there was in previous versions of Xcode. Thanks答:It's now called "Single View Application& 阅读全文

posted @ 2011-10-23 23:30 yang3wei 阅读(130) 评论(0) 推荐(0)

关于 ARC forbids explicit message send of 'release'
摘要:转载自:http://stackoverflow.com/questions/7164848/arc-error-when-compilingSimply remove all calls to-release. You're not allowed to call-releaseunder ARC because the compiler will insert all the necessaryretain/releasecalls for you. Read more about ARChere.The other way is to use the conversion too 阅读全文

posted @ 2011-10-23 22:59 yang3wei 阅读(298) 评论(0) 推荐(0)

Cocos2d开发系列(三)
摘要:转载自:http://blog.csdn.net/kmyhy/article/details/6320548正好不知道接下来要怎么写的时候,发现了一本好书:《Learn IPhone and iPad Cocos2d Game Delevopment》。于是直接翻译了第4章的例子。如果你看过这部分内容,可以直接跳过不看了。 本章讲如何响应加速器事件。一、游戏介绍这个例子是一个叫做Doodle Drop的游戏,是一个重力感应类游戏。玩家操纵角色来躲避从空中坠落的障碍物。游戏界面如下:二、设置主场景1、新建Cocos2d Application,工程名DoodleDrop。2、游戏主场景。选Fil 阅读全文

posted @ 2011-10-23 12:24 yang3wei 阅读(171) 评论(0) 推荐(0)

cocos2d L1
摘要:转载自:http://blog.sina.com.cn/s/blog_558042a70100kvve.htmlScene 设置://设置layer是否支持触摸,这个Demo中支持触摸是必须的.self.isTouchEnabled = YES;//设置layer是否支持重力计感应,打开重力感应支持,会得到accelerometer:didAccelerate:得回调self.isAccelerometerEnabled = YES;//获得OpenGL View的尺寸,虽然这里是winSize,其实并不一定是整个windows的size.CGSize wins= [[CCDirector s 阅读全文

posted @ 2011-10-23 12:09 yang3wei 阅读(133) 评论(0) 推荐(0)

Cocos2D CCRenderTexture莫名其妙报错的问题
摘要:注意两点就行了:一个就是:1。CCRenderTexture在初始化的时候高度和宽度不能小于1(这是模拟器的要求)报错之后的表现为:虽然画面卡住(就如同opengles罢工不做渲染了一样),但程序依然能够正常执行,box2d引擎工作也很正常(通过控制台输出进行检查)~满足了上述的要求,程序能够很好的运行在模拟器里面~但是,在模拟器里面能很好的运行不代表也能在设备里面很好的运行~就如同之前的音频播放一样,在模拟器和真机上这两者是有区别的,那就是:2。CCRenderTexture的高度和宽度在设备里面一定不能小于 32(详见如下提供的资料)3。CCRenderTexture的高度和宽度不能大于 阅读全文

posted @ 2011-10-22 03:43 yang3wei 阅读(307) 评论(0) 推荐(0)