Seasons.NET

ちょっとした技術ブログです

cocos2dのスプライトに関するエディター

元記事
cocos2dでは、異なったフォーマットのスプライトをサポートしています。
TILESだったり、フォントだったり。
以下は、cocos2dによってサポートされるいくつかのエディターの紹介です。

To read Editors #1, please go here: Editors
cocos2d for iPhone supports different formats for the sprites, 
tiles and fonts. The following is a list of some editors supported by cocos2d:

Tilesエディタ

The popular tiled editor called Tiled can be used to generate tiled maps for cocos2d.
With it, you can create orthogonal, isometric and hexagonal maps.
最もポピュラーなTILEエディターである Tiledの紹介。
直交、等尺、六角形なマップを構築する時に使えます。


ネイティブバージョンとJavaバージョンが存在。

TILEの使い方


Sprites

Robert Payne updated the old Texture Atlas Creator.
The new version is now called Zwoptex, and this is the new homepage: Zwoptex homepage
テクスチャアトラスを作成する為のエディターです。
これは、WEBページで開いて実行するツール。

New features:

    * Has more arranging options
    * canvas size adjustment
    * Minimum spacing for arranging
    * A centralized way to load frames (similar to Flash)
 アレンジオプションさらに増えた
 キャンバスサイズにアジャストする機能
 最小スペースのアレンジ
 フレームをロードする統合された方法(Flashのような)

And recently Robert also released the source of the editor: http://www.cocos2d-iphone.org/forum/topic/4300
ソースコードを近日公開
追記:されてました。
http://zwoptex.zwopple.com/downloads/Zwoptex_FlexProjectSource_22012010.zip

このツールで吐き出した情報をcocos2dで再生する為のユーティリティ(ソース)も元記事で公開されてます。


Fonts

cocos2d has 3 ways to render fonts:

    * CCLabel: Which renders fonts using both system and custom .TTF files (introduced in v0.1)
    * CCLabelAtlas: Which renders fixed-width fonts from an image file (introduced in v0.5)
    * CCBitmapFontAtlas: Which renders variable-width fonts from an image file (introduced in v0.8)

cocos2dは、3つの方法でフォントをレンダリングすることが可能。

  • CCLabel:システムやカスタムされた.tifファイルでレンダリング
  • CCLabelAtlas:固定幅のフォントイメージファイルで構成された画像でレンダリング
  • CCBitmapFontAtlas:可変幅のフォントイメージで構成された画像でレンダリング


CCBitmapFontAtlas関連ツール:

    * Hiero Bitmap Font Tool: Supports kerning, effects (gradient, shadow, etc…), 
   padding, offset, page size and more. 
   Download: http://slick.cokeandcode.com/demos/hiero.jnlp (Java Applet)
   →Javaappletで動きます。
    * BMFont: It has more or less the same features as Hiero, with the limitation that it only works on Windows .
   Download: http://www.angelcode.com/products/bmfont/
   →Windowsでのみ動きます。

CCLabelAtlas関連ツール

    * charmap: Is a command line utility that generates valid images for CCLabelAtlas. 
   Download: http://silentmac.com/?tag=charmap
   →コマンドラインで動きます。
    * GIMP Plugin created by michu: It is a plugin for GIMP v2.6 that generates valid images for CCLabelAtlas. 
   Download: http://www.neophob.com/serendipity/index.php?/archives/173-Create-a-fixed-size-font-image.html
   →GIMP 2.6のプラグインとして、利用します。
    CCLabelAtlasで有効なイメージに対して生成することができます。