Arima's Recent Forum Activity

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You seem to be missing the point of what we're telling you (and it's beginning to seem intentional), so let me try to make this as clear as possible: your condescending and rude tone, attitude and behavior is the problem here, not your points.

    Don't be rude and you can discuss things with moderators and everyone else just fine. There's no need for rudeness. It just makes people unhappy and derails discussion.

  • helena - which ipad and which version of iOS are you running? I understand your reluctance, but posting your capx would make it easier to determine the problem. You can try deleting stuff until it's unrecognizable or the problem goes away to get some sort of clue.

    You are both fundamentally wrong. Obviously mobile devices (even laptops) don't have the power of most desktop computers, but that is not the point. The point is nobody using HTML5 and C2 is going to hit that limit. HTML5, and the JavaScript C2 produces isn't going to win any awards when it comes to performance.

    It actually is the point of this thread. Helena has a game working fine on her computer but not on her mobile device. The reason is the difference in power.

    As I mentioned, even coding natively won't help you if you do something like try to use more memory than a device has. It's true that JavaScript is not as performant as native objective c, but neither is action script, and that fact is true on desktop as well. It's simply a limitation that has to be taken into account when designing a game. The fact that desktops are so much more powerful makes the performance difference for JavaScript vs native on the desktop pretty much irrelevant.

    Kyatric, the missing gameplay isn't a concern. The stuff you mentioned rarely takes 3% or 4% of most games.

    No. Just... No. This is wildly untrue. If it were the case, then we could all be running the latest games on pentium 3's. Just having pathfinding alone would put a game way past the 3-4% mark. Add collision detection, ai and everything else and then multiply it by the number of instances on screen to get a vague estimate of how much CPU it'll use. It's a lot more than you think.

  • You do not have permission to view this post

  • You do not have permission to view this post

  • Ipad4/iPhone 5s: 77 GFLOPS

    Geforce 9800gt: 504 GFLOPS

    Nvidia TITAN: 4,500 GFLOPS

    As Kyatric said, it's not an excuse, it's a fact. My graphics card from almost 6 years ago is still slapping some of the latest tech in the mobile world silly in terms of performance, and the latest desktop cards are running circles around my 9800gt. Most people don't even have the latest tech, either, often still using things like the iPhone 4S which are significantly weaker.

    It is possible to get good looking graphics on mobiles, but concessions must be made: lower resolution textures, less intense code, less polygons, ways to fake higher level features at reduced image quality. The citadel demo was restricted in the same manner. Believe it or not, 2d games can actually be harder for a gpu to render on mobiles than 3d because of the fill rate, which is one of their weak points. If you have two sprites overlapping each other, then the area that is overlapping is drawn twice. That's overdraw. When you've only got 3 passes of the screen to work with, it's very, very easy to go above that. Also, transparent pixels are more expensive to calculate, and while 3d objects are generally opaque, images often have lots of transparency, making it worse.

    I'm not trying to claim the situation on mobiles for c2 is perfect (referring to cocoonjs here, I haven't tried crosswalk for android yet). A perfect example is the lack of memory management - if the game described by helena was coded natively, the texture could be split up and it could be coded to load the necessary segments of the background and dump the unneeded ones, keeping memory use low. As with everyone else - finding ways to work around the hardware limits to achieve a certain effect.

    If cocoonjs implements memory management, then at least the very tall background could be implemented.

  • All browsers on iOS aside from safari use the web view - which is basically a crippled version of safari that doesn't have JavaScript optimization, so everything that uses JavaScript, like c2 games, is much slower. Same thing with a web app saved to the home screen.

    Also, remember that mobile devices are nowhere remotely near as powerful as desktops. They have very little processing power and memory in comparison - even if you were coding in raw assembly, there's just some things they cannot do. AFAIK, iOS devices can't handle textures above 2048x2048 and start having to resort to tricks to stitch large images together, an example of which being how Safari is known to either reduce the resolution of images or not load images at all that are too tall, which sounds like might be happening in your case with the background. You might also be asking too much from the CPU, via too many collision checks or physics or something.

    You also might be having overdraw problems, as the graphics card can only calculate so many pixels per second. Many devices are only able to draw each pixel on the screen three times per frame at 60fps - and that's only fully opaque ones, transparent ones require more calculation. Fully transparent pixels in a texture count towards the pixel fill rate, too - they also are processed by the gpu.

    There are ways to improve memory use and such: I suggest start by reading this: https://www.scirra.com/blog/112/remember-not-to-waste-your-memory

  • You do not have permission to view this post

  • You do not have permission to view this post

  • There are keyboard shortcuts, with them you can type a lot of events.

Arima's avatar

Arima

Member since 11 Jun, 2007

None one is following Arima yet!

Connect with Arima

Trophy Case

  • Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Email Verified

Progress

19/44
How to earn trophies