mekonbekon's Recent Forum Activity

  • khelaghor

    Add an instance variable to the ball called Ymax and give this the highest Y value that the ball reaches (e.g. if you kick the ball at Y= 400 then Ymax = 400)

    Add an instance variable to the ball called scaleFactor and give this the value the maximum increase by which you want the ball to scale (e.g. if you want the ball to scale to 1.5 its size then scaleFactor = 0.5)

    Every tick set ball scale to 1+(1-ball.Y/ball.Ymax)*ball.scaleFactor

  • yuji567

    There are three different techniques I often use to make smoothly scrolling backgrounds/floors on a loop, depending upon what the project requires. Assuming right-to-left movement:

    1) Use two instances of the same sprite the width of the screen and wrap them around each other

    2) Use one instance double the width of the screen

    3) Use a tiled background one tile larger than the width of the screen

    I've demo'd each here:

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

    The main thing is to reposition with respect to the current X, otherwise you can start to get seams and stutters in the scrolling.

    Hope that helps <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

  • imhotep22 cheers I just noticed that my link was automatically contracted! D'oh!

    JoshSenpai It should look like this:

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

  • 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.

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

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
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

19/44
How to earn trophies