cocos2d-x+lua开发模式下编辑器的选择

       原本打算直接用CocosIDE的,毕竟是官方出品,而且支持Android远程调试,windows下的调试也很方便,调试的信息也很全,智能提示也不错。好了,一切看上去很完美,但是它有一个致命缺陷,就是继承了eclipse一贯的特性--“卡”。基于java写的eclipse我一直使不惯,一方面是快捷键跟vs迥异,而我又懒得去配置(如果他能像IntelliJ IDEA一样,可以方便的删除重复快捷键,我还有兴致去配置一下,但是重复的快捷键没有任何提示,只是在使用的过程中会有各种问题),另一方面就是内存占用高,卡成翔了。经常打两个字母IDE就卡一两秒钟,当需要代码提示的时候等它提示出来的功夫我早就手打完了。用CocosIDE写代码很不顺手,各种心烦意乱。

       所以我花了一个下午尝试了几个对Lua支持比较好的编辑器,但都是各有各的优点,也各有各的缺点。不像c++,vs+va几乎完美。

1、IntelliJ IDEA Community Edition 

      这个是跟eclipse同等地位,但是各方面都优秀很多的IDE,Android后来也基于这个搞了个Android Studio,试图取代基于eclipse的ADT。

      优点是性能优异,代码提示方便(手打的过程中直接提示,而且几乎没有卡顿)。如果我是java开发那就是不二选择。

      不过我试验了一下它的lua插件,感觉不是很好用。在提示上反而更像一个文本编辑器而不像一个智能的IDE(合情合理,毕竟只是一个插件),这个比CocosIDE要差很多。理论上好好设置下lua的提示文件(跟cocoside格式不同,而且感觉信息很少,比如就没有函数参数信息和返回值信息)是可以达到比较理想的效果的。但是可惜我不会......

2、Lua Studio

       这个貌似是国人写的。非常不错,速度很快,代码提示也很不错。直接支持cocos2d-x 3.x的版本。而且也支持outline等功能。 不过它有一个致命的问题,就是它没有直接运行程序的功能,只有调试程序的功能。而调试程序连接CocosIDE的run time程序非常慢,要十秒钟才能启动程序。而我写lua程序,调试可以偶尔为之,但是运行程序必然是经常性的。 这点我就无法接受了。 当然我也可以把它当做纯lua文本编辑器,直接运行程序。 不过那样我又要改动run time的代码,加入Console窗口来输出log信息,否则哪里出错都不知道。

       我有些思考,即便做到了99%,但是有一点没有做好也可能造成用户流失。 甚至这一点没有做好都不一定是软件本身的问题,有可能是用户无知或者误操作。但是现实就是用户流失,说多少遍“这不是我的错”都没用。 软件如此,游戏也是如此。

3、Bade vs plugin

      这个是一个vs插件,同样具备调试功能。可以跟vs比较不错的嵌入到一起。 缺点是没有真正的代码提示。 只有本文件内输入的提示。

4、Sublime Text3

      试了几个都有不爽的地方,最后还是回到了Sublime Text。 曾经我是用Vim的,但是用了Sublime Text,我就不想去碰Vim了,同样是跨平台、支持各种插件、功能强大的编辑器,我为什么不使用一个简洁漂亮的,而认为一个编辑器要分三种操作模式才是高大上?

      当然就像Vim虽然可扩展,但是本质只是一个文本编辑器而不是IDE。不过我们写lua脚本也同样不是写c++代码,并不需要多么强大的IDE支持。

      Sublime本身对lua就有一定的支持,而且编辑器本身就有强大的代码补全、文件搜索、文件跳转、内容跳转等功能,所以基础功能是没什么问题了。 网上还有一个QuickXDev的插件,是给quick-cocos2dx开发用的。不过由于cocos2-x v3 lua绑定方式改变了,所以对cocos2d-x原生的代码提示还没有完成,只有lua部分。

      另外我添加了一个Cocos2dx的Build选项,说是Build,其实就是运行Runtime程序。log可以直接在Sublime中输出。

      选择Tools--Build--New Build System,将下面的代码拷贝过去,并保存,然后就可以选择这个Build了。

{  
    "cmd": ["E:\\Code\\runtime\\win32\\game.exe", "$file"],  
    "file_regex": "^(?:lua:)?[\t ](...*?):([0-9]*):?([0-9]*)",  
    "selector": "source.lua",  
    "shell": true,  
    "working_dir" : "E:\\Code\\runtime\\win32"  
}  

       其中cmd是程序的目录,shell为true可以让程序独立显示出来,否则只是命令行输出在sublime中,working_dir顾名思义就是工作目录(资源目录)。

       总结:暂时没有尽善尽美的编辑器,我现在打算用Sublime Text3,虽然他也不完美,但是扩展性良好,而且就文本编辑器来说是接近完美的。

原文地址:http://blog.csdn.net/langresser_king/article/details/40455251

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
About CocoStudio is a game development tool kit based on Cocos2d-x. It breaks down tasks in game development into different roles, it includes: UI editor for UI graphic artists, Animation editor for graphic artists, Number cruncher for game data designers, Scene editor for game designers CocoStudio forms a complete game development solution. The UI editor The UI was designed to serve its only purpose: create UI for games. Its simple and intuitive interface allows graphic artists to focus on their expertise, without worrying about other aspects such as programming. Currently the UI editor has 12 different UI elements ready to be used in games, new UI elements will be added with each and every release of CocoStudio, Other key features that the UI editor supports are: Texture packaging - Automatically packs individual texture files into a single large sprite, which further saves memory and improves game performance. Multi-resolution adaption - Automatically adapts to multiple resolution sizes with relative UI positioning. Templating - Reuse the same UI layout across different games, swap out texture resources to give it a new look. The Animation editor The Animation editor was designed to feel like Adobe Flash, which makes graphic artists feel right at home. The Animation editor brings skeletal animation to Cocos2d-x. What advantage does skeletal animation holds against the traditional frame animation? Lower memory consumption - An animation with the traditional frame based solution could use dozens of individual textures, but with skeletal animation, only 1 set of body parts is required to make infinite number of different animations. Smaller file size - due to less number of assets. Animation blending - you can combine animations together to easily make new animation, for example, you could blend attacking animation with walk animation to create "attacking while walking animation". Animation reuse - you can share skeletal animations with another character with the same skeleton setup. Smooth interpolation - traditional frame based animation is very choppy especially in slow motion. Skeletal animation interpolates between 2 sets of key frames, so animation is always played at the same frame rate as the game. However Skeletal animation cannot replace the traditional frame based animation, for example, it cannot make isometric character, it cannot make explosion, that is why we did not forget frame based animation, we even made it better and simpler. You only have to drag and drop frame sequences to the work space, and the animation editor will automatically creates the frame animation for you. Other highlight of Animation editor includes: WYSIWYG collision box editing - editing collision box in wysiwyg way has never being easier and accurate. Reference point - enables characters to wield swords, mount horses, and attaching other objects easily. Texture packing - Automatically packs individual texture files into a single large sprite, which further saves memory and improves game performance. The Data Cruncher The data Cruncher imports excel tables and converts the data into a format readable by cocos2d-x, which can also be used as a component for the Scene editor. The Scene editor The scene editor pieces all the assets made by the UI editor, Animation editor, and the Data Cruncher into a game scene, it can then simulate the game inside the editor. The scene editor also supports many assets made from third party editors such as particle designer, tiled etc. The scene editor relies on the CocosStudio Framework. CocoStudio Framework CocoStudio Framework is an open source higher level framework on top of Cocos2d-x, it employes entity and component system, it is used to read the data saved from the scene editor. The Scene editor saves data in a MVC like fashion, it includes all entities and events used in the current scene, and exports to corresponding code template for the programmers. A programmer can then write the code in Javascript to bring the game alive. CocoStudio的安装 1.CocoStudio的运行平台是Windows操作系统,推荐使用Windows7操作系统。 2.安装CocoStudio之前,确保电脑中安装了.Net 4.0 Framework 3.安装目录尽量不要在C盘的Program Files文件夹下,可能会导致启动器无法启动编辑器。当然,通过“以管理员身份运行”的方式也可以打开软件 4.在Xp和Windows8的操作系统下,可能会出现的闪屏或无法运行的问题。这个问题会尽快修复

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值