cocos2d / cocos2d-js__old__

cocos2d in JavaScript central repository
14 stars 9 forks source link

Support 2.5D #59

Open minggo opened 11 years ago

minggo commented 11 years ago

About 2.5D feature, there are two thread in cocos2d-x forum discuss it: http://www.cocos2d-x.org/boards/6/topics/26716 http://www.cocos2d-x.org/boards/6/topics/20646?page=1&r=26792

We should discuss what's the requirement, what feature should we support.

ricardoquesada commented 11 years ago

I am not sure how to design a 3d engine, but what we need to define is what we need.

We need to define the scope of this feature. Do we want a full 3d engine ? a subset of a 3d engine ? what are the use cases ?

minggo commented 11 years ago

I think we don't need a full 3d engine now.

One use case: A RPG game, its background is 2d, but its role can be a 3d model.

carlomorgantinizynga commented 11 years ago

If we decide to have support for lights mesh etc like Ricardo is suggesting, (I think that) we need to build it on top of a better renderer. I see the reasoning behind keeping things simple (going to OpenGL directly) but if you ask me, I would not try to build a complex system/s (like a fully fledged 3D engine) directly on top of OpenGL. Also, before writing a new renderer and a new 3D engine, I would try to do some research on what's already available "on the market" and see if there are open source solutions that could be adapted to our needs....writing a 3D engine from scratch is one order of magnitude harder than building a 2D engine. Something to keep in mind.

nickveri commented 11 years ago

@carlomorgantinizynga I like the idea of a dedicated renderer object if that's what you mean. Three.js (https://github.com/mrdoob/three.js/) is also using a scene graph structure similar to cocos2d, however, the drawing functions are separated from the renderable objects. In this way you are free to use the renderer of your choice. I think three.js supports around 4 different renderers. This might help when adding more renderable objects (e.g., CCMesh) but also when porting the renderer to a different graphics API (e.g, see issue http://www.cocos2d-x.org/issues/1490).