简体   繁体   English

什么是最佳的Android布局,Canvas或SurfaceView或Cocos2d android?

[英]What will be the best Android layout or Canvas or SurfaceView, or Cocos2d android?

I am planning to make treasure hunt game which will contain particles effect,animation, Pinch Zoom or double tap Zoom and Scrolling. 我打算制作寻宝游戏,其中将包含粒子效果,动画,捏缩放或双击缩放和滚动。 What will be the best to work with treasure hunt game. 什么是与寻宝游戏一起工作的最佳选择。 I mean smooth zoom , nice particle etc .. and also resources or some example because I am new to android this will be learning process for me. 我的意思是平滑缩放,漂亮的粒子等..还有资源或一些示例,因为我是Android新手,这对我来说是学习过程。 So what should I choose to go ahead with ? 那么我应该选择什么呢?

Suggestions with reason will be appreciated because I need to know why canvas not or surfaceview or cocos2d not. 有理由的建议将不胜感激,因为我需要知道为什么不选择canvas,surfaceview或cocos2d。

I'd suggest you to use a SurfaceView, because you needn't work with Layouts and XML Files, so it's faster than a custom Custom View or Android Layout, because of it's hardwarenearness. 我建议您使用SurfaceView,因为您不需要使用布局和XML文件,因此由于其硬件方面的优势,它比自定义自定义视图或Android布局要快。 SurfaceView is also the most common way to draw in games, so you'll find many tutorials on this in the internet()( for example the well done Droidnova tutorial ). SurfaceView也是最常见的绘制游戏方式,因此您可以在internet()中找到许多与此相关的教程( 例如,做得很好的Droidnova教程 )。

It should be possible to recognize gestures with the abstract Surface View class onTouchEvent. 应该可以使用抽象的Surface View类onTouchEvent识别手势。

There are also some game engines, which are easy to use and sometimes even have a good performance, but they are often bad documentated and debugging is hard, if you doesn't know the underlying source code, so I wouldn't suggest them. 还有一些游戏引擎,易于使用,有时甚至具有良好的性能,但是如果您不知道底层的源代码,它们通常会被不良记录,并且很难进行调试,因此我不建议您这样做。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM