thehen's Forum Posts

  • Alcemon My whole game is 7mb, though I could probably get that down to 5mb if I fixed a few plugins so I could minify the script. Performance is great across the board - physics bottlenecks way before sprite count.

    I'll write my post up as a tutorial next week :)

  • We use Biz Spark and it's incredibly useful. Free Windows 8 and 7 keys have saved us a couple of times.

  • For Mortar Melon I learnt a few things along the way.

    One of the biggest things I found is that when you employ depth of field, out-of-focus imagery can be upscaled at no real visible loss of quality. This can save a lot of video memory and improve performance, but it leaves you in a difficult position as to whether use tiled backgrounds or upscaled sprites (as tiled backgrounds can't be scaled).

    I found that the more out of focus an image was, the more it made sense to not use a tiled background. However, when I got closer to the in-focus layers, then tiled backgrounds were more effective resource-wise.

    Hopefully this breakdown should illustrate my point.

    This is the complete layout for one of my desert levels:

    <img src="http://i.imgur.com/gBwo9D3.jpg" border="0" />

    Here is my foreground layer. Whilst these sprites are some of the biggest on the screen, they're also the most out of focus and hence upscaled from smaller sprites without much deterioration in quality. The trunks that frame the image are tiled backgrounds because they extend dynamically to fit either very long or tall levels.

    <img src="http://i.imgur.com/pnWyRwe.jpg" border="0" />

    This layer has one of the biggest sprites and because it's fully in-focus I couldn't scale up without a loss of quality, so it made sense to make it a tiled background. Normally I'd bake the pot into the tiled sprite but as it sometimes overlapped things awkwardly, I made it a separate sprite.

    <img src="http://i.imgur.com/ZMgJPTC.jpg" border="0" />

    Whilst the playground layer is typically made up of individual sprites, I created a separate wood tiled background so that I wasn't using hundreds of individual sprites to construct complex scaffolding. After implementing this optimisation I was often able to half my onscreen sprite count. This only works with non-physics objects (you can see the physics wood has a red tint).

    <img src="http://i.imgur.com/552n9fa.jpg" border="0" />

    This layer uses a simple tiled background for the sand, and as the tree is out of focus it's scaled up.

    <img src="http://i.imgur.com/2SILeeU.jpg" border="0" />

    This is quite a large tiled image, but a lot of it becomes exposed on taller levels so was necessary. This would probably be better off as an upscaled sprite in hind-sight.

    <img src="http://i.imgur.com/HGNMXY3.jpg" border="0" />

    As the parallax decreases over distance it made sense to upscale this as a sprite rather than use a tiled background. It's a seamless sprite so you can still paste it next to itself and it will tile for longer levels.

    <img src="http://i.imgur.com/CcrZ0F2.jpg" border="0" />

    Normally you could get away with a single upscaled sprite for the background here, but as I'm using my own scaling solution, the area above could become visible on narrow resolutions. I solved the problem by fading the background sprite into a dynamically sized tiled background.

    <img src="http://i.imgur.com/lpwnLWK.jpg" border="0" />

    Final ingame shot:

    <img src="http://i.imgur.com/0aO0Zou.jpg" border="0" />

  • Blacksmith before doing this make sure you get performance gains from uploading to a remote location as I described before. It seems related to the number of images in a project. It would be a waste of time if there was no discernible difference between the remote and local versions.

    beufreecasse that would be great if you could!

  • beufreecasse good to know.

    Right, you're probably not going to like this, I know I didn't. You'll need to base64 encode your images as data uris into your c2runtime.js.

    So this:

    ["images/bg-sheet0.png", 369850, 0, 0, 800, 480, 1, 0.5, 0.5,

    [],[],0]

    Becomes this:

    ["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIA...", 369850, 0, 0, 800, 480, 1, 0.5, 0.5,

    [],[],0]

    Here is a tool that is relatively quick at encoding.

    If anyone knows how to write a build script for Visual Studio to automate this I'd love them for ever. This is a real pain.

  • Are you using the latest beta by any chance? There's a known bug with animated physics objects - does that sound like it explains the issue?

  • Very interesting. Has anyone tested memory management with WebGL? Would that explain the reduction in ram use?

    I'd also be interested if anyone can do some physics benchmarking.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • gamepopper new browser functionality needs to be added so that it opens in the device browser. Rate game support is fourth on my todo and dependent on this so it will be coming soon.

    I've currently got minification and trial working, and now finishing off IAP. Should be releasing an update soon.

  • 30 fps on iPhone 4 is actually pretty good. I generally target iPhone 4S and above. Regarding the Sony Xperia neo L, it's difficult to gauge without testing on a more popular device like the Galaxy S II. It's also difficult to gauge with no understanding of the games complexity.

  • Have you looked at webstorage? Saving to notes specifically would be niche functionality and I don't think there's a way to do it.

    From a user perspective, what is the benefit in them saving the score to notes?

  • 30fps should be the baseline target for mobile devices, and there's many Android devices so you'll need to be specific.

  • Thanks all *relief*

    beufreecasse I had very poor performance to begin with on my 820. If you upload the entire Windows Phone project to a remote location, then change the following in MainPage.xaml.cs:

    private string MainUri = "/index.html";

    to

    private string MainUri = "http://[your remote location]/index.html";

    and

    Browser.Navigate(new Uri(MainUri, UriKind.Relative));

    to

    Browser.Navigate(new Uri(MainUri, UriKind.Absolute));

    Test out this and see if the performance is better. If it is then there's a way to vastly improve performance.

  • Blacksmith ah this is disconcerting. We've done a lot of work on the Windows Phone version of our game but don't have a HTC 8S to test on :X

  • beufreecasse Can you try disabling all audio and see if that fixes it?

  • BluePhaze I've not had the need for an IIS server yet, but Azure Mobile Services have announced HTML support, and it looks easier to setup with IIS.