unplugged's Forum Posts

  • Thanks for the suggestion thatserafimkid, I'll give that a try

  • Hello everybody

    Whenever I've made HTML5 apps, I've always set them up so that when you close the app, and then re-open it, it automatically starts from the first page again.

    It may seem like a stupid question, but I know that other apps (probably native and not HTML5) can do this, so here goes. When a user opens and app, is there a way they can go straight back into the page they closed the app on. So for example, if your app has 10 pages and the user exits on page 5, when they reopen the app, can it be opened on page 5? Or does it always have to go right back to the first page again?

    Thanks

  • Thanks for the advice mikehive, I'll give it a try.

    I'm also looking at other audio plugins, to see if any of them can deliver better/faster results.

  • Hi fm4fanAT,

    Thanks for your reply.

    I'm using a sample rate of 44.1khz (required for C2 audio, I believe) with a bit depth of 16 bits. I've also reduced the size by setting the tracks to mono, rather than stereo. So I think they're as optimized as they can be, but it's still a lot of audio data.

    Each track is linked to a separate page, and each page discusses a particular health issue. So I can tell when each track will be required.

    I have tried loading each track a few pages before it was required. But with audio lag ranging anywhere from 6-12 seconds, this approach seemed to cause a few problems. Firstly, this approach still can't load the first track we require fast enough (so it's not ready when the first page loads). However, I had considered adding a controlled loader layout to overcome this problem.

    Secondly I've tested on several mobile devices and each one handles the lag slightly differently (e.g. some devices play a track after 6-7 seconds and others take 10-12 seconds before the track is ready). This makes guessing when we should begin to load a track, quite difficult.

    Thirdly, with so many tracks being loaded simultaneously (e.g. track 1 still buffering when I start to load track 2 for the next page etc.) some lower end devices just seem to give up all together, and crash the app.

    It wouldn't be a problem if the C2 audio plugin could stream audio immediately (on mobile). But this lag issue is really throwing a spanner into the works.

    Thanks again for the reply, if you have any useful ideas, I'm all ears

  • Hi everyone,

    I could really use some advice

    I need to load (and play) a large amount of audio data, for an app that relies heavily on audio tracks.

    The project contains almost 1 hour of audio data and tracks range from 1 - 3 minutes. I know this much audio data seems like a lot, but it's for a health advice app, so the audio is a really vital part of the app.

    I have tried loading the audio from the music folder, but there is always quite a noticeable lag between starting the track, and actually hearing it play (sometimes as much as 10-12 seconds).

    I've also tried loading it from the sound folder, but the tracks are so large that they take forever to load. And, audio from the sound folder can't play until it's completely loaded.

    Does anyone have any useful tips or suggestions on how we can achieve our goal.

    Thanks for any advice you can offer

  • Hi again,

    I've managed to work out that you can measure your position in a looping audio tack by using modulo. The formula is Audio.PlaybackTime % Audio.Duration.

    This works well at a normal playback rate. But I need to reduce tempo of the audio track over time (by changing the playback rate). And unfortunately, as I change the playback rate, it seems to throw the calculation off.

    Can any of the maths geniuses out there, provide any ideas on how I can incorporate a changing playback rate into the formula. My rate goes down by a set amount every second until it reaches the desired goal.

    Thanks for any advice you can offer

  • korbaach, thanks for the suggestion.

    I have already tried setting the track to not looping and then restarting it every time it finishes. Unfortunately (on PhoneGap) there's an obvious gap between the end of one track and the start of the next one.

    I need seamless looping for the project I'm working on. So I have to find a way to work out how far I am through the track, while it's looping.

    Thanks anyway.

  • Howdy,

    I'm playing an audio track and I have it set to looping. Over the life-cycle of the audio track I also change the audio playback rate at different points.

    I need to find out my position in the track during any given loop. I don't think I can use the system PlaybackTime because this just shows the amount of time since the start of the loop. Does anyone have any suggestions on how to achieve this?

    Any help would be most appreciated,

    Thanks

  • Hey CJK, sorry for the late reply, I haven't been on the forum for a while!

    Thanks for the example, looks really useful   <img src="smileys/smiley20.gif" border="0" align="middle" />

  • blackhornet, thanks very much for the help! <img src="smileys/smiley4.gif" border="0" align="middle" />

  • Wertle, here's a very rough example of what I'm doing SpawnExample.

    So sprites are randomly created across the layout, and because of this some spawn in similar locations, creating clusters.

    I'd like to test small areas across the layout, to see which contain the largest clusters!

  • Wertle, thanks for your reply, but I'm not sure it would work!

    The clusters are spawned at random points all over the layout, and they each contains a random number of sprites.

    As I cannot predict where a cluster will be spawned, it might be hard to assign it a value based on its position!

    Thanks anyway   <img src="smileys/smiley4.gif" border="0" align="middle" />

  • Hi all,

    I'm spawning small clusters of sprites, at random points across my layout. The number of sprites spawned in each cluster is also random.

    I want to work out where the the largest clusters are created, and spawn new sprites there.

    Is there a way I can count to see if a cluster contains more than 20 sprites, so that I can tell which are the largest groups?

    Thanks for any advice.

  • Bump

    Hi all, still haven't had any luck finding a solution.

    Has anyone else experienced this, or possibly found a solution to the problem.

    Thanks, I'd be grateful for any help.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Aldo Tankuu,

    You could try using the 'Infinite jumping' template, which comes with C2. It would use the same principles, as the game you mentioned. You'd just need to reverse everything, so that it goes DOWN rather than UP.

    You can find the template by selecting a 'New' project, then scroll down to 'Infinite jumping'.

    <img src="smileys/smiley1.gif" border="0" align="middle" />