New version of Tile Map

33 views
Skip to first unread message

huabing.xu

unread,
Jun 25, 2014, 6:08:49 AM6/25/14
to Ricardo Quesada, cocos2d-js-devel

Hi, 

I am now working on new version of Tile Map. An new feature named culling is added compared to old version of tileMap. Which means tiles is not rendered if it is at the out of the screen.

My link is: https://github.com/cocos2d/cocos2d-x/pull/7211

Now the main feature is completed.

if you have any suggestions and comments, please let me know.

Thanks.


Best Regards
Harrison Xu

Ricardo Quesada

unread,
Jun 25, 2014, 10:48:21 AM6/25/14
to huabing.xu, cocos2d-js-devel
Thanks. How different is this feature from the one the Bo Yu implemented a few weeks ago?



--
You received this message because you are subscribed to the Google Groups "cocos2d JS development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cocos2d-js-dev...@googlegroups.com.
To post to this group, send email to cocos2d-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

NiTe Luo

unread,
Jun 25, 2014, 6:16:04 PM6/25/14
to Ricardo Quesada, huabing.xu, cocos2d-js-devel
Hi Harrison:

Can you do some performance test against the old tilemap, especially the one with static VBO (cache map data on VBO instead of send it every frame)

I want to see at what point(map size) the culling can out perform static VBO

-Nite

Dawid Drozd

unread,
Jun 25, 2014, 8:07:30 PM6/25/14
to NiTe Luo, Ricardo Quesada, huabing.xu, cocos2d-js-devel
yeah it would be nice to see performance test :)
Pozdrawiam
Dawid Drozd.

huabing.xu

unread,
Jun 25, 2014, 10:35:51 PM6/25/14
to NiTe Luo, Dawid Drozd, Ricardo Quesada, cocos2d-js-devel

Hi


1. The work is based on the old PR by Bo Yu, except using a new rendering work flow to support both ‘Local Z order’ and Vertex Z in tile map


2. The performance is not very good now. I have been working on improvement and testing of the fast tile map.


Best Regards
Harrison Xu

 Original Message 
Sender: Dawid Drozd<drozdda...@gmail.com>
Recipient: NiTe Luo<dark...@gmail.com>
Cc: Ricardo Quesada<ricardo...@gmail.com>; huabing.xu<huabi...@cocos2d-x.org>; cocos2d-js-devel<cocos2d-...@googlegroups.com>
Date: Thursday, Jun 26, 2014 08:06
Subject: Re: [cocos2d-js-devel] New version of Tile Map

huabing.xu

unread,
Jun 25, 2014, 10:58:40 PM6/25/14
to NiTe Luo, Dawid Drozd, Ricardo Quesada, cocos2d-js-devel

BTW,for every test case of the old tilemap, there is a new corresponding test case in this PR.

ENTRY:’test cpp’->’Node: FastTileMap'


Best Regards
Harrison Xu

 Original Message 
Sender: huabing.xu<huabi...@cocos2d-x.org>
Recipient: NiTe Luo<dark...@gmail.com>; Dawid Drozd<drozdda...@gmail.com>
Cc: Ricardo Quesada<ricardo...@gmail.com>; cocos2d-js-devel<cocos2d-...@googlegroups.com>
Date: Thursday, Jun 26, 2014 10:35

Ricardo Quesada

unread,
Jun 26, 2014, 9:48:42 PM6/26/14
to huabing.xu, NiTe Luo, Dawid Drozd, cocos2d-js-devel
Do we need to support "vertex z" ?

We are going to keep supporting the old TMX code for a while since it has more functionality that the current one.
So, users who want to add new tiles, or animate them, they should use the old one.

The new one is for users who just want to render an static tile map. For those users, the new code will be much faster.
And if the performance is not much faster than the previous code, then we shouldn't add it.

Xiaoming Zhang

unread,
Jun 26, 2014, 9:59:25 PM6/26/14
to Ricardo Quesada, huabing.xu, NiTe Luo, Dawid Drozd, cocos2d-js-devel
Did you mean new one only supports static tile map currently or in future too?
I think new one should replace old one in future, or it will be confused. User should know that, it should use new one for only static tile map and old one for others.
If so, why not merge two into one, then add an option to select, such as

TileMap::createStaticTileMap();  // for static tilemap
TileMap::createOther(). // for others

Best Regards
Minggo



huabing.xu

unread,
Jun 26, 2014, 10:01:50 PM6/26/14
to Ricardo Quesada, NiTe Luo, Dawid Drozd, cocos2d-js-devel

I used to thought our fastTMX should be an improvement and a replacement of the old version. 

Standing on the developer's point of view, if we support static tileMap only, users need to deal with two types of TileMap.


What is the final goal of fast_tmx?
Is it replacing the old tmx or only implementing some features of the tilemap?

Best Regards
Harrison Xu

 Original Message 
Sender: Ricardo Quesada<ricardo...@gmail.com>
Recipient: huabing.xu<huabi...@cocos2d-x.org>
Cc: NiTe Luo<dark...@gmail.com>; Dawid Drozd<drozdda...@gmail.com>; cocos2d-js-devel<cocos2d-...@googlegroups.com>
Date: Friday, Jun 27, 2014 09:48

Ricardo Quesada

unread,
Jun 26, 2014, 10:10:22 PM6/26/14
to huabing.xu, NiTe Luo, Dawid Drozd, cocos2d-js-devel
In the future it must replace ALL the functionality provided by the current TMX.
Can we do that for v3.2 ? Can we support animations ?

If not, we should focus on the most important feature: Fast.


Xiaoming Zhang

unread,
Jun 26, 2014, 10:24:07 PM6/26/14
to Ricardo Quesada, huabing.xu, NiTe Luo, Dawid Drozd, cocos2d-js-devel
I have talked with Harrison, the current status is
1. all features are supported, including animation, vertex z
2. static tile map performance is better than old one, we will add performance later
3. using vertex z and all tile map in screen, performance is not as good as old one

So i think we can merge all the features and improving performance in next week.


Best Regards
Minggo



Ricardo Quesada

unread,
Jun 27, 2014, 12:27:22 PM6/27/14
to Xiaoming Zhang, huabing.xu, NiTe Luo, Dawid Drozd, cocos2d-js-devel
Sounds.
So, if we have exactly the same features as in the old TMX, then the old Test Case should work with any change, correct ? Could you verify that ?
Thanks.

Ricardo Quesada

unread,
Jun 27, 2014, 12:27:32 PM6/27/14
to Xiaoming Zhang, huabing.xu, NiTe Luo, Dawid Drozd, cocos2d-js-devel
s/Sounds/Sounds good/
Reply all
Reply to author
Forward
0 new messages