cocos2d-x 3: cross-platform data handling - cocos2d-x

I am using cocos2d-x 3.2alpha0 and want to save some game stuff. It should work for android/ios/win32.
The wiki says: http://www.cocos2d-x.org/wiki/How_to_read_and_write_file_on_different_platforms
(it's from 2011)
Forum says this: http://discuss.cocos2d-x.org/t/please-help-cocos2d-x-to-determine-whats-the-correct-path-to-save-a-file-on-ios-and-android/5578 (it's from 2013)
I am not sure if ileUtils::getInstance()->getWritablePath(); really works for all platforms.
Any advice on this?

Related

Chromium Embedded Framework (CEF) html5 desktop application

I am new to Chromium Embedded Framework (CEF). How can I create an HTML5 desktop application using CEF. I serached a lot. But still confused about developing the applicaion.
please help.
You can create a CEF application in different languages (c/c++ or C#, python or ...), what is your preference about that?
In case of C# you might want to try https://github.com/cefsharp/CefSharp, I used this one in the past and it worked really great!
There are also sample projects in the CEF svn found here:
CefClient and CefSimple
Together with this tutorial here: https://bitbucket.org/chromiumembedded/cef/wiki/Tutorial
In the past I used CefSharp and one time I changed the CefClient example (removed everything I didn't need) and rebuild it. Using CefSharp was a lot simpler than the CefClient.
Another possibility might be https://github.com/rogerwang/node-webkit but that isn't CEF so a bit offtopic
edit:
For java there seem to be two CEF Wrappers
javachromiumembedded
javacef
See an example application here (code): javacef

About Adobe Gaming SDK?

I have no programming experience at all. I've always wanting to know how to program games and have some fun with it. I started with Corona SDK because I heard it was really simple (and it was very simple), but I decided against continuing in it (I had only programmed a character to jump until I realized --> ) because I realized that when I advance in it, I am going to end up having to pay for it.
In my search for a new cross-platform sdk to learn (since I don't have time, like most people, to learn and program 15 different apps in 15 different native languages), I found Moai SDK. I was turned away from Moai since its target audience are people with prior programming experience.
Later, I found Adobe Gaming SDK. Although I doubt it is in any way as simple to pick up as Corona's Lua, if I figured if I have to learn something knew, I may as well learn something new that is as established as Adobe and their gaming SDK.
I have a few questions though...
1) What language does Adobe Gaming SDK use? (Pretty sure it is Action Script 3, but I do not know much about that either.)
2) Just how cross-platform is it? (Which devices?)
3) Where do I start!
4) Is it free?
#3 is the most important question for me since I don't have any programming experience, but I am willing to learn on my own. Honestly, I only want to learn how to program (2D) games; therefore, is there a source you can direct me to in order for me to learn from scratch and just gaming.
Any and all help is greatly appreciate!
P.S. If you have any other SDK or something that you think could suit me please help. Also, I am a cheap person, so i would prefer for resources to be free as well. Also, please check back if you answered my question because I sometimes forget a question or will have a follow question since I am a major novice.
THANKS!
1) What language does Adobe Gaming SDK use? (Pretty sure it is Action
Script 3, but I do not know much about that either.)
Yeah, it's ActionScript3. You can also code in C/C++ using CrossBridge.
2) Just how cross-platform is it? (Which devices?)
Using Adobe Integrated Runtime (AIR, for short), you can make your game available to several devices running iOS, Android and Windows, as long as they have the minimum requirements to run AIR.
Your game will also run on any browser with the Flash plugin, which includes Linux, Mac and Windows.
3) Where do I start!
There are plenty of materials about game development in Flash/Actionscript3, but I would recommend you to learn about a game engine first. It will make your life easier and will help you make a game faster (which will boost your motivation).
Two famous Flash game engines are Flixel and Starling. Start by checking these GamedevTuts+ guides: how to learn Flixel and how to learn Starling (there is an article about how to learn Flash/AS3 too).
4) Is it free?
Yes, all the tools you will need are free.
As a general advice, I would recommend you to take a look at GamedevTuts+. It has several resources about game development, from simple concepts to more advanced things. You will find articles for people with no programming experience at all. It's a great place to start as a novice game developer.
As a second advice, you could also use Phaser to create your games. It's an easy to learn HTML5 game engine, it doesn't require several tools to develop with (all you need is a code editor and a web server) and your game will run on any modern browser.

Wrapping a HTML5 app into an executable for Windows/Linux/Mac

I'm building a HTML5 mobile app which I'm going to wrap in an Android and an iOS app with a simple web view. However, I have some users that use my current Adobe Air app (which is now unsupported), and I'd like to offer them this new app I'm building.
I've heared that Adobe Air's implementation of webkit is rather old and unstable.
Is there any good tools for wrapping a local browser (preferably webkit) and my app in an executable for cross-platform (PC) use?
I've just seen this http://appjs.org/ and I'm glad to see that Alex's TideSDK sounds great also !
Adobe AIR can do what you want, but I won't support that solution : it's slow and not really crossplatform since they drop the support on Linux if I'm correct.
If someone happen to test the others, feedback is welcome !
Off topic: Moreover I've chosen not to trust Adobe for my technical choices anymore. We've waited Flash on mobile for years, they drop the idea. We've been waiting for optimization on Mac and Linux for years, but nobody cares. The new hype some months ago was expecting compilation to HTML5, it's just some buzzwords mixed together and some old sketchy alpha version as far as I know.
EDIT
AppJS has moved http://appjs.com/
EDIT
node-webkit seems to be definitely a must see now ! https://github.com/rogerwang/node-webkit
Read an article lately about this sdk: http://www.tidesdk.org/ . I haven't worked with it yet - so can't really say if it's worth trying and doing what you want.

Develop Native Application on Ubuntu with HTML/CSS GUI?

Redmond has a good idea occasionally:
The next-gen Windows will come with a new programming foundation, letting developers build native apps with the same techniques they use for Web applications. Microsoft calls this new variety "tailored apps."
There is always a steep learning curve for developing GUIs; each new toolkit you learn is different enough that it takes a lot of time and effort and frustration. Thus developing in HTML with CSS begins to look very appealing: it's much easier and much more portable; and with HTML 5 and CSS 3, it is very powerful.
Is there any support yet on Ubuntu (or even better, a cross-platform toolkit) for developing native applications that use HTML/CSS for the GUI? To minimize overhead, I do not want to start a full browser session. (That's not very good desktop integration.) I am particularly interested in answers for native JavaScript or Python 3, but any language would be alright (easier to learn a new language than a new GUI toolkit, in my book).
Edit: I have found this page, but have not had time to read it all or test it. It linked to Python XULRunner, but again I have no previous knowledge of it.
This was asked on Ask Ubuntu back in August of 2011.
In summary, the options are:
SeedKit
The JavaScript bindings for GNOME.
There are more options, but those are the two "big ones".
You can write native apps in HTML/CSS and Javascript using node-webkit, is an app runtime based on Chromium and node.js, you can use node.js modules into your apps. it's available on Linux, Mac OSX and Windows
I would like to add QtWebKit to the list. It's like SeedKit with better support.
I'm using it personally on a project where we have native (C++) code for the data layer, business logic and the presentation layer is done via HTML5 and heavy use of JavaScript. As far as I know Qt can be used with python as well so perhaps you could use it for all the business logic.

A versatile yet simple gaming development platform for a rather beginner?

I am interesting in game development. However, I am not sure what platform to choose. There are a few different platforms I have been considering so far:
Microsoft XNA
Games only work in Windows and Xbox?
JavaScript and WebGL
Bad performance. This is mainly due to JavaScript -- the language is essentially synchronous and even timers do not run asynchronously. The only good way to use JavaScript would be to utilize Web Workers, which complicate the development quite a lot.
Flash
A dying technology that I personally dislike and unsupport.
C++ and OpenGL
Cross-platform compliant all the way, but very hard to develop games.
Am I missing anything worth considering? What I am looking for is a simple yet enough powerful to make 2d and basic 3d games and being able to run it on as many platforms as possible.
Also, is it possible to run XNA games on Linux/Mac? What about mobile?
You should probably look at a framework that allows the use of Java/C++ but takes away some of the pain.
For C++ take a look at Ogre.
For Java take a look at jMonkeyEngine.
If you're going to be targeting mobile devices incl. iPhone/iPads too look at something like Unity/Unity Pro which supports JavaScript, C# and a dialect of Python and can publish out to multiple platforms.
You'll get better answers in https://gamedev.stackexchange.com/
If you don't mind spending some money, you might want to look at Torque.
For anything advanced you'll need to use C++, but for simple games, the TorqueScript is fine. They currently support Windows, Mac and iPhone/iPad, athough the Mac and iPhone/iPad support is usually less than the Windows support. But still pretty good for most things.
You can also publish the PC games to the web browser with their ActiveX and NP browser plugins.
They also support some consoles. For XBox they have a version of the engine that is built on top of XNA, and you can also get a version that is built on top of the native XBox SDK. I believe they've also gotten it going on PS3 as well. For the XBox and PS3 native stuff, you're going to be looking at some real money though.
WebGL and Javascript and canvas are getting a lot faster now, thanks to typed arrays and native animation support and hardware rendering, see for example:
https://hacks.mozilla.org/2010/08/more-efficient-javascript-animations-with-mozrequestanimationframe/
(download the nightly version of firefox minefield to try it out)
There are various webgl game frameworks available already (see the 'learning webgl' site for info).
It's not going to work on mobile/tablet platforms though probably for a good while.