mekonbekon's Recent Forum Activity

  • Nope, still not working - it should look like something like this: https://www.dropbox.com/s/h8pmfmjgfkvu8 ... .capx?dl=0

    Notice that there is no ellipsis before ".capx"

  • HI JoshSenpai, I'm afraid that link doesn't work - you can generate one by clicking the share button for the file on dropbox, clicking the "copy link" button.

    I won't get a chance to check it tonight, but I'll have a look tomorrow morning.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • JoshSenpai

    You can post the link with spaces in it so it doesn't register as a link.

  • Nepeo

    Thanks for the quick reply. I guess that means I'd better not delete it

    I'll have a fiddle around with my loading layout and preloading tonight to see if I can narrow down the issue, and log it as a bug.

  • Hi all,

    The size of my project exports has jumped from a tiny 500kB to a whopping 3.6MB. I'd added in about half a meg of audio, but that shouldn't have caused such an increase.

    On looking in the export folder I notice there is now a new JS file called "ffmpeg" in there that accounts for the bulk of the increase (about 2.6MB). A quick google suggests that this is some sort of multimedia handler so I'm guessing it's there because of those new audio files I added. This is quite a big jump - I like to try and keep my projects to under a couple of MB if possible to keep downloads super quick, so is this file necessary if I'm dealing with just audio files and not other media or can I delete it?

    I also noticed that this latest export was having trouble loading on my iOS devices (iPad2, iPad mini2), getting stuck on the loading bar but not on Android, Desktop, Silk. I'm using a loader layout and preloading sounds. Could this be related? If it's not, I'll report it as a bug.

    Edit: I'm using Safari on iOS and Chrome on everything else to test.

  • Hi JoshSenpai,

    Do you have a capx you can share? Off the top of my head it sounds like there's an issue in the conditions selecting enemies or perhaps the assignment of values to enemies when they are spawned, but this would be easier to assess from the actual code.

  • corlenbelspar

    Also you could use the bullet behaviour, using the "compare distance travelled" condition to stop movement after 16 pixels, setting the speed to 60 pixels per second.

  • Hi corlenbelspar,

    If you're using dt to modify the object's movement (e.g. every tick add 1*60*dt to object.X) then you're most likely not going to get it moving at exactly 1 pixel per frame, because dt usually isn't an exact 60th of a second.

    There are a number of 3rd party plugins that will allow you to move something an exact distance over time, such as the MoveTo plugin, but if you're just using the core behaviours, you could do something like this, using right movement as an example:

    Add an instance variable to your object, targetX and a boolean, moveRight

    is moveRight true:

    >>trigger once: set object.targetX to self.X+16

    >>Every tick if object.X<self.targetX, add self.X+1*60*dt to object

    If object.X>=self.targetX set object to self.targetX; set moveRight false

    This will at least ensure that you end up exactly 16 pixels away, factoring in dt, but you won't be moving exactly one pixel per frame.

    You can also turn on pixel rounding in the project properties and this will draw the sprite to integer pixel values, but the actual X of the object will be a float.

  • Laurent

    Maybe that would work. My concern, if I'm understanding you correctly, is that it might be hard to get the fading in and out working nicely as you would have to be constantly switching the speaker positions in and out. You may also end up skipping over sounds from narrow bands of tiles e.g. a river, because the speaker ends up on the far side of the narrow band.

  • Laurent - you could still use the tilemap system for one-shot and non-fading loop effects, e.g. different environmental footstep sounds, rustling bushes as you pass through them etc - a combination of the two systems should create quite an immersive audioscape

  • Laurent

    I've updated the capx; now the speakers switch themselves off if the sprite is more than 300px away:

    https://www.dropbox.com/s/kwh2ci35iikao ... .capx?dl=0

    I changed the audio tags so that they reference the UID of their speaker object instead of the tile - this prevents speakers playing the same sound from turning each other off.

    I added a distance parameter and on/off boolean to the speaker objects to control their state - this updates only every 0.1 sec to stop the checks eating up resources.

    If you run the capx in debug and click on the audio object you can follow the loops turning on and off as move towards/away from them.

  • Laurent

    Very kind of you to say so <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    I've updated the capx to include an example of speaker objects:

    https://www.dropbox.com/s/kwh2ci35iikao ... .capx?dl=0

    I created a Speaker object and added one on top of each group of tiles.

    On start, I set the Sprite to be a listener object, set each Speaker.TileNo to the tileNo the Speaker is sitting on. and being playing the corresponding loop at that object.

    This means that if there are a lot of speakers in the level you could end up with loads of sounds triggering at the same time on start. Most of them should be playing quietly, but be warned!

    The next thing I did was fiddle around with the audio object's "Positioned audio" properties; I still haven't quite got my head around how the listener Z height, reference distance, maximum distance and roll-off factor interrelate - have a play with them and see what shakes. It can be easier to test this with only two Speaker objects.

    You can find out more info in this section in the manual:

    https://www.scirra.com/manual/109/audio

mekonbekon's avatar

mekonbekon

Early Adopter

Member since 9 May, 2014

Twitter
mekonbekon has 13 followers

Trophy Case

  • 10-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • x2
    Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,000 players
  • Coach One of your tutorials has over 1,000 readers
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

18/44
How to earn trophies