我正在创建一个游戏,要求屏幕上的单位根据团队和每个团队的指定敌人进行战斗.玩家不控制任何坦克或团队.
问题在于单位之间的战斗(目前的坦克)对于玩家来说应该足够有趣,他们可以在不做任何事情的情况下观看并享受乐趣.
我现在让坦克完全随机移动并在射程内相互射击,但我正在寻找更聪明的东西.
我应该研究哪些类型的ai和ai算法?欢迎所有的想法,我只是想让每场战斗都变得有趣.
在我的应用程序中,我使用此函数创建一个unsigned char指针:
- (unsigned char*)getRawData
{
// First get the image into your data buffer
CGImageRef image = [self CGImage];
NSUInteger width = CGImageGetWidth(image);
NSUInteger height = CGImageGetHeight(image);
CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
unsigned char *rawData = malloc(height * width * 4);
NSUInteger bytesPerPixel = 4;
NSUInteger bytesPerRow = bytesPerPixel * width;
NSUInteger bitsPerComponent = 8;
CGContextRef context = CGBitmapContextCreate(rawData, width, height, bitsPerComponent, bytesPerRow, colorSpace, kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big);
CGColorSpaceRelease(colorSpace);
CGContextSetBlendMode(context, kCGBlendModeCopy);
CGContextDrawImage(context, CGRectMake(0.0f, 0.0f, (CGFloat)width, (CGFloat)height), image);
CGContextRelease(context);
// Now your …Run Code Online (Sandbox Code Playgroud) 通过iTunes Connect添加应用程序时,我无法注册新的软件包ID.我被带到https://developer.apple.com/iphone/my/bundles/index.action,显示404错误.我假设这是一个挥之不去的问题,因为苹果没有完全修复其开发者网站,但我觉得可能只是我有这个问题.
有人可以确认iTunesConnect的注册新捆绑ID功能仍然不可用吗?或者,如果可用,我将如何重新获得访问权限?
我的应用程序Crash Pad Drums报告了一次崩溃.它引用了某些cy钹声音导致iPod 4崩溃的问题.一个问题.我在iPod touch 2上找不到崩溃,而且我没有iTouch 4.
我能做些什么呢?
另外,我的应用程序今天是免费的.如果有人可以下载它并找到崩溃的情况,我将欠你的债务.
编辑:澄清
我实际上无法导致崩溃,因为我没有更新的设备可供测试.我怀疑这是我现在正在研究的iOS 5问题,但是将来如果我是廉价的并且不愿意购买新的iTouch,我该怎么办?
编辑:
Console log:
2011-10-14 23:08:25.797 Crash Pad[794:12203] -[NSConcreteValue doubleValue]: unrecognized selector sent to instance 0xec9e2e0
2011-10-14 23:08:25.798 Crash Pad[794:12203] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSConcreteValue doubleValue]: unrecognized selector sent to instance 0xec9e2e0'
*** First throw call stack:
(0x1c49052 0x21fdd0a 0x1c4aced 0x1baff00 0x1bafce2 0x16f4f0 0x15d99e 0x14e0d8 0x168d42 0x15ace2 0x5c28c7 0x5c2a31 0x5c2d45 0x1be0f4a 0x1bac665 0x1bac056 0x5c2c43 0x249c8 0x24a58 0x8a72 0x1c4aec9 0x67a299 0x67a306 …Run Code Online (Sandbox Code Playgroud) 我确信之前已经问了很多次,但它仍然给我带来了麻烦.我定义了我的类的布尔属性,如下所示:
@property(readwrite,assign) BOOL namesVisible;
Run Code Online (Sandbox Code Playgroud)
并且它不会给编译器错误,但NSLogs为(null).显然我在这里做错了,但我不知道它是什么.
有谁知道我在哪里可以找到一个iphone应用程序网站的模板,其中iphone被用作视频框架并且在景观中?我找到一个很难找.谢谢!
在我的应用程序中,我一直在使用现已弃用的shouldAutoRotateToFace方法.现在,当使用iOS 6模拟器时,我的所有子视图都会在设备处于横向状态时旋转为纵向.有谁知道是什么原因引起的?我已经尝试使用supportedOrientations方法替换我的主视图控制器中的autorotate(或者你现在应该使用的任何东西).