Ahmed AlShebli Cocos2d on Qt
Posts 3
Added by Ahmed AlShebli over 1 year ago

Hi there

this is it, no a complete cocos2d but some features ( Although the back-end is different, the front end is very similar)

http://projects.developer.nokia.com/cocos2d ( Full example is downloadable )

Why Cocos2d on Qt is important?

Qt now suuports most major platforms, so you properly going to have your game running on different platforms, writing your game once, without any modifications and releasing it to these OSes is simple, it supports

1 - Windows ( XP, Vista, 7, 8 ... )
2 - Mac OSX
3 - Linux ( ubuntu, fedora )
4 - Symbian
5 - Android
6 - Windows CE
7 - iOS (iPhone, iPod and iPad)
8 - Coming soon ( Windows phone, yet not confirmed )

So why not, if this project gets larger and larger, we'll have a great game engine, that you write your code once, and then deploy your game on different platforms with 0% port effort, I've personally tested the Qt port for iOS and Android, and I can tell that it's amazing!!

Best wishes
Ahmed

Marcio Andrey Oliveira RE: Cocos2d on Qt
Posts 111
Added by Marcio Andrey Oliveira over 1 year ago

Hi, Ahmed.

First of all I want to thank you for your effort. I really appreciate what you're doing.

I saw the source code and it's not in the same standard as other platforms on cocos2d-x.

Even the public interface used by developers to create games are different.

Shouldn't you:

  • clone cocos2d-x source code
  • goto <COCOS2D-X ROOT>/cocos2dx/platform create a copy win32 folder and change it's code to use QT APIs instead of win32 API?

This way:

  • you would have less code to develop (it would be possible to compile QT source to Symbian using Nokia's SDK)
  • you would have more people interested to use your code.
  • it would let your code be integrated to official cocos2d-x source code tree.

Again, please, don't get me wrong.

I know you're putting a big effort and time to help community.

I'm just sharing my point of view because I'd like to see a QT port of cocos2d-x (you can see my idea about it here) but I wouldn't want to learn another API and I guess many users think the same way.

Regards.

--
Please,

Marcio Andrey Oliveira RE: Cocos2d on Qt
Posts 111
Added by Marcio Andrey Oliveira over 1 year ago

Hi, Ahmed.

Just to complete my answer.

Suppose you've created a copy of

<COCOS2D-X ROOT>/cocos2dx/platform/win32

named

<COCOS2D-X ROOT>/cocos2dx/platform/qt

Then you would rename the _win32 part of the file names inside the qt folder:

CCAccelerometer_win32.h
CCApplication_win32.cpp
CCApplication_win32.h
CCEGLView_win32.cpp
CCEGLView_win32.h
CCFileUtils_win32.cpp
CCImage_win32.cpp


to
CCAccelerometer_qt.h
CCApplication_qt.cpp
CCApplication_qth
CCEGLView_qt.cpp
CCEGLView_qt.h
CCFileUtils_qt.cpp
CCImage_qt.cpp


and replace their implementation (that uses win32 API) with other that uses QT API.

Walzer and Minggo know better than me. They can correct me and guide you to the best way you can focus your efforts.

Regards.

--
Please,

Ahmed AlShebli RE: Cocos2d on Qt
Posts 3
Added by Ahmed AlShebli over 1 year ago
Marcio Andrey Oliveira RE: Cocos2d on Qt
Posts 111
Added by Marcio Andrey Oliveira over 1 year ago

Hi.

Unfortunately I'm not only a bad programmer that don't know OpenGL.

I'm a bad programmer that don't know OpenGL and that suffer with tendinitis.

Sorry.

Regards.

--
Please,

Marcio Andrey Oliveira RE: Cocos2d on Qt
Posts 111
Added by Marcio Andrey Oliveira over 1 year ago

Ahmed, there are two very interesting projects from BogDan Vatra:

Both projects are derived form QT lighthouse project.

As both projects have to deal with OpenGL integration, there are two possibilities:

1 - BogDan Vatra worked by himself to solve OpenGL integration;

2 - BogDan Vatra used something from lighthouse project to handle this.

Maybe it worth you ask him and check how these projects solved this OpenGL problem.

Regards.

--
Please,

Zhe Wang RE: Cocos2d on Qt
Posts 1642
Location Amoy, China
Added by Zhe Wang over 1 year ago

OK, guys, I have a cool stuff to show.
https://github.com/honghui/cocos2d-x/tree/QtPort
Honghui Zhang, one of my collaborator, is working on port cocos2d-x for Qt for several months, and our goal is to create an Editor with it eventually.
His Qt port is semi-finished, cocos2d-x/platform part is done while 3rd-party libraries are haven't. This Qt port can run on windows now, linking 3rd-party libraries of win32 port.
We can continue the job from here :)

Enjoy Coding, Enjoy Life.

Marcio Andrey Oliveira RE: Cocos2d on Qt
Posts 111
Added by Marcio Andrey Oliveira over 1 year ago

Walzer, you always have good news.

Sorry but I didn't understand what you mean when you said:

our goal is to create an Editor with it eventually.

Do you want to create an editor (other than QtCreator) or do you want to create a project to use QtCreator ?

Regards.

--
Please,

Dany Menko RE: Cocos2d on Qt
Posts 94
Added by Dany Menko over 1 year ago

Amazing Walzer! Can't wait!

Zhe Wang RE: Cocos2d on Qt
Posts 1642
Location Amoy, China
Added by Zhe Wang over 1 year ago

@Marcio, I mean an action editor for cocos2d, it must can run on both windows + osx, and perhaps ubuntu.

Enjoy Coding, Enjoy Life.

Dany Menko RE: Cocos2d on Qt
Posts 94
Added by Dany Menko over 1 year ago

If you're already doing OSXand win32, why 'perhaps' Ubuntu? If Qt is good in something it's multiplatform compatibility. I wouldn't hesitate if I were you.

Ubuntu QT port = awesome.

Zhe Wang RE: Cocos2d on Qt
Posts 1642
Location Amoy, China
Added by Zhe Wang over 1 year ago

Oh, that's great. I'm not familiar with Qt and Ubuntu.
If Qt apps can run on these desktop systems seamlessly, it would be easy to distribute different versions, just like TileMap.

Enjoy Coding, Enjoy Life.

winipcfg winipcfg RE: Cocos2d on Qt
Posts 56
Added by winipcfg winipcfg over 1 year ago

Is that meant we can debug on iphone in Windows platform, without the need of MacOS machine?
Thanks

Zhe Wang RE: Cocos2d on Qt
Posts 1642
Location Amoy, China
Added by Zhe Wang over 1 year ago

Cocos2d is a framework, so you still need a mac to build and distribute your ios game.

Enjoy Coding, Enjoy Life.

winipcfg winipcfg RE: Cocos2d on Qt
Posts 56
Added by winipcfg winipcfg over 1 year ago

Walzer Wang wrote:

Cocos2d is a framework, so you still need a mac to build and distribute your ios game.

DragonFireSDK can do deploy in Windows and so I expected it could be done by other tools.
http://www.dragonfiresdk.com/docs.html

Marcio Andrey Oliveira RE: Cocos2d on Qt
Posts 111
Added by Marcio Andrey Oliveira over 1 year ago

@Walzer Instead of write on tile map editor, wouldn't be better to pick an existing one?

There is this one http://www.mapeditor.org/. It's writing with Qt so it can run on Windows, Mac and Linux.

Tiled is an open source project.

@Dany I agree with you.

Regards.

--
Please,

Zhe Wang RE: Cocos2d on Qt
Posts 1642
Location Amoy, China
Added by Zhe Wang over 1 year ago

@Marcio, you misunderstood my meaning. We gonna to make a n editor focus on layout and actions, and the final goal is to achieve skeleton animation feature. Without an editor, skeleton animation support in engine is meaningles. But the editor should run on windows and osx, so it should base on Qt.

Enjoy Coding, Enjoy Life.

Dany Menko RE: Cocos2d on Qt
Posts 94
Added by Dany Menko over 1 year ago

I think he means you will get a QT WYSIWYG editor where you can edit the way your game behaves.

Marcio Andrey Oliveira RE: Cocos2d on Qt
Posts 111
Added by Marcio Andrey Oliveira over 1 year ago

@Walzer Yes, I really misunderstood what you mean. Sorry.

Anyway, when multi-platform and C++ are requirements Qt is always the best choice ;)

--
Please,

Jarvis Lee RE: Cocos2d on Qt
Posts 2
Added by Jarvis Lee over 1 year ago

Great work Walzer!

Now I just want to make a tool both for windows and mac os. Now I'm trying to use QT for UI, and some cocos2d-x features.
I think the qt-port is really worth to do!
btw, what do you mean by the 'action editor'? like animation editor? Can you explain it more?

winipcfg winipcfg RE: Cocos2d on Qt
Posts 56
Added by winipcfg winipcfg over 1 year ago
Laurens Rodriguez RE: Cocos2d on Qt
Posts 26
Added by Laurens Rodriguez over 1 year ago

As always you guys amaze me :D
Great work Walzer and congrats to your team worker for pulling this off (y)

Jarvis Lee RE: Cocos2d on Qt
Posts 2
Added by Jarvis Lee about 1 year ago

I did a little test for demonstrating cocos2d-x for QT based on win32 :D
But I had to spend sometime to modify the latest code, like setting up the GLEW, and integrating the view with qt's main window(ouch! I just want to make an editor, not only a game).

Now I'm looking forward to this port can be used on mac! Can't wait!
Is there anything I can help for the qt porting work?

cc2xqt.png (248.2 kB)

Catalin Moldovan RE: Cocos2d on Qt
Posts 15
Added by Catalin Moldovan about 1 year ago

Hi,

I've done a port of cocos2dx on Qt platform using OpenGL ES on all qt supported platforms. It is a bit messy for the third party libraries part but here's what I found out doing the port:
- on win32 using the PowerVR OpenGL ES drivers I got HelloWorld example to work ok, no issues. I've used the third party libraries from the native Win32 port.
- on Symbian I had to port also the third party libraries (some of them reused from other open source projects with small changes e.g. libpng and libxml2). The issue here is that some of the required extensions are not available in the drivers (OES_framebuffer_object). Although the hardware has support because in OpenGL ES 2.0 this is standard, the OpenGL ES 1.1 drivers on the tested device (Nokia N8) don't have the extension enabled (doesn't appear in the GL_EXTENSIONS string and eglGetProcAddress returns NULL, and I tried getting them right, after setting the current GL context with eglMakeCurrent).
- on Nokia N9 (MeeGo Harmattan), I could reuse some of the third party libraries that come with the Madde platform, but as with Symbian the OpenGL ES 1.1 drivers don't have the framebuffer extension.
- don't know how it will fare on Mac OS X or Linux. On Linux I know that PowerVR have also a OpenGL ES 1.1 and 2.0 implementation, but don't know about Mac OS X.

I've decided to use OpenGL ES on all platforms supported by Qt as it would have been easier to maintain, and this way it is a single code base for all these platforms, but unfortunately from my experiments it seems that on Symbian and MeeGo it is not working. I didn't investigate further inside Cocos2Dx to see if that extension is essential or used only by few features of Cocos2Dx.
Maybe an OpenGL ES 2.0 port would seem more feasible for Qt as framebuffer functionality is standard in 2.0. An OpenGL ES 2.0 port on Qt would add Win32, Linux, (maybe Mac OS X), Symbian, MeeGo in the equation with a single code base.

Cheers,
Catalin

Catalin Moldovan RE: Cocos2d on Qt
Posts 15
Added by Catalin Moldovan about 1 year ago

Forgot to mention that there are also unofficial ports of Qt to iOS and Android, and maybe even Windows Phone in the future as Ahmed stated previously so a Qt port would make it very easy to maintain the library and also the developer's games. But from my point of view this would be feasible for an OpenGL ES 2.0 port of Cocos2Dx where current GL features required by Cocos2Dx are standard on all OpenGL ES 2.0 implementations.

Marcio Andrey Oliveira RE: Cocos2d on Qt
Posts 111
Added by Marcio Andrey Oliveira about 1 year ago

@Catalin Moldovan what you've accoplished is really great!

Now I hope cocos2d-x guys will merge your work ASAP :)

Thank you!

Regards.

--
Please,


1 2 Next » (1-25/28)