Kingfisher

13th Apr 2015

Kingfisher 是一个异步下载和缓存图片的库,你可以把它看做 SDWebImage 的纯 Swift 实现和替代。它可以帮助简单地实现像是用户头像或者 table view 里面的图片的下载和缓存这样的工作,以提高 app 速度和帮助开发者节省时间。因为我现在工作时使用的语言全面转向 Swift,所以希望尽量使用 Swift 的框架,避免 Objective-C 和 Swift 混编,以便维护和后续开发。另一方面,SDWebImage 里有非常多的功能,而其中很多是用不到的,对于我们的项目来说偏重。所以就写了一个纯 Swift 的,轻量级的库,来处理这方面的需求。相比于一些有些年头的项目,Kingfisher 使用了 Cocoa 框架中一些新的类和特性,从 API 的易用性上来说会有优势。

Kingfisher is a lightweight and pure Swift implemented library for downloading and caching image from the web. You can use it as a pure Swift alternation for SDWebImage in your next Swift app. With help of Kingfisher, you can implement your avatar downloading and caching or images in multiple cell in a tableview very quickly. Since I turn to use Swift in my daily work, I hope I can use pure Swift framework instead of mixing Objective-C with it. Furthermore, there are quite too many features in SDWebImage, which is rarely used in our projects. I prefer a light framework for it to handle these things. Kingfisher also gets benifit from modern Cocoa framework, so it is easier and more flexble to use.

Swifter - Swift 必备 Tips

19th Sep 2014

image

Swifter 全名 《Swifter - 100 个 Swift 必备 tips》,是一本我写的有关 Swift 语言的书。该书主要面向具有一定 Swift 或者 Objective-C 开发经验的读者。这本书里包含了 100 个 Swift 语言的不是人人所知,但却又很有用的知识点。这些知识点基本来自 Swift 横空出世以来至今我在学习和开发中遇到的让人迷惑的地方,我对这些内容进行了一些总结和说明,希望能够帮到后来的学习者。对于那些了解或者已经掌握了 Swift 基础语法的读者来说,这会是一本带领他们走向中高级 Swift 使用者的书。

在写作过程中,我将 Stack Overflow 和 Apple 论坛有关 Swift 的帖子全部进行了研读,可以说自己也从其中得到了非常大的提升。

Swifter is a book with full name as "Swifter - 100 must-know tips for Swift". It is a book about Swift programming language I wrote. This book is written for developers with some Swift or Objcetive-C experience. 100 tips of Swift are contained, which are not well known to all the people, but extremely useful. These tips are concluded from my learning of Swift, I hope later learners could get benifit from these tips. It would be a book that guides those who already know the basic syntax of Swift, and leads them to an advanced level.

During the writing, I read all questions and posts on Stack Overflow and Apple's developer forum, from which I grew my skill significantly as well.

甲子园 Pocket

12th Sep 2014

image

甲子园 Pocket(甲子園 ポケット) 是我在 Kayac 参与的最后一个项目。这个项目是 Kayac 的重头作品甲子园系列游戏的最近做。在继承了之前版本比赛时的竞争特性的基础上,甲子园 Pocket 延伸出了类似大富翁的练习模式以及全国锦标赛等丰富的游戏内容。在发布后该作很快就取得了 Google Play 和 AppStore 免费榜前三的好成绩。因为是在中期加入该项目组,因此我在这个项目中主要负责进行优化方面的工作。由于游戏中存在极其复杂的动画系统,而且在开发前期没有注意内存使用,我接手时游戏占用内存的峰值高达 600 MB。在进行一系列精心优化后,成功将这个峰值降到 150 MB 左右,保证了在 iPhone 4 同等机型上也可以流畅运行。

Koushien Pocket is my last project in Kayac. This project is the latest game of Kayac's famous Koushien Serials. As inheriting the compitition content of some ealier titles, Koushien Pocket also stands on its own interesting Practice Mode and National Tournament. I myself attended to the project in the mid-term, so my main responsibility is optimizing fot the game play. A huge animation system is used in the project, but with little care in the early time of project. When I took over this project, it cosumed about 600 MB memory as a peak value. After hard work on it, the last result is 150 MB, which ensures the smooth running on iPhone 4 or same level devices.

ObjC 中国

4th May 2014

image

ObjC 中国是一个我发起的,社区共同维护翻译项目,旨在将 objc.io 的文章完整地翻译为准确和优雅的中文版本。objc.io 是一个非常棒的项目,它将一些很好的 objc 实践和技术无私地分享给世界。我觉得有必要也有兴趣将这些内容翻译为我的母语,分享给更多的中国开发者。而恰好社区内也有很多抱有同样想法的开发者,于是我们共同成立了 ObjC 中国 这个项目组,将这件事情做了下来。感谢这个项目所有的贡献者,没有你们的努力就不会有这个项目的顺利进行和完成。

ObjC China is a project I started and driven by the Chinese iOS dev community. Its purpose is translating all the articles in objc.io into Chinese, in a precise and elegant way. objc.io is a great project, which spreads a few best practice of objc to the world. I feel it is necessary to translate them into my mother language, and share it to all Chinese developers. The community is also intersted in it, so it leads the creation of ObjC China project. Thanks to all the contributors of this project, it can be done in a very short time.

姬骑士和最后的百龙战争

7th Feb 2014

image

姬骑士和最后的百龙战争(姫騎士と最後の百竜戦争,简称姬百)是我在Kayac主创开发的一款手机游戏。姬百是一款Unity3D制作的即时制动作类RPG,伴随主人公的萌娘公主骑士对抗魔女化的姊姊王上和百龙军团的一场场战斗,在逐渐成长的同时,和各个栖息在武器中的精灵成为好友,并揭开幕后更多的秘密。在标准日式轻小说和游戏题材下,我们使用Unity3D来为玩家呈现这款全新概念和玩法的社交游戏,希望能呆萌的姬骑士能陪伴玩家走过一段有趣的游戏时光。

我在项目中主要负责游戏框架架构及分工,并进行了逻辑部分的代码编写,并在开发过程中对组内其他Unity工程师提供技术支援和一定的指导。

Last Princess Knight and the Hundred Dragon War(Princess & Dragons) is an action mobile game I developed in Kayac. It made by Unity3D and tells a stoty about our Moe Princess Knight fighting against her sister, and the army of the hundred dragons. The princess grows stronger with the battles and find herself a pal with spirits living in weapons. At last, they will know their fate and face it together! In a standard framework of Japanese light novels and games, we are using Unity3D to present this brand new concept game for our users.

I took responsibility for making the framework and assigning tasks during the development process. As a main developer of the game, I also wrote the logic code of the game and gave support and direction for other Unity engineers.

Click Effect Kit

29th Jan 2014

Click Effect Kit快速在Unity3D游戏中集成点击效果的工具包,其中包含了各式的点击效果。通过简单的prefab拖拽和设置,即可在游戏中加入鼠标点击或者触控点击的粒子效果,增强游戏表现型。点击效果全部使用Shuriken粒子系统完成,非常易于在现有基础上进行更改以获取更符合游戏风格的效果。另外开发包中还包含了对象池回收以及游戏暂停时对粒子动画的正确处理,通过简单的设置,您的自制粒子效果也将可以从这些组件中获益。您可以通过下面的demo了解更过关于这个项目的情况。

Click Effect Kit is a fast way to integrate an effective particle when your users click or tap anywhere in your games. By adding a particle when user clicking or tapping, a better vision experience could be gained. Furthermore, they are not only some simple particles but also a whole solution for displaying, pooling and handling events of particles. You just drag a prefab to your game scene, then click a button in the Inspector, and everything is done for you. To know more about this project, see the demo below.

UniWebView

8th Nov 2013

image

UniWebView是一个帮助Unity移动游戏开发者能在Unity中简单地使用系统原生自带的WebView的插件。在很多游戏中都会出现使用WebView展示页面和与玩家进行交互的功能。但是Unity3D由于本身是一个多平台的游戏引擎,因此没有也不太可能提供一个WebView的使用接口。UniWebView的目标是减少或解除对应Unity平台上移动开发使用WebView的各种麻烦和痛楚,使用原生移动平台的对应WebView,并对其进行很好的封装以及添加一些常用功能,以解决实际游戏开发中可能遇到的一些问题。

UniWebView可以运行在iOS和Android设备上,并且提供了Mac Unity Editor的支持,开发者可以在Unity编辑器中实时进行调试和使用,这使开发者可以节省大量在日常开发中的时间和成本(不需要进行部署便可以测试,以及提供webpage进行作为控制台等)。除了展示网页这一基本功能外,UniWebView还提供了简单的接口用来实现网页与Unity之间的通讯,通过特定的url协议以及javascript脚本,可以通过WebView简单地对游戏进行各种控制,以及将游戏内容报告给网页进行处理。基于这个基础上,并得益于使用系统原生WebView,UniWebView可以全面CSS3和HTML5,用来播放各类视频以及表现其他一些页面效果。

如果您对UniWebView感兴趣,可以点击下面的链接了解更多。对于这个插件,我会提供完整的支持和更新,包括完善的使用指引,文档信息和论坛支持。

UniWebView is an easy solution for integrating WebView to your mobile games. You can set up a web view and embed web content in your game with less than 10 lines of code. There is also a clean and simple interface for you to interact between the game and webview. I made it to release developers from the troubles and pains of implementing the web view again and again. I added severval features to the system webview to make it easier to use in Unity3D and solve some problems I met in my game development.

UniWebView can run on both iOS and Android and it is shipped with a Mac Unity Editor support. There is no need to build and run it in your device to see what you will get. You can preview and interact with the webview just in editor. It would boost your flow of developing and debuging it in your work. More than showing the web page, UniWebView supplies a set of interface to let the communication be possible between Unity and WebView with a specified URL scheme and javascript. You can control your game flow from a webpage and change it on air without release a new version of your game or report some data from you game to the web page easily. Benefited from the system native webview, UniWebView also supports CSS3 and HTML5, which means it can play youtube movie or show some increadible web page effect.

If you are interested in this project, you can click the links below for more. I will supply full support and update for this project, including great manual, complete documentation and forum support.

VVDocumenter

23th Jul 2013

image

VVDocumenter是一个Xcode插件,它的出现彻底改变了大家在Xcode中书写文档的方式。

一直以来虽然Objective-C代码因为其可读性极强,而不太需要时常查阅文档,但是其实对于大多数人(包括我自己)来说,可能为方法或变量取一个好名字并不是那么简单的事情。这时候可能就需要文档或者注释来帮助之后的开发者(包括大家自己)尽快熟悉和方便修改。但是用Xcode写文档是一件让人很头疼的事情,Xcode对写文档的支持几乎为0,没有像VS之类的成熟IDE的方便的方法,一直以来都是依靠像Snippet这样的东西,然后自己辛苦填写大量已有的内容。

之前在这里看到一个用Ruby+系统服务来生成注释的方案,但是每次要自己去选还要按快捷键,总觉得是很麻烦的事情。借鉴其他平台IDE一般都是采用三个斜杠(///)来生成文档注释的方法,所以也为Xcode写了一个类似的。用法很简单,在要写文档的代码上面连打三个斜杠,就能自动提取参数等生成规范的Javadoc格式文档注释。VVDocumenter整个项目MIT开源,并且扔在github上了,有兴趣的朋友可以从下面的链接找到,欢迎大家加星fork以及给我发pull request来改善这个插件。

Writing document is so important for developing, but it was really painful with Xcode, until the VVDocumenter came out. Think about how much time you are wasting in pressing * or /, and typing the parameters again and again. Now, you can find the method (or any code) you want to document and type in ///. The document will be generated for you and all params and return will be extracted into a beatiful Javadoc style. You can just fill the inline placeholders to finish your document。

Enjoy to use it and find more in the GitHub page. You are welcome to fork it and help improve by pull-request.

英雄Slash(Hero Slash)

22th Jul 2013

image

英雄Slash(全国ヒーロースラッシュバトル)是我在Kayac承担的受托项目之一,是和日本知名游戏厂商Bushimo一同进行开发的游戏。我全程参与了这个项目的开发,在其中担任游戏核心的所有开发工作,并完成了部分UI工作。在这个项目中,我和日本、越南、印尼和法国等国家的开发者一同工作,相互协作推进项目进行,可以说是一段奇妙的开发体验。

Hero Slash is a client project from my career in Kayac. It is a corporation project with Bushimo, which is a famous Japanese game company. I was part of this project from the very beginning. I developed the core game part and some UI part with my team. It was an amazing experience for me to work with Japanese, Vietnamese, and French developers together. It was a great time in my life.

UniRate

18th Jul 2013

image

UniRate是一个帮助Unity移动游戏开发者简单集成AppStore/Google Play Market评分提示功能的插件。当用户打开应用指定次数和天数时,将弹出窗口提示用户评价应用。用户如果选择评价,UniRate将自动引导用户前往对应的页面进行评价。用户也可以选择稍后评价或不评价。采用这样的策略可以得到尽可能多的5星评论,对于推广应用很有好处。

UniRate的集成和使用非常简单,在拖拽一次就完美工作的同时,也提供了各种详细的设定,可以使UniRate按照设定工作。对于UniRate,我会提供完整的支持和更新,包括完善的使用指引,文档信息和论坛支持。

UniRate is a Unity plugin for mobile game developers to integrate AppStore/Google Play Market rating prompt in the project easily. When users opened the app for some times and some days, a prompt alert window will pop up to ask users for rating. If users agree to rate, UniRate will lead the users to the proper rating page for your game. Users also can choose to rate it later or never. By using this prompt strategy, you can receive positive reviews as many as possible, which is quit critical for the promotion of your game.

The using of UniRate is as simple as a single drag & drop. As the same time, it also provides enough config options for you to adjust the action of this plugin. You can set and let it works as you want. I will supply full support and update for this project, including great manual, complete documentation and forum support.

音量录音机(Sleeping Recorder)

12th May 2013

image

音量录音机是一款帮助您解决梦话、会议、嘈杂或者取证等情景下录音需求的app。它可以根据监测到的音量来自动进行录音,您能够在获得所有录音信息的同时节省您的设备空间和电量。这是一个免费应用,也不会包含任何广告或者录音限制等,唯一的限制是您只有通过内购完全版才能将录音导出,同时可以获得同步至Dropbox等更多功能。

对于录音的处理,由于在预想的使用情景中可能面临时间长,碎片多等问题,实现时采用了比较低层级的手段,可以说是被迫读了一些C和C++的代码。因为其实之前在绝大多数情况下我都在和高层级的API和界面交互打交道,所以对于纯C的代码还是比较怵的,不过幸好坚持下来并且完成了。回头想一想,收获是很大的,希望这会成为一个契机,能够静下心来将某些知识深入下去。

Volume Recorder is an app to help you record voice in some special situation, sleep-talking, meeting, noisy environmrnt or evidence gathering for example. It will detect the volume of the voice and control the resuming and pausing automatically. You can get all voice while using less disk spaace and battery energy. This is a free app, it will never contain any advertisement and recording limitation. If you want export your recording, you can purchase the pro version in the app. You can also sync and backup your recordings with Dropbox and Google Drive.

XUPorter

11th May 2013

image

XUPorter是一个开源的Unity3D编译Xcode工程的依赖管理工具。它能够在Unity3D生成Xcode工程文件后,根据配置文件自动添加依赖库和引用文件的工具。它使用PostProcessBuild标签,在编译后寻找配置文件并修改Xcode工程文件,完全运行于Unity3D编辑器中,而不需要涉及PostprocessBuildPlayer的脚本编写和调试,十分方便。

XUPorter的适用版本为Unity3.5及以上,以及Xcode 4.x以上。(Unity 4.x及Xcode 5中亦能工作正常)

XUPorter is an open source tool for dependency management for Xcode project exported by Unity 3D. It will add dependence libraries and reference files for you as you configured. By using the [PostProcessBuild] attribute, it will find out the Xcode project file and modity it through a config file. All the progress is done in Unity Edtior, so there is no post-process script and you can use it without little knowledge with Xcode.

XUPorter is compatible with Unity 3.5, Xcode 4.x or above. (Also works well in Unity 4.x and Xcode 5)

云端记账(Our Money)

21st Mar 2013

image

云端记账 - Our Money是我在业余时间开发的一款云端多人协同记账的iOS应用。该app最大的特点是可以很简单地实现多人共享一个账本进行记账,从而免去了汇总和统计的麻烦(想像一下老公每天要记住自己的开销,然后晚上回家向老婆汇报的噩梦)。现在可以多人随时记录,相互间协作和无缝同步。简单高效的UI以及完全无感的自动后端同步,可以帮助养成记账的良好习惯,进而追踪自己的日常开销。

Cloud Account - Our Money is an accounting app I developed in my free time, which runs on iOS with a cloud backend. This app can let you share your accounting work with your families in a really simple way. Thanks to the background sync and effecient UI, there would not any difficulty in calculation and selection what and how to record your daily spend.

冒险谜题王国(QuizKingdom)

30th Jan 2013

image

QuizKingdom(冒険クイズキングダム)是我加入Kayac后参与开发的第一款作品。该游戏是iOS及Android平台的基于问答的含有RPG元素的益智类游戏。QuizKingdom是由Unity3D开发的,游戏内容十分丰富,在日本区下载量突破了200万次。

我在项目中主要负责部分题目类型的设计和制作,并对项目中使用的一些基础代码进行了调整和优化。

QuizKingdom is the first project I attended after joining Kayac Inc. This is a social game with some quiz and RPG element. It is developed by Unity3D and published on both iOS and Android. This game gets a great success in Japan and beyonds 2 million download by now.

I designed and developed some types of the quiz in the project. And I rewrote some basic code to optimize the game.

番茄工作法(Pomodoro Do)

25th Jul 2012

image

Fanche Do(原Pomodoro Do)是iOS上的一个番茄工作法计时辅助工具,配合番茄工作法,可以更加专注,减少不必要的时间浪费,从而提高效率。我利用硕士毕业后,日语培训前的短暂时间空隙内完成了这款应用,并一直在不断维护。从创意、设计、编码到推广均由自己独立完成,因此收获颇丰。这款应用在没有任何推广费用投入的情况下多次进入中国区效率榜前3名,并帮助了很多用户节约时间,提高效率,得到一致好评。

自己所开发的应用能够真的有用,能够帮助别人,同时自己能有所收获,这对我来说是最开心的事情了。

Fanche Do (formerly Pomodoro Do) is an iOS app to help you manage your time in an efficient way. I made it in the gap between I got my master degree and work in Japan. It is under continuely improving development unitl now. I did it from idea, design and coding to the last promotion all by myself. And I can say aloud it gets Top 3 in China Productivity frequently without any promotion fee. It helps a lot of users to save time and get effecient, and gets hundreds of 5 stars in AppStore.

It is fatastic that I have made something great to use. I am very happy that I can help others in this way.

小熊推金币(Coin Push - iBear Story)

12th Nov 2011

image

小熊推金币是我在攻读硕士期间在北京锐德无限兼职时开发的iOS/Android平台的休闲类游戏,模拟并扩展了了街机厅推币机的游戏方式,并加入了诸如联机对战,服饰系统,好友系统等许多有趣的SNS游戏元素。我担当完成了该游戏的全部程序部分,这个作品在AppStore上曾在多个国家取得娱乐榜第一,总排行榜前三的好成绩,全球范围内下载量超过500万次。

现在iOS版已经下架,您还可以从下面的连接中找到Android版。另外该作的续作小熊推金币2正在锐意制作中,敬请期待。

Coin Push - iBear Story is a game a made as a part-time job in Red Infinity Corporation in Beijing, during my master degree time. It is an iOS/Android casual game powered by Unity3D, which simulated of a coin pusher in game bar. I did all the program work in this game, and it got a great success in AppStore, with Top 1 on Entertainment category and Top 3 on Overall Rank in several different country. It was downloaded over 5 million times all over the world.

The iOS version is already removed from AppStore, but fortunately you can still download the Android version. Good news is Coin Push - iBear Story 2 is under developing now. Look forward to it!

联系我 (Contact me)

我是王巍 (@onevcat),我一般活跃在 GitHub新浪微博Twitter上,偶尔也会在自己的博客上写点东西,想找我的话可以给我发邮件。欢迎您告诉我任何您的想法和需求,或者如果您有什么好点子我能帮上忙,也可以与我联系。在这个页面上展示的是一些我平时工作以及个人完成的项目;另外,我还有一些不值一提的开源项目放在 GitHub 上,您有兴趣的话也可以在我的页面找到它们。要是我的文章和这些项目能对您有所帮助的话,我会非常开心。如果您乐于支持我的项目和之后的继续发展,欢迎通过支付宝进行无负担小额资助,十分感谢。

I am Wei Wang (@onevcat). You can contact me on GitHub, Sina Weibo and Twitter. Of course email is welcome as well. Please tell me what do you think about of these projects. I would be very happy if these projects can help you in any way. There are also some small open source code on my GitHub, you can find them easily in my GitHub page. If you feel like to support me to develop, some small donate through Alipay is welcome and I will try my best to do work well. Thank you very much.