文档章节

《史密斯奶奶》用什么开发的?

mayqlzu
 mayqlzu
发布于 2013/12/19 12:53
字数 839
阅读 23
收藏 0

先看一张游戏截图:



Development environment


A lot of people have asked about our development environment so I thought I'd write a post about it here. Both Sprinkle an Granny Smith as well as our two titles in development follow roughly the same pattern. I do all day-to-day development and testing on Mac and PC, compiling to native Win32/MacOS applications. Hence the code is cross-platform and mouse input is used to emulate touch input. My preference for actual coding is Visual Studio due to its superior debugging and Intellisense. On the Mac I use Textmate, shell scripts and makefiles. I only use XCode for iOS testing and deployment. I have used the XCode debugger on a few occasions, but it very rarely manages to do any meaningful on-target debugging. This might be due to my broken project files though.. I run Visual Studio through VMWare on the Mac as well, so it's actually only one physical Machine. I used a separate development PC laptop before, but the VMWare solution is far superior in almost every aspect and removes a lot of clutter.

I'm not using any off-the-shelf game engine, but rather a collection of homebrew classes that work well together, so you could say the "engine" is developed specifically for each title. Examples of such classes are strings, streams, input handling, data containers, vector math, scripting, sound, etc. It does not contain any code for actual game objects, rendering pipeline, update loop, etc, so it's rather low level. I personally think this is better than using a game engine in most cases, since you can churn out more performance, and you never hit any artificial boundaries of a third party solution.

I do use certain libraries for specific tasks, such as zlib, TinyXML (just switched to RapidXML), Lua, Box2D, Clipper, etc, but it's very isolated pieces of software that do one thing well. If they wouldn't work for a project they can easily be replaced individually. All libraries are included in the project as source code, no static or dynamic libraries.

The build system is a python script that scans the source tree and outputs a makefile, Visual Studio project or Android ant files. I have not yet tried XCode project file generation because XCode project files (dirs actually) are totally horrible. To be fair Visual Studio project files are horrible too. Actually I don't think I have ever seen an IDE with a sane project file format. Is it really that hard? I should probably try cmake, but it takes time to learn, and doesn't necessarily update when you upgrade your IDE. I generally think that about a lot of things - learning a tool or middleware is often more of an investment than just doing it yourself. Besides, if you do it yourself you gain 100% insight into the inner workings and can fix problems immediately when they show up instead of communicating with support and/or wait for a fix. Anyway.

The desktop binaries read raw assets (XML, jpeg, png, etc) directly from the data folder for convenience while both iOS and Android require asset conversion. The asset conversion script is quite similar to the build system - it scans a directory tree and outputs a makefile. Make will then automatically keep track of assets that need conversion using the file modification date, and it can branch out on multiple threads (using the -j switch) for increased performance. Make is really just as awesome for converting assets as it is for compiling source code. On iOS some images are compressed using texturetool and some are using our custom format called MTX, which is essentially just a way to compress PNG images into JPEG with a separate, compressed alpha channel to save space. The Android version also uses MTX compression as well as general LZ compression on most data files. The APK itself is not compressed so generic asset compression is more important here.

The Android version uses the NativeActivity system available from Android 2.3, so basically the whole game, including setup code is C++. We do have a very thin layer of Java to handle in-app billing and query device capabilities, etc. It's quite remarkable how much of the code is identical between the iOS and Android version. It's really just the setup code, touch input and audio back-end that are completely different.

Sprinkle and Granny Smith both have built-in level editors that are accessible on the Mac and PC version. All level design and graphic assets are done within that editor (except for textures, which are done in Photoshop and Illustrator). Scripting is done in Lua using a regular text editor. That's about it.

本文转载自:http://tuxedolabs.blogspot.com/2013/01/development-environment.html

共有 人打赏支持
mayqlzu
粉丝 2
博文 41
码字总数 8484
作品 0
浦东
程序员
私信 提问
Jfinal weixin源码分析---碎碎念(看最后,有福利)

我就是要开发微信,可是我行么? 好吧,微信的开发已经不是一年两年的历史了,很多人都问我,假如我想要进行微信开发,我需要准备些什么东西?微信到底是个什么东西,他和我们平常开发的那些...

天蓬小猪
2016/01/29
306
0
刚入行的程序员,如何做好项目开发的预估时间?

近期,我们的前端开发团队,在我们千呼万唤中终于招聘了两个小伙子。 在他们逐步接触具体的开发项目时,也遇到了最开始困扰我的问题:原来第一个难题并不是我看不懂其他人开发的代码,而是我...

朝霞景景
2018/08/18
0
0
请问现在做JAVA开发都用什么框架?

大家好,我想问个问题,是关于现在做JAVA开发都使用什么框架? 我只知道Struts,Spring和Hibernate,但是还没学会。我想学习和从事JAVA开发,目前是PHP开发者。 请问现在大家都用什么框架做开...

朱元璋
2013/01/18
6.3K
13
iOS Provisioning Profile(Certificate)与Code Signing

关于开发证书配置(Certificates & Identifiers & Provisioning Profiles),相信做iOS开发的同学没少被折腾。对于一个iOS开发小白、半吊子(比如像我自己)抑或老兵,或多或少会有或曾有过以...

豆花饭烧土豆
2016/03/21
45
0
求方向指导?

怎么选择开发方向。。。。 去工厂? 搞是移动开发的,现在ios,android都很火来着,搞什么应用什么的,小游戏什么的。 搞政务系统。 搞游戏的,oa办公什么的................ 等等之类的东西,...

梦雨_2013
2013/04/07
249
3

没有更多内容

加载失败,请刷新页面

加载更多

day11

architect刘源源
20分钟前
2
0
论学好Linux系统的超级重要性

不知道各位在日常的工作生活中有没有接触过“rm -rf /*”这个命令,因为这个命令搞出来的事情可还不少呢!前段时间就在一个群里看到了有个小伙子,老板让他去维护一下服务器,这小伙也不太懂...

Linux就该这么学
昨天
1
0
git 使用

1,首先在github配置好信息和仓库,然后在本地进行操作 git init git config user.name 'zhangwuer' git config user.email '56789053@qq.com' 2,与远程分支建立连接 git checkout -b test......

天王盖地虎626
昨天
3
0
git checkout 命令详解

在日常的git操作中,git checkout——检出,是我们的常用命令。最为常用的两种情形是创建分支和切换分支。 在下面的命令中,使用了一些简写,在这里说明一下: git st # git statusgit ci ...

shzwork
昨天
8
0
【Nginx】Nginx多级代理,获取客户端真实请求IP以及每级代理IP

Nginx多级代理,获取客户端真实请求IP以及每级代理IP 如图所示,每一级nginx里的location配置里需要加上对应的配置,最后一级nginx是直接到应用,测试时为了方便,直接用echo模块去测试,打印...

薛定谔的旺
昨天
6
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部