Halfgeek's Forum Posts

  • Intel contacted me and stated they are aiming for an early August release of the latest XDK, which has a few nice options:

    1. IAP

    2. AdMob

    3. Manual control of APK signing! (YAY!)

    So hang tight. A lot of us are eagerly awaiting these tools.

  • Vuuv

    I have not tried, but what you are doing seem to go against the CJS engine. They can't do loading asset when required (people have been asking for it for years), since their acceleration engine depend on having access to everything, all the time.

    I thought it was hilarious that all audio gets decompressed & loaded into memory too, which is just stupid since there's no need for it.

  • This is not good news. If Crosswalk is that bad on certain cpus & gpus whilst coocoon works fine, then the problem is not the device but crosswalk

    Crosswalk blacklist a lot of GPUs based on the Google Chrome blacklist, so thats why they run poorly. They are updating it so you can choose to ignore the blacklist and your game will be GPU accelerated.

  • G'day fellow C2 devs.

    Due to the lack of documentation on CJS, I was curious about how CJS handles asset loading & memory on startup so I compared the results of two games of mine, Star Nomad & remade Ninja Legacy RPG Defense.

    In particular I noticed something odd, Star Nomad takes ~22 seconds to load all assets on most devices and consumed ~155MB of RAM. Ninja Legacy takes ~12 seconds to load and consumes ~125MB of RAM. There is quite a significant load time, which isn't explained by Store services or what not since they both have it. It then dawn on me, all this time I was worried about optimizing image assets to keep the RAM usage low, that this load time can be explained by CJS loading & decompressing audio, all of it, on launch.

    It also explains why CJS doesn't need to use preload audio to prevent first sound played lag, like XDK/Crosswalk.

    For comparison sake:

    Star Nomad only have ~46MB worth of sprite-sheet assets in RAM, following the power of 2 * 4 convention, ie. 64 x 64 x 4 = ~16kB RAM texture, 512 x 512 x 4 = 1MB etc. Ninja Legacy has ~80MB of sprite sheets.

    The difference comes down to Star Nomad having a lot more audio tracks, ~10 minutes extra worth of audio music. This causes it to use ~ 60MB more memory minus the sprite differences.

    Pretty rough analysis, but it seems 1 minute of audio music = ~6MB in ram, which is pretty huge, not just in terms of memory use, but the fact it has to decompress the audio make your game loads much longer. So for those who weren't aware and working on mobile games, I hope this is helpful.

  • It took them a few days after I emailed them.

    But in my own experience, Marketplace is only around $1 CPM for Banner Ads (per 1000 impressions), significantly lower than Google's AdMob, which is averaging me in my games around $2 CPM. So i turn it off and use AdMob.

  • Ashley Thanks for clarifying issues.

    Am I understanding it correctly, that when XDK update to support Ad/IAP, you guys are required to update C2 with an XDK plugin to take advantage of those features?

  • Crosswalk/XDK will be great once its got AdMob & IAP. That's all there is to it really, as a wrapper, it already functions very well if you optimize your games.

    And Ejecta again, it doesn't do IAP with the current C2 plugin, there's no options for it and no examples of working games on iOS with IAPs using C2's IAP & Ejecta plugin. The only example of an Ejecta game on iOS with IAP was via an older custom Ejecta plugin that was hand-coded & modified, but that revision was buggy & didn't have memory management.

    So we're kinda in a mess. C2 mobile devs are stuck with CocoonJS because it does work even if it has flaws.

    Intel have said that XDK will be getting an update to add AdMob & IAP support via phonegap plugin, and that C2 will have to support it with their own XDK plugin (that sounds like more hassle tbh, C2 XDK plugin talking to XDK that talks to phonegap!). Now, Intel is aiming to release the update this month. I wonder if Ashley is working closely with them to coordinate a C2 plugin that actually works.

  • I find it best so far to just make a separate version for iPad to cater to its 4:3, since it requires changing a lot of gameplay elements for me, may as well be a separate game.

    So 16:9 for Android & iPhones and 4:3 for iPads.

    Also 1080p is a bit too large for the market currently.

    iPhone/iPod Touch is still on 960 x 640 or 1136 x 640. Most Android are now 1280 x 720p or above.

  • If you destroy pathfind obstacles, you have to regenerate the pathfind map again, if its a huge map, its going to destroy performance on weaker PCs. I guess you can squeeze it in during the turn calculations.

    I'm about to start on my big single layout type game too so, fun & joy ahead!

  • It's never that simple. Also, HTML5 with CocoonJS or Ejecta gets to ~50% of native performance. It's not 100 times slower. :/

    pcprice76 Avoid using WebGL shaders for mobile games, period. They were designed for PC hardware in mind. Don't use it until you know what you are doing, most of them will cripple your performance.

  • It's easy to make games, its harder to optimize it. Requires good knowledge of game making & C2 usage.

  • Ok I know...

    but if I have a big boss enemy how can I do it?

    my images size of the boss enemy are 600x600 now,

    I can resize them to 256x256 with photoshop but on the construct2 if I scale the enemy to 600x600 it is "blurry" when I play the game....

    Break your boss up to smaller fragments to minimize waste (empty space on image = waste).

  • Wow now all is clear! Many thanks

    I have in my enemy sprite some animations with large image png, 600x600 pixel

    This animations increase that value.

    But what is the best Way to save large images?

    Png 8 bit can help me to keep memory usage low?

    It does not matter what format you save it us, once in GPU memory, its a full texture.

    Your 600 x 600 is slightly too large to fit into 512 x 512 texture so it has to go to the next one up (power of 2 size), so your image has to go into a 1024 x 1024 texture. As such, each animation frame would take up 4MB in memory.

    You need to read the tutorial Ashley linked above. Consider it COMPULSORY reading before you starting designing your game, its incredibly important to have good practices from the start before you waste your time making a boat load of animations which are poorly optimized.

    My advice is to not use any animated sprite above 256 x 256 in size. It's just too much of a memory hog to have 512 x 512 frames, if you have an enemy with 20 frames of that size, that single enemy is 20MB of memory once loaded into GPU.

  • What is the size of your animation frame for this enemy and how many do you have?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 4096 x 4096 textures (that is what your sprite becomes in memory because its larger than 2048 x 2048) aren't supported on a lot of older GPUs.

    Also. NEVER make an entire scene with 1 super large image.