11 ms·
This sounds like the same old rule that has existed for the last 30 years or more. If you want to build an app that uses graphically intensive animations, build
by memracom 10y ago
This sounds like the same old rule that has existed for the last 30 years or more. If you want to build an app that uses graphically intensive animations, build as close to the metal as possible and do not rely on layers provided by the OS.
I learned nothing from this because if I was going to build a game like he described, I would suck
it in and get down to the platform's assembly language layer which for IOS is ObjectiveC and for Android is Java.
It would be far more interesting to read a review that explores the boundary of what works well in PhoneGap and what doesn't. Clearly lots of successful apps are built in PhonegGap/Cordova. We could have the same conversations about desktop apps or server apps. Too many layers make things easier to build but impose a performance penalty. It is wise to think before you build and do some architecture and engineering before coding. Writing code is NOT engineering.
- TJSomething 10y agoI personally would recommend developing games in C++ for both platforms. You're not going to be heavily using any of the APIs that necessitate using Obj-C or Java. It's just OpenGL ES and other low level APIs. Additionally, it's easy to port between iOS and Android and you can use a much wider variety of libraries.
- vvanders 10y agoYup, you can do things that'll start getting close to the metal with Java(arrays to keep caches warm, avoid allocations). However at the end of the day it's a huge pain and you lose the portability you get with C++.
- bluedino 10y ago>> you lose the portability you get with C++ Wouldn't Java be more portable than C++?
- schwarrrtz 10y agoNot on mobile. You can embed compiled C++ code in both iOS and Android apps, but there's no easy way to run Java on iOS.
- jack463782 10y agoIs that the reason unity 3d is popular. Never thought c++ would be more portable than Java. But it makes sense now.
- murkle 10y agoMaybe not "easy" but certainly quite possible (x2): https://github.com/google/j2objc https://github.com/google/j2objc https://software.intel.com/en-us/multi-os-engine https://software.intel.com/en-us/multi-os-engine
- vvanders 10y agoNot if you don't have a JVM on your target platform.
- BoorishBears 10y agoI always recommend Unity3D because the devs that would be comfortable starting in C++ with "raw" OpenGL already know their options and generally aren't looking for recommendations. Usually when someone asks me "What should I use to make a cross-platform game", what they're really asking is "What tool can I use that won't get in the way of me making my game, that additionally allows me to target multiple platforms"
- fit2rule 10y ago> Cross platform mobile games when you have C++ skills: Use C++ with OpenGL and share most of the code. I would recommend MOAI - gives you the best bang for the buck, as long as you're willing to learn Lua to do all the app-layer stuff, and leave the MOAI engine to manage the performance-critical resources... http://getmoai.com/ http://getmoai.com/
- candiodari 10y agoOf course the little detail here is that 50 tiny sprites apparently counts as graphically intensive. Why do web developers constantly make the argument that Javascript is not slower than C (or Swift, or C++, or any native programming language) ? The difference is night and day, 5000% and up for simple things like drawing.
- dleslie 10y agoIt's a cargo cult.
- debaserab2 10y agoWho makes that argument? No one suggests that.
- erikpukinskis 10y ago> The difference is night and day, 5000% and up for simple things like drawing. I find that seriously doubtful, you're going to have to provide a citation if you want me to swallow that. The relevant comparison is a single JavaScript function in Firefox looping through a static array and making WebGL calls vs. a C++ function looping through the same array and making OpenGL calls. If the difference is 5000% or more I will donate $20 to the charity of your choice.
- GuiA 10y ago> The relevant comparison is a single JavaScript function in Firefox looping through a static array and making WebGL calls vs. a C++ function looping through the same array and making OpenGL calls. ...that's not how graphics benchmarking works. That would be like benchmarking a language by seeing how fast it can add up integers.
- SomeCallMeTim 10y agoActually their example of iterating over an array and making WebGL calls is very close to exactly what you need to benchmark.
- bitmapbrother 10y agoMost high end games are developed in C++ for both iOS and Android with Java and Objective-C wrappers for things such as IAP's and Game Kit/Play Games integration.
- golergka 10y ago> I would suck it in and get down to the platform's assembly language layer which for IOS is ObjectiveC and for Android is Java. That only makes sense if the graphnics performance is actually the bottleneck of your game. 99% of the games I've seen have game design as the weakest link though, and sometimes art (it's not amount of polygons on the screen — it's how beautiful those polygons are). And if you actually want to improve on your game design, the metric you have to optimize is iteration speed — and the "assembly language layer" is rarely the best for this purpose.
- swolchok 10y ago> get down to the platform's assembly language layer which for IOS is ObjectiveC The assembly language layer for iOS is assembly language.
- DonHopkins 10y agoC combines the power and performance of assembly language with the flexibility and ease-of-use of assembly language.
- eridius 10y agoYour comment sounds very confused. Obj-C and Java are not "assembly language", and nobody writes games for iOS that don't use any sort of OS-level functionality. That's completely ridiculous. Especially because iOS provides multiple different APIs for high-performance graphics, such as Metal/OpenGL for 3D rendering and SpriteKit for 2D rendering. Really the advice should just be don't use JavaScript and web technologies for mobile gaming.
- alxmdev 10y agoI took "assembly language layer" in the parent comment to mean the "lowest-level high-level language" commonly available on the platform.
- jack463782 10y agoIn android c++ binding is used to create high performance games and not Java entirely.
- raarts 10y agoThe fact that you may have understood what the grand parent meant does not mean he formulated it correctly.
- kitsuac 10y agoBeing a person who programs actual ARM/Neon assembly for both iOS and Android, your post is hilarious. ObjectiveC and Java are anything but assembly.