LWF for C++ with Cocos2d-x renderer

@splhack
I tried your code, but it makes everything very large. I ended up using FitForHeight again, and use some variable in LWFProp ( offset and scale ) to adjust my level. It’d be better if there is some kind of quick method for this.

I’m looking forward RC0 compatibility also, I tried compiling LWF with RC0, and it generates errors.

Updated LWF for supporting Cocos2d-x 3.0rc0!

Known Issue:

In some cases, sprites doesn’t appear on the screen due to Sprite::isInsideBounds returns false. we’re now investigating it.

@splhack Sorry for so long to reply. But there is no testJaney.lwf in ~/Desktop/LWFS_work_output/native . I searched all my mac, pity that there is no lwf named testJaney.lwf too.
I tried to generate lwf by swf2lwf.rb, but was stumbed. Here is my problem: https://github.com/gree/lwf/issues/65. I’m completely new to ruby.
Then I run the start cmd in the tools (shotcut is attached below) to get lwf. It works well until I need to name the picture myself so as to replace texture.
I thought it was because I hadn’t run gem correctlly at first, however, my college has successed running swf2lwf.rb to get lwf, he also couldn’t get lwf by using “publish for lwf” in flash cs5.5. (He is using windows).

@jianhan513@163.com Could you try the latest lwfs? https://github.com/gree/lwfs/releases/latest Your data is no problem at all for lwf.

@splhack My problem is how to translate swf to lwf while keeping the bitmap in swf named by myself. I’m not quite understand how the new version matters. I can get lwf successfully even with old version, my point is how to unchang the exported bitmap name.

@jianhan513@163.com With the latest LWFS, “Publish for LWF” command makes to keep the bitmap names. So I can’t reproduce the problem.

bitmap_b.png	bitmap_c.png	bitmap_d.png	bitmap_e.png	testJaney.lwf

hi splhack~
i tested lwf for cocos2d-x rc0, but not working.

bult success only lib, but it failed that attached on other app.

so~ can i get lwf sample applicated cocos2d-x rc0? (ex. hellowcpp)

@splhack Appreciate your replies! Though I still have no luck with the new version.:frowning: :frowning:

@jianhan513@163.com If you use “Publish for LWF” to emit original bitmaps, you need to put related files under one folder. Could you please make a folder LWFS_work/testJaney/ and put your files (testJaney.fla and testJaney.swf) under it?

Then, please open LWFS_work/testJaney/testJaney.fla and invoke “Publish for LWF,” which creates a folder LWFS_work/testJaney/testJaney.bitmap/ and emits original bitmaps under it. LWFS will recognize these files and will emit all converted files under LWFS_work_output/native/testJaney/.

@splhack It works now! Thanks very much.

Do I use “Publish for LWF” the wrong way before?
“Publish for LWF” need two steps or only the first step for you?

  1. execute "“Publish for LWF” in fla source file
  2. run the start tool

@jianhan513@163.com
First of all, run LWFS. Then It automatically converts fla and swf into lwf.

And then execute “Publish for LWF” in Flash when you want to convert the fla file.

@manpage Updated the sample project https://github.com/splhack/Hello-LWF-Cocos2d-x/

Updated Hello-LWF-Cocos2d-x project for Cocos2d-x 3.0rc0!

I created Android project and iOS/Mac project for lwf static library.


thx, for always~

ps: i found some problem that is packing images.
image is broken, make use of texturepacker.
(engine version 3.0 rc0)

@manpage wrote:

ps: i found some problem that is packing images.
image is broken, make use of texturepacker.
(engine version 3.0 rc0)

Could you explain more detail about the problem?

ok, upload 2 images.

@manpage hmm, let me check

Updated Hello-LWF-Cocos2d-x project for Cocos2d-x 3.0rc1!

Hi, splhack!
when lwf clicked, I’d like to know is there visible color under the clicked point. Is there any way?

@jianhan513@163.com You mean want to draw a little circle or something at the point, like http://aramk.com/blog/2011/09/18/drawing-touch-points-with-cocos2d/ ? Yes, you can draw anything using Cocos2d-x API on LWFNode.