Is it inefficient to use Unity to turn 32kb of Javascript into a mobile app? Are there alternatives?

Started by
13 comments, last by Kylotan 7 years, 7 months ago

I'm not sure that's so true these days - the DOM is pretty well standardised at the moment. http://youmightnotneedjquery.com/

Advertisement

You could rewrite it as a web app and use Cordova/Phonegap for the mobile versions.

Wow. I'm glad I found this place! So much good information! (Of course, now there a part of me not going "maybe I should nut up and learn Objective C b/c bitwise operations will almost certainly come in handy later".)

@Kylotan re: "Why do you think Unity will do these things for you, and why can't you do them in Javascript?"

Basically because Unity packages and compiles the code, and seems "automate" the process of PvP. (i.e. I'm such a raw beginner, it could reduce learning time for getting the first iteration out there.)

I'm not sure that's so true these days - the DOM is pretty well standardised at the moment. http://youmightnotneedjquery.com/

The DOM is standardised but, few browsers follow the standard and the ones that do follow the standard have their own interpretation of it. The link you provided only has 3 different versions of IE to show their examples and one or two of these may be enough to sway some people into using a library. Once you add Firefox, Chrome, Safari, Edge and Opera you start to get a whole slew of differences.

The point of the link that developers should be aware of what JQuery is doing (A lot of them aren't) and not telling them that they don't need it.

Buster2000: I agree that it's not telling people not to use JQuery, and in fact I think using JQuery is a good idea. But saying "few browsers follow the standard" is really not true any more. It hasn't been true for quite some years. There are still quirks and some non-standard extensions, and if you're targeting the fewer than 1% of people who still use IE7 then it's a consideration. But for most typical DOM manipulation you don't need to worry about it.

beginnerdev: Sorry, I misunderstood your initial question. Unity can probably do what you want but you don't need to compile the code. It also won't handle everything you need for PvP for you, although there are some built-in networking features which you may want to research. You're probably best off sticking with JS, using one of the suggestions above to make it into an app, and using some other technology for your server operations. There are companies that will host simple servers and provide game services for you - look into Photon, GameSparks, etc.

This topic is closed to new replies.

Advertisement