Halfgeek's Recent Forum Activity

  • Thanks R0J0hound & C-7

    It's for all the enemy sprites as well as player & squad, running through the forest and fighting fast paced.

    I thought about doing overlapping but those checks are brutal on CPU when there's a lot of objects to check.

    I'll play around with distance checks, pick nearest and LOS in combination with checking every X time rather than every tic. Thanks!

  • In typical jRPG, 2D view like Zelda, you have a lot of sprites of trees, shrubs, decals, etc that are quite static.

    But then you have the player, monsters, etc that move around and so you have to constantly update their position and determine which sprites go on top or below. ie. When the player is "behind" a tree, it should have the tree sprite on top.

    I know the basic approach that is to compare them on the Y axis, but my concern is if the map is huge, and there's a LOT of objects to compare to, it would be quite CPU intensive and so on mobiles, performance would suffer.

    Is there a more efficient approach?

  • Performance on PC was horrid a few months ago due to major issue with the wrapper, NWjs, older versions had buggy vsync, resulting in stutters and dropped frames. They also had memory leaks that caused bigger games to lag out after a short play session.

    I'm happy to say it's all fixed with recent NWjs builds.

    Mobile wise, WKWebView on iOS is extremely fast. But Android is still poor for bigger complex games.

    C2 is already great, really all we need is native export options for mobiles that bypass the wrapper limitations, such as frame rate control and efficiency gains of native vs wrappers.

    I feel that for PC, our current options are good enough lately. It's just lacking for mobiles. Yes it's getting better, but those limitations still puts C2 as always the non-optimal solution.

    tumira

    I read up on Spark, it sounds too much like hype and PR without substance. Will keep an eye on it, but as far as believing their claims, don't put too much faith on it.

  • Alright, test done. Big fleet battle scenario.

    On NW 0.13 alpha and RC, I get ~50% to 60% CPU usage on the main logic thread, as reported by cpuutilization.

    On NW 0.14 RC1, I get ~36% to 45% CPU usage.

    This is a significant improvement under peak load conditions.

    Under idling conditions, it's still around 10-15%, no change.

    Looking forward to GreenWorks shipping with C2 and moving from experimental status!

  • I recently asked the same thing.

    It turns out it's an engine limitation due to requiring browser rendering engines which implement vsync, so the game runs at whatever speed the display refresh is at.

    So for the meantime, cannot be done.

    Basically just know the limits, when you make bigger games, the CPU becomes the bottleneck as its processing all your JS code 60 times per second. Optimize, and more optimizations!

    How I approached my game is to limit cpuutilization to ~50% max (it measures CPU usage for the main game logic thread, single threaded bound). On my Intel i5-3570K, that means I am reaching 50% of the main thread. I can push it higher, going to 99% and the game starts to slow down. But 50% is a good target, because it means other CPUs that are much weaker, will be capable of sustaining 60 fps. I ended up with players on C2D PCs from 2006 with crap Intel graphics able to run the game fluid.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Danwood, I'll give it a test in Star Nomad 2. It's also very CPU intensive.

  • It seems pretty obvious, but 64-bit NW is intended for developing on a 64-bit system, while 32-bit NW is intended for developing on a 32-bit system.

    My system is 64 bit, OS and CPU.

    64 bit NW always runs worse. By a lot.

    It's not like this in other games.

  • OK, on my embryonic platform game, at the same re-spawn position with only some background bullet effects taking place...

    nw.js 32 bit preview: 48% cpu

    nw.js 32 bit export: 39% cpu

    nw.js 64 bit export 61% cpu

    It's illogical....

    I've always had much worse performance with 64 bit export so I've stuck with 32 bit.

    I delete the 64 bit NW folder, so the preview is using 32 bit as well, and I get the same performance preview or export.

  • Yes, there are lots of features to control what is stored on your device, such as private browsing - that would wipe storage when you close the tab. Some browsers refer to all local storage as "cookies" for historical reasons, so if you've done something like disable cookies then that can disable local storage as well.

    Thanks, I did not know that.

    Would those settings disable LocalStorage for wrapped C2 games that use WKWebView?

  • Can't reproduce on an iPad Air 2 with iOS 9.3 on r224. Given that iOS devices are usually pretty consistent and there are no other reports of this, it sounds like it's specific to your device. Are you sure you haven't set some privacy settings or content blockers that will block storage access?

    You mean there's a privacy setting that can block LocalStorage? I did not know that. I'll check it out.

    This problem doesn't occur on my iPad Mini 2 or Air. Only on iPhone 6 Plus. I don't have a normal iPhone 6 to test.

  • Canvas+ is their own engine so it does not have issues like Safari based ones that WebView has.

    But WebView+ is heaps faster and more power efficient than Canvas+.

Halfgeek's avatar

Halfgeek

Member since 24 May, 2013

Twitter
Halfgeek has 4 followers

Connect with Halfgeek

Trophy Case

  • 11-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

13/44
How to earn trophies