Make a game with Cocos2dx on Linux

I am familiar with Cocos2d and Cocos2dx. But only I worked on a Mac, I know that it is possible to work with this engine (Cocos2dx) on Windows, but I do not know if it is possible to develop a game on Linux.

By the way: I'm not talking about the port, I want to develop the Videogame multi-format on Linux. It would be nice to know how to start a game on Linux.

Thanks!

+7
source share
2 answers

Until I tried, cocos-2dx, according to their documentation, can be used on Linux , although I understand that this means that you can create Android projects using cocos2d on Linux.

In terms of where to start, I used SFML and SDL , as they are well supported on Linux. Both are cross-platform, although SDL supports a wider range of platforms - I have an SDL2 game that runs on Linux and Android, for example, while SFML does not yet support Android or iOS. Coming from cocos2d, although I think you'll find the SFML APIs are easiest to pick up.

As a fair warning, the landscape is currently a bit confusing since SFML and SDL have the popular stable version (1.6 for SFML and 1.2 for SDL) with one API along with the popular development release (2.0 for SFML and 1.3 / 2.0 for SDL) which has a similar but not identical API. This is especially noticeable in the SDL, where the documentation for 1.2 is much better than the documentation for the development API. From the point of view of choosing one over the other, stable issues are just that - stable. In both cases, development releases have been going on for some time, so if you are ready to dig a little documentation and ask questions, is it worth using new features.

There is a book that provides an excellent introduction to Linux game development, which, being dated, can be a good first step if this is your first time going out with Linux games, especially if you decide to use SDL Linux Game Programming .

Update :

I saw directions here and after (roughly) following them, cocos2dx works on my Ubuntu 12.04 x64 machine. The Environment Setup guides seem audible, but the makefile information looks outdated since there is no * build_linux.sh * instead there is make -all-linux-project.sh. After you finished working with the missing depilations and the building, I went to the samples / HelloCpp / proj.linux directory and ran make. This created the HelloCpp binary in samples / HelloCpp / proj.linux / bin / debug . Launching this, laid out the HelloSorld cocos2d screen. According to the output value:

debugging information for cocos2d-x [cocos2d: cocos2d-2.1beta3-x-2.1.0]

However, I don’t see much documentation for the Linux port, and most of the related community entries look outdated, so you can find additional support from using one of the libraries that I already mentioned.

+4
source

Download the cocos2d-x project, where there are test examples of games that compile on all Android, Windows, iOS, Windows Phone platforms ... See you going to code in C ++, then you will build it on Linux or any other platform doesn't matter for cocos2d-x engine

so I suggest starting with cocos2d-x sample projects .... and how you want to do it on linux ... do something and then compile it on Linux, like me ...

+3
source

All Articles