Games and Phonegap = cheatable? - javascript

I'm developping a very basic game for android using phonegap.
Since most of the code is Javascript, the game is pretty easy to "hack" when opening it in a web browser, for example by using cheatengine.
I'm not a Java pro, nor do I know how phonegap code is compiled for Android, but I'm wondering whether or not mobile games have this problem too. The code is run on the client so...
Thanks!

Yes most certainly. Applications like CheatEngine or the mobile equivalent work at very low level (assembly level) which all languages are ultimately compiled into therefore they are all equally as hackable.

Related

Can I write an app in javascript/HTML/CSS and sell it on the app store, google's play,and microsoft mobile app store?

I am interested in web standards (js/HTML/CSS). I would like to create applications from them, for phones and tablets. And sell these applications on mobile stores and web stores (for appstores and google play).
Is it possible ? What would be the best way to do it ?
Yes, there is a PhoneGap platform that can be used for building mobile apps for iOS, Android, Symbian, Windows Phone.Apps developed with it are accepted in all the stores. It is quite popular, robust and has nice features.
As mentioned in one of the other answers, yes PhoneGap will do the trick if you decide to write your app in HTML/CSS/JavaScript. Now, if you want to have a pleasant user experience on both smartphone and tablet operating systems, I would also recommend looking into Twitter Bootstrap.
This CSS framework has built-in responsive web-design styles that will allow you to scale things down in a user-friendly manner from tablet to smartphone, as well as show/hide different parts of your HTML depending on whether your users are viewing the page on a tablet or smart phone.
Specifically, you can do things like the following:
<div class="visible-tablet">
This will only be visible on tablets.
</div>
<div class="visible-phone">
This will only be visible on smart-phones.
</div>
For a full listing of the responsive design support in Twitter Bootstrap, check out their section on responsive design.
You may also want to check out the Google Chrome Web Developer plugin to assist you in creating a responsive web experience. This plugin lets you (among other things) view how your page will look on multiple device resolutions and is an invaluable tool for debugging resolution-specific issues.
You can look at Zurb Foundation, which is a very active open source project for building responsive web apps for mobile devices. Some overall description of the features here.
You can create Windows 8 Apps using Javascript and HTML 5 (apart from using Native languages). Windows 8 runs on Surface tablets and PC's.
Create your first Windows Store app using JavaScript (Windows)
There is a free ebook as well: free-ebook-programming-windows-8-apps-with-html-css-and-javascript
There are lots of options around - PhoneGap seems to be the most popular and, since it's now part of Adobe, it will probably continue to be popular.
However, there is a more important issue to be considered here: iOS users expect an iOS app experience, Android users an Android one... You get the idea. Make sure it's the best choice for your customers.
See this story about HTML5 at Facebook.
Also, and I know I might open a can of worms here, the performance will always be inferior to that of a native application.
You can also try MoSync:
"Build native mobile apps for all the major platforms using our leading open-source, cross-platform development environment. Now with support for In-App Purchases, NativeUI and Windows Phone 7." ]
There's Titanium from Appcelerator where according to their site you can build native apps using Javascript.
Just a late update: Facebook has open-sourced react-native since use asked your question and unlike PhoneGap (now called cordova) React-Native does not build hybrid app but builds true Native mobile application with the same power you would get when using Java for android or ObjectiveC for IOS. You can find out more here
No point in doing Microsoft/Windows Mobile anymore since it's now dead, but the easiest way to create Android apps based on HTML is to use DroidScript which can be found on Google Play (it did not exists at the time of this question).
You can also build native (non-html) apps with pure JavaScript using the same tool and it's far easier to use for novices than PhoneGap/Cordova.

Does it make sense to use Cordova or PhoneGap for the development of a pure browser-based web application?

At first glimpse Cordova and PhoneGap exist primarily for the use to develop apps to be used on a mobile device. Well, I am not interessted in the developement of native mobile apps.
There exists a webapplication (a cms) of our own and the question is now if a mobile toolkit like Cordova or PhoneGap is able to be of any help to develop parts of our cms functionalities with it in order to be able to support more plattforms.
Does it make sense to use Cordova or PhoneGap for the developement of a pure browser-based web application?
Phonegap (or Cordova as its now called) works by wrapping your webpages in a Webview and giving you access (in JavaScript) to some of the native device functions, such as the Camera, Accelerometer, Contacts etc.
As for whether it will help you depends on if want to make use of any of the native device functions, for example if you think incorporating the Camera (current HTML support for camera is quite spotty) into your web app is of use then you probably should consider it.
Another consideration is how your users will access the applications, with Phonegap it gets packages into a native app and they can just launch it from their home-screen (or however they launch apps on their mobile device), while with a Web App it depends on the device, on iOS you can pin it to your home screen and add some meta tags to make it appear more native like (for example hide the address bar) while on Android as far as I know you can't do that.
Finally consider that with Phonegap it might be more of a pain to debug your application since your HTML/Js is wrapped in a Webview, but as far as I've seen there is no easy way to debug it there.
One other thing I seem to recall reading somewhere that on iOS Apple doesn't give your native applications' Webviews access to the same amount of memory as if it were in safari so the exact sane web application when packaged into a Phonegap application might actually be slower.
To sum up, the benefits of wrapping your application in a Phonegap wrapper are access to native device functions and how your users access your app, if those aren't important (or the cons outweigh the benefits) than it probably isn't worth your while to go that route.
Cordova/Phonegap extend javascript with functionality provided by mobile operating systems. Therefore apps developed with these frameworks must be compiled to the target platform and only embed the HTML etc. in an embedded browser. The extensions need java, objective-c etc. code to run so I don't think that you are able to benefit from this code.
You are forced to write your own mobile device compliant HTML code when using Cordova/Phonegap. There are no neat mobile device ready user interface controls provided by the framework but only access to device specific hardware or software apis like notification etc. is given.
Cordova is just the latest name of PhoneGap. I would not go for that if you just want to build a mobile website. First of all publishing such an app on several online stores (iTunes, Play) is a pain.

Is it possible to write a 3D game like 'Temple Run' without WebGL?

iOS doesn't support WebGL yet, and I need to write a 3D-ish game like Temple Run for iOS. Is it possible to write a game like that in ordinary Canvas? Or should I give up on this?
Thanks.
Personally I would not try to write a Temple Run like game running in a Canvas and wrapped in PhoneGap on iOS. There is an issue where Safari on iOS runs using the Nitro JavaScript engine which is quite fast but apps that use a UIWebView like PhoneGap are limited to using a slower version of the JavaScript interpreter. This causes problems when you are trying to write games like Temple Run.
You can write games in PhoneGap but the type of game you are talking about would really stretch the system to the max. I don't want to discourage you, I just want you to have the info.

Developing a cross-platform self-contained HTML application

I am thinking of building an application, kind of like TiddlyWiki in the sense that everything is self-contained in an HTML file, or at least in a bundle where a user won't have to install anything. It works on just about any browser, and on mobile phones (Android and iPhone), and in some browsers (e.g. Firefox), manages to save to the local filesystem without a plugin (albeit, it launches many security warnings, but there are other solutions for that). Other browsers happen to use a Java plugin to bypass this restriction.
Are there any technologies that exist that make this possible? HTML5's web storage sounds like it would be almost perfect, except that the data would be tied to the browser.
Any assistance would be appreciated (even if that just means editting / retagging the question to get more folks looking).
Whats about the fileapi: http://caniuse.com/#search=fileapi
I am just adding a relevant comment with this but not exactly an answer...
When you are saying that you want to develop application which contains everything... Then I would like to add about Titanium, PhoneGap, and others (Corona)...
This softwares provides JavaScript base which will be running on all the mobiles (if mobile applications), desktops (if desktop applications) and so on.... But Titanium (as i am working on it) works on the SDK of all the other languages for development...
Now TiddlyWiki, what i have understood from the link is that it is creating a web application or something like that which will work on all the other mobile devices. But this is NOT Good always, Since some application needs to be a NATIVE environment (which is supported by Titanium). Native applications will be much more faster than any other developed applications..

I want to write a desktop OSX or Windows app in Javascript -- any experiences?

I'd like to write some small applications for Windows and OSX.
Portable is good. For instance, the simple TclKit solution for TCL would work well if I could stand to look at Tcl for any length of time.
I'm considering using Javascript + extensions -- I really like Javascript -- seems to me there should be some way to connect a Javascript engine to WxWin or even the Tk toolset -- it's been done for Perl, Python, Ruby, etc. Why not JS?
Any comments appreciated.
I would rather recommend using Adobe Air execution container, it offers way more capabilities / OS integration features compared to HTA of Microsoft or even XULRunner of Mozilla.
If you want to write a desktop app in Javascript, check out HTA: http://msdn.microsoft.com/en-us/library/ms536496(VS.85).aspx
Here is an example of an app that I wrote a long time ago in HTA: http://www.boltbait.com/htmleditor/
Hope this helps.
If you have experience with HTML+JS web applications, I'd recommend Mozilla XULRunner. It gives you native-looking interface widgets (every piece of Firefox interface is a XUL element), and a workflow similar to building HTML-based interface.
You define the interface using XUL, an XML-based language, so it's almost like writing HTML, minus browser incompatibilities and CSS (you can use CSS, but only if you want). All application logic can be written in JavaScript, but in XULRunner you can do a lot more in JS than in a browser (read/write files, execute system commands, make cross-domain XMLHTTPRequests, and a lot of other stuff).
More: http://xulplanet.com/
A lot of example applications: http://code.google.com/p/xulapps/
Mac OS X users tend to dislike applications that don't follow usability guidelines of the platform (menu must be at top of the screen, standard shortcuts & drag'n'drop must work, "OK" must be at right-hand side of alertboxes, no "Apply" button in prefs and so on).
With one-size-fits-all toolkit this may be very difficult to achieve.
The good news is that there's JavaScript<>Cocoa bridge that can be used to create stand-alone full-featured Mac OS X application in JS – just keep front-end and back-end of your application separate enough to be able to plug different UI for each OS.
Rhino would probably give you access to swing. Though, I don't know how much work would be involved.
On the other hand, building a swing app with JRuby is so easy even a sock puppet can do it, so it shouldn't be too hard.
Definitely if you want to implement it using JavaScript, Adobe Air is the way to go. You will even have support on Linux.
Give Titanium Appceletaror a look: http://www.appcelerator.com/.

Categories

Resources